protonscr

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

protonopen
ValveSoftware/Proton#7645 · opened 2024-04-11 by HorribleCavalry · updated 2024-04-11 · 0 comments · github
HHorribleCavalry 2024-04-11 github

System Information

  • GPU: Imagination Power VR BXT-1024.
  • Video driver version: private version.
  • Kernel version: 5.15.0-102-generic
  • Proton version: 8.0-5
  • OS info: Ubuntu 20.04

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?

Nothing extracted yet.