Skip to content

Commit

Permalink
Add way to force-reload the Vulkan loader pointers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Jul 29, 2024
1 parent 246dde7 commit 4aad4f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vulkan/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ PFN_vkGetInstanceProcAddr Context::get_instance_proc_addr()
return instance_proc_addr;
}

bool Context::init_loader(PFN_vkGetInstanceProcAddr addr)
bool Context::init_loader(PFN_vkGetInstanceProcAddr addr, bool force_reload)
{
std::lock_guard<std::mutex> holder(loader_init_lock);
if (loader_init_once && !addr)
if (loader_init_once && !force_reload && !addr)
return true;

if (!addr)
Expand Down
2 changes: 1 addition & 1 deletion vulkan/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class Context
Context();
Context(const Context &) = delete;
void operator=(const Context &) = delete;
static bool init_loader(PFN_vkGetInstanceProcAddr addr);
static bool init_loader(PFN_vkGetInstanceProcAddr addr, bool force_reload = false);
static PFN_vkGetInstanceProcAddr get_instance_proc_addr();

~Context();
Expand Down

0 comments on commit 4aad4f2

Please sign in to comment.