Crash when creating a Vulkan device on Wayland with NVIDIA driver installed
For a while already, having the NVIDIA driver installed results in a crash when libplacebo (and by extension mpv) creates the Vulkan devices on Wayland:
┌ (master) ~/s/c/l/b/demos
└─ env SDL_VIDEODRIVER=wayland ./plplay ~/Downloads/89801z6d.mkv
Opening file: '/var/home/yalter/Downloads/89801z6d.mkv'
Format: matroska,webm
Duration: 33.684 s
Found video track (stream 0)
Resolution: 1920 x 1080
FPS: 60.000000
Bitrate: 0 kbps
Initialized libplacebo v3.120.1-2-g88c3988 (API v120)
Attempting to initialize API: SDL2 (vulkan)
API debugging requested but no debug meta layers present... ignoring
Creating vulkan instance with extensions:
VK_KHR_get_physical_device_properties2
VK_KHR_surface
VK_KHR_external_memory_capabilities
VK_KHR_external_semaphore_capabilities
VK_KHR_surface
VK_KHR_wayland_surface
Probing for vulkan devices:
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
GPU 0: AMD RADV POLARIS10 (ACO) (discrete)
uuid: 00:00:00:00:01:00:00:00:00:00:00:00:00:00:00:00
GPU 1: GeForce GTX 970 (discrete)
uuid: BC:DA:0F:CD:6A:DE:7F:D6:2C:33:37:A8:17:3B:22:51
fish: Job 1, 'env SDL_VIDEODRIVER=wayland ./p…' terminated by signal SIGSEGV (Address boundary error)
(gdb) bt
#0 0x00007f7476ab19c9 in () at /lib64/libnvidia-eglcore.so.460.67
#1 0x00007f7476ab1a22 in () at /lib64/libnvidia-eglcore.so.460.67
#2 0x00007f748c7327df in supports_surf (ctx=0x1600190, inst=0x1638870, get_addr=0x7f748afd53f0 <vkGetInstanceProcAddr>, physd=0x1608c00, surf=0x165e590) at ../src/vulkan/context.c:914
#3 0x00007f748c732d4a in pl_vulkan_choose_device (ctx=0x1600190, params=0x7ffe0e3c8710) at ../src/vulkan/context.c:991
#4 0x00007f748c73547b in pl_vulkan_create (ctx=0x1600190, params=0x7ffe0e3c9330) at ../src/vulkan/context.c:1356
#5 0x0000000000406945 in sdl_create (ctx=0x1600190, title=0x408556 "plplay", width=1920, height=1080, flags=WIN_ALPHA) at ../demos/window_sdl.c:109
#6 0x000000000040640c in window_create (ctx=0x1600190, title=0x408556 "plplay", width=1920, height=1080, flags=WIN_ALPHA) at ../demos/window.c:37
#7 0x000000000040628a in main (argc=2, argv=0x7ffe0e3c97f8) at ../demos/plplay.c:481
It doesn't happen on X11, and it doesn't happen if NVIDIA's ICD is removed (I don't remember which file it was). I understand this is likely an NVIDIA issue, but maybe libplacebo could work around it somehow.
Fedora 34, libplacebo 88c39881