Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdoerre committed Jun 11, 2020
1 parent 4c750b2 commit 0411d00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion nv_vulkan_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "C" VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersi


#ifndef NV_DRIVER_PATH
#define NV_DRIVER_PATH "/usr/lib/x86_64-linux-gnu/nvidia/current/libGL.so.1"
#define NV_DRIVER_PATH "/usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1:libGLX_nvidia.so.0"
#endif
#ifndef NV_BUMBLEBEE_DISPLAY
#define NV_BUMBLEBEE_DISPLAY ":8"
Expand Down Expand Up @@ -49,6 +49,9 @@ class StaticInitialize {
return;
}
void *libdl = dlopen("libdl.so.2", RTLD_LAZY);
// We explicitly want the real dlsym from libdl.so.2 because there are LD_PRELOAD libraries
// that override dlsym and mess with the return values. We explicitly ask for the real
// dlsym function, just to be safe.
dlsym_fn *real_dlsym = (dlsym_fn*) dlsym(libdl, "dlsym");
instanceProcAddr = (decltype(instanceProcAddr)) real_dlsym(nvDriver, "vk_icdGetInstanceProcAddr");
phyProcAddr = (decltype(phyProcAddr)) real_dlsym(nvDriver, "vk_icdGetPhysicalDeviceProcAddr");
Expand Down
5 changes: 1 addition & 4 deletions primus_vk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,10 +915,7 @@ VkResult VKAPI_CALL PrimusVK_AcquireNextImage2KHR(VkDevice device, const VkAcqui
PrimusSwapchain *ch = reinterpret_cast<PrimusSwapchain*>(pAcquireInfo->swapchain);
auto timeout = pAcquireInfo->timeout;
if(timeout == UINT64_MAX ) {
// make the assignment in two steps to
// keep the compiler on 32-bit happy
timeout = 1000;
timeout *= 1000L * 1000 * 60; // 1 minute
timeout = uint64_t(1000) * 1000 * 1000 * 60; // 1 minute
}
VkResult res;
{
Expand Down

0 comments on commit 0411d00

Please sign in to comment.