ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
22.89k stars 1k forks source link

IMG GPU Vulkan Driver can not load libpvr_mesa_wsi.so from /usr/lib/. #7645

Open HorribleCavalry opened 1 month ago

HorribleCavalry commented 1 month ago

System Information

Issue

Hi, I am a linux gpu vulkan driver engineer, and now I am trying run some windows games with Proton. But in my driver, a .so file(libpvr_mesa_wsi.so) need to be loaded when calling vkCreateInstance. And whatever I tried, libpvr_mesa_wsi.so file can not load success even using absolute path.

If I run some other vk programs, libpvr_mesa_wsi.so always be loaded correctly. For example, vkcube. Here is a part of driver code:

define PVR_MESA_WSI_LIB "libpvr_mesa_wsi.so"

... VkResult IMG_vkCreateInstance(const VkInstanceCreateInfo pCreateInfo, const VkAllocationCallbacks pAllocator, VkInstance pInstance) { ... void handle = dlopen(PVR_MESA_WSI_LIB , RTLD_NOW); ... }

And I also made a try to load libpvr_mesa_wsi.so success but in a weird way. If I using absolute path, libpvr_mesa_wsi.so can not be loaded. But if I move libpvr_mesa_wsi.so from /usr/lib/x86_64-linux-gnu/ to ~/.steam/steam/linux64/ , and also changed driver source code to this absolute path, then this .so file is finally loaded success.

Is anyone know how Proton load some .so files from /usr/lib/ required by gpu driver?