This commit is contained in:
parent
de2a7f7e14
commit
13ed750f68
1 changed files with 5 additions and 4 deletions
|
@ -231,10 +231,11 @@ void Instance::initialize_instance()
|
|||
|
||||
void Instance::load_library()
|
||||
{
|
||||
library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
constexpr auto runtime_loader_flags = RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL | RTLD_NODELETE;
|
||||
library = dlopen("libvulkan.so.1", runtime_loader_flags);
|
||||
if (!library)
|
||||
{
|
||||
library = dlopen("libvulkan.so", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
library = dlopen("libvulkan.so", runtime_loader_flags);
|
||||
}
|
||||
ensure(library, "Failed to dlopen vulkan library");
|
||||
|
||||
|
@ -256,8 +257,8 @@ void Instance::unload_library()
|
|||
// eg. https://github.com/google/sanitizers/issues/89
|
||||
// with no noticable gains, so we just don't bother closing it.
|
||||
|
||||
dlclose(library);
|
||||
library = nullptr;
|
||||
// dlclose(library);
|
||||
// library = nullptr;
|
||||
}
|
||||
|
||||
void Instance::load_global_functions()
|
||||
|
|
Loading…
Add table
Reference in a new issue