Vulkaninfo crashes in Wayland session with driver 470.42.01

vulkaninfo terminates with SIGSEGV immediately, backtrace suggests libnvidia-glcore.so.470.42.01.
I’m using a dual-GPU system, and vulkaninfo works fine if launched with __VK_LAYER_NV_optimus=non_NVIDIA_only.
Tested on Fedora 34 with mutter 40.2 and kwin 5.22.1.

I get the SIGSEGV with vulkaninfo on non optimus hardware, vkcube runs ok.

I managed to step into the crash: The issue is that some drivers like lavapipe support KHR_wayland_surface but the NVIDIA driver still doesn’t. The result is that the VkInstance claims to support the extension, but when actually creating the device it ends up using the Mesa WSI entry point and then passing that surface pointer to the NVIDIA driver, which expects a totally different implementation. Basically, anything that takes in a VkSurfaceKHR will crash when trying to use a native Wayland window. You can work around this by explicitly setting VK_ICD_FILENAMES to only include the NV ICD.

I guess technically this is a loader issue, but getting this fix out to every app would probably be a lot harder than just waiting for NV’s KHR_wayland_surface extension. SDL’s ready to go for native Wayland support so it’d be great to have it in the final 470 series!

Thanks for reporting this. Do you have a backtrace for the crash available? We’re looking into it but it would be good to make sure we’re reproducing the same problem.

Here is backtrace from Fedora 34 (vulkan-tools 1.2.162.0):

#0  0x00007fffef214a4b in ?? () from /lib64/libnvidia-glcore.so.470.42.01
#1  0x000055555556b2d6 in GetVectorInit<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (
    func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR", init=VK_PRESENT_MODE_IMMEDIATE_KHR, f=@0x7fffffffd928: 0x7ffff7868550 <vkGetPhysicalDeviceSurfacePresentModesKHR>) at ../vulkaninfo/vulkaninfo.h:247
#2  GetVector<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (f=@0x7fffffffd928: 0x7ffff7868550 <vkGetPhysicalDeviceSurfacePresentModesKHR>, 
    func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR") at ../vulkaninfo/vulkaninfo.h:259
#3  AppSurface::AppSurface (this=<optimized out>, inst=..., phys_device=<optimized out>, surface_extension=..., sur_extension_pNextChain=..., this=<optimized out>, inst=..., phys_device=<optimized out>, surface_extension=..., 
    sur_extension_pNextChain=...) at ../vulkaninfo/vulkaninfo.h:1215
#4  0x0000555555566c8a in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:947

Backtrace as well as some breakpoints of interest leading up to the crash:

Thread 1 "vulkaninfo" hit Breakpoint 1, 0x00007ffff78675c0 in vkCreateWaylandSurfaceKHR () from /lib64/libvulkan.so
(gdb) cont
Continuing.

Thread 1 "vulkaninfo" hit Breakpoint 2, 0x00007fffedc2c8c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_lvp.so
(gdb) bt
#0  0x00007fffedc2c8c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_lvp.so
#1  0x00007ffff786eef6 in terminator_CreateWaylandSurfaceKHR () from /lib64/libvulkan.so
#2  0x000055555556a3ba in AppCreateWaylandSurface (inst=...) at ../vulkaninfo/vulkaninfo.h:998
#3  0x0000555555566bde in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:944
(gdb) cont
Continuing.

Thread 1 "vulkaninfo" hit Breakpoint 2, 0x00007ffff40329c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_radeon.so
(gdb) bt
#0  0x00007ffff40329c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_radeon.so
#1  0x00007ffff786eef6 in terminator_CreateWaylandSurfaceKHR () from /lib64/libvulkan.so
#2  0x000055555556a3ba in AppCreateWaylandSurface (inst=...) at ../vulkaninfo/vulkaninfo.h:998
#3  0x0000555555566bde in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:944
(gdb) cont
Continuing.

Thread 1 "vulkaninfo" hit Breakpoint 2, 0x00007ffff4905890 in wsi_create_wl_surface () from /usr/lib64/libvulkan_intel.so
(gdb) bt
#0  0x00007ffff4905890 in wsi_create_wl_surface () from /usr/lib64/libvulkan_intel.so
#1  0x00007ffff786eef6 in terminator_CreateWaylandSurfaceKHR () from /lib64/libvulkan.so
#2  0x000055555556a3ba in AppCreateWaylandSurface (inst=...) at ../vulkaninfo/vulkaninfo.h:998
#3  0x0000555555566bde in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:944
(gdb) cont
Continuing.

Thread 1 "vulkaninfo" received signal SIGSEGV, Segmentation fault.
0x00007ffff6114a4b in ?? () from /lib64/libnvidia-glcore.so.470.42.01
(gdb) bt
#0  0x00007ffff6114a4b in ?? () from /lib64/libnvidia-glcore.so.470.42.01
#1  0x000055555556b2d6 in GetVectorInit<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (
    func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR", init=VK_PRESENT_MODE_IMMEDIATE_KHR, f=@0x7fffffffc858: 0x7ffff7867550 <vkGetPhysicalDeviceSurfacePresentModesKHR>) at ../vulkaninfo/vulkaninfo.h:247
#2  GetVector<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (
    f=@0x7fffffffc858: 0x7ffff7867550 <vkGetPhysicalDeviceSurfacePresentModesKHR>, func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR") at ../vulkaninfo/vulkaninfo.h:259
#3  AppSurface::AppSurface (this=<optimized out>, inst=..., phys_device=<optimized out>, surface_extension=..., sur_extension_pNextChain=..., this=<optimized out>, inst=..., phys_device=<optimized out>, surface_extension=...,
    sur_extension_pNextChain=...) at ../vulkaninfo/vulkaninfo.h:1215
#4  0x0000555555566c8a in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:947

Bonus points: A vkcube compiled with Wayland support only:

Selected GPU 0: NVIDIA GeForce GTX 1060 6GB, type: 2

Thread 1 "vkcube" hit Breakpoint 1, 0x00007ffff7e225c0 in vkCreateWaylandSurfaceKHR () from /lib64/libvulkan.so.1
(gdb) cont
Continuing.

Thread 1 "vkcube" hit Breakpoint 2, 0x00007fffedb738c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_lvp.so
(gdb) cont
Continuing.

Thread 1 "vkcube" hit Breakpoint 2, 0x00007ffff3f799c0 in wsi_create_wl_surface () from /usr/lib64/libvulkan_radeon.so
(gdb) cont
Continuing.

Thread 1 "vkcube" hit Breakpoint 2, 0x00007ffff4a86890 in wsi_create_wl_surface () from /usr/lib64/libvulkan_intel.so
(gdb)
Continuing.

Thread 1 "vkcube" received signal SIGSEGV, Segmentation fault.
0x00000000004472a0 in ?? ()
(gdb) bt
#0  0x00000000004472a0 in ?? ()
#1  0x00007ffff6402775 in ?? () from /lib64/libnvidia-glcore.so.470.42.01
#2  0x000000000040d09e in demo_init_vk_swapchain (demo=0x7fffffffc780) at /home/flibitijibibo/.local/share/Steam/steamapps/common/FEZ/Vulkan-Tools/cube/cube.c:3679
#3  0x000000000040e6b0 in main (argc=1, argv=0x7fffffffd5e8) at /home/flibitijibibo/.local/share/Steam/steamapps/common/FEZ/Vulkan-Tools/cube/cube.c:4271

As mentioned previously, setting VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia.json resolves crashes for both tests.

Thread 1 "vulkaninfo" received signal SIGSEGV, Segmentation fault.
0x00007fffef20da4b in ?? () from /lib64/libnvidia-glcore.so.470.42.01
(gdb) bt full
#0  0x00007fffef20da4b in ?? () from /lib64/libnvidia-glcore.so.470.42.01
No symbol table info available.
#1  0x000055555556b2d6 in GetVectorInit<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR", init=VK_PRESENT_MODE_IMMEDIATE_KHR, 
    f=@0x7fffffffce28: 0x7ffff7861550 <vkGetPhysicalDeviceSurfacePresentModesKHR>) at ../vulkaninfo/vulkaninfo.h:247
        count = 0
Python Exception <class 'gdb.error'> value has been optimized out: 
        results = 
        err = <optimized out>
        count = <optimized out>
Python Exception <class 'gdb.error'> value has been optimized out: 
        results = 
        err = <optimized out>
#2  GetVector<VkPresentModeKHR, VkResult (*&)(VkPhysicalDevice_T*, VkSurfaceKHR_T*, unsigned int*, VkPresentModeKHR*), VkPhysicalDevice_T*&, VkSurfaceKHR_T*&> (
    f=@0x7fffffffce28: 0x7ffff7861550 <vkGetPhysicalDeviceSurfacePresentModesKHR>, func_name=0x5555555b4970 "vkGetPhysicalDeviceSurfacePresentModesKHR")
    at ../vulkaninfo/vulkaninfo.h:259
No locals.
#3  AppSurface::AppSurface (this=<optimized out>, inst=..., phys_device=<optimized out>, surface_extension=..., sur_extension_pNextChain=..., this=<optimized out>, inst=..., 
    phys_device=<optimized out>, surface_extension=..., sur_extension_pNextChain=...) at ../vulkaninfo/vulkaninfo.h:1215
        surface_info2 = {sType = <optimized out>, pNext = <optimized out>, surface = <optimized out>}
        init = {sType = <optimized out>, pNext = <optimized out>, surfaceFormat = {format = <optimized out>, colorSpace = <optimized out>}}
        err = <optimized out>
        surface_info = {sType = <optimized out>, pNext = <optimized out>, surface = <optimized out>}
        err = <optimized out>
        err = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--c
#4  0x0000555555566c8a in main (argc=<optimized out>, argv=<optimized out>) at ../vulkaninfo/vulkaninfo.cpp:947
        phys_device = @0x555555a65d00: 0x555555a6d040
        __for_range = std::vector of length 2, capacity 2 = {0x555555a6d040, 0x555555a6d420}
        __for_begin = Python Exception <class 'gdb.error'> value has been optimized out: 

        __for_end = Python Exception <class 'gdb.error'> value has been optimized out: 

        surface_extension = @0x5555556fd2d0: {name = "VK_KHR_wayland_surface", create_window = 0x55555556a770 <AppCreateWaylandWindow(AppInstance&)>, create_surface = 0x55555556a350 <AppCreateWaylandSurface(AppInstance&)>, destroy_window = 0x55555556a7f0 <AppDestroyWaylandWindow(AppInstance&)>, surface = 0x555555a839c0, supports_present = 0}
        __for_range = std::vector of length 3, capacity 4 = {{name = "VK_KHR_xcb_surface", create_window = 0x55555556a3f0 <AppCreateXcbWindow(AppInstance&)>, create_surface = 0x55555556a210 <AppCreateXcbSurface(AppInstance&)>, destroy_window = 0x55555556a580 <AppDestroyXcbWindow(AppInstance&)>, surface = 0x555555a669b0, supports_present = 0}, {name = "VK_KHR_xlib_surface", create_window = 0x55555556a5c0 <AppCreateXlibWindow(AppInstance&)>, create_surface = 0x55555556a2b0 <AppCreateXlibSurface(AppInstance&)>, destroy_window = 0x55555556a6c0 <AppDestroyXlibWindow(AppInstance&)>, surface = 0x555555a6c360, supports_present = 0}, {name = "VK_KHR_wayland_surface", create_window = 0x55555556a770 <AppCreateWaylandWindow(AppInstance&)>, create_surface = 0x55555556a350 <AppCreateWaylandSurface(AppInstance&)>, destroy_window = 0x55555556a7f0 <AppDestroyWaylandWindow(AppInstance&)>, surface = 0x555555a839c0, supports_present = 0}}
        __for_begin = Python Exception <class 'gdb.error'> value has been optimized out: 

        __for_end = Python Exception <class 'gdb.error'> value has been optimized out: 

        instance = {dll = {fp_vkCreateInstance = 0x7ffff78668c0 <vkCreateInstance>, fp_vkEnumerateInstanceExtensionProperties = 0x7ffff7866070 <vkEnumerateInstanceExtensionProperties>, fp_vkEnumerateInstanceLayerProperties = 0x7ffff7866340 <vkEnumerateInstanceLayerProperties>, fp_vkDestroyInstance = 0x7ffff7865270 <vkDestroyInstance>, fp_vkEnumeratePhysicalDevices = 0x7ffff78681b0 <vkEnumeratePhysicalDevices>, fp_vkGetPhysicalDeviceFeatures = 0x7ffff7860870 <vkGetPhysicalDeviceFeatures>, fp_vkGetPhysicalDeviceFormatProperties = 0x7ffff7860890 <vkGetPhysicalDeviceFormatProperties>, fp_vkGetPhysicalDeviceImageFormatProperties = 0x7ffff78608b0 <vkGetPhysicalDeviceImageFormatProperties>, fp_vkGetPhysicalDeviceProperties = 0x7ffff78608d0 <vkGetPhysicalDeviceProperties>, fp_vkGetPhysicalDeviceQueueFamilyProperties = 0x7ffff78608f0 <vkGetPhysicalDeviceQueueFamilyProperties>, fp_vkGetPhysicalDeviceMemoryProperties = 0x7ffff7860910 <vkGetPhysicalDeviceMemoryProperties>, fp_vkGetInstanceProcAddr = 0x7ffff78583f0 <vkGetInstanceProcAddr>, fp_vkGetDeviceProcAddr = 0x7ffff78618f0 <vkGetDeviceProcAddr>, fp_vkCreateDevice = 0x7ffff7865700 <vkCreateDevice>, fp_vkDestroyDevice = 0x7ffff7865760 <vkDestroyDevice>, fp_vkEnumerateDeviceExtensionProperties = 0x7ffff7864e60 <vkEnumerateDeviceExtensionProperties>, fp_vkGetDeviceQueue = 0x7ffff78607c0 <vkGetDeviceQueue>, fp_vkCreateImage = 0x7ffff7860b80 <vkCreateImage>, fp_vkDestroyImage = 0x7ffff7860b90 <vkDestroyImage>, fp_vkGetBufferMemoryRequirements = 0x7ffff78609f0 <vkGetBufferMemoryRequirements>, fp_vkGetImageMemoryRequirements = 0x7ffff7860a00 <vkGetImageMemoryRequirements>, fp_vkGetImageSparseMemoryRequirements = 0x7ffff7860a10 <vkGetImageSparseMemoryRequirements>, fp_vkEnumerateInstanceVersion = 0x7ffff7866600 <vkEnumerateInstanceVersion>, fp_vkEnumeratePhysicalDeviceGroups = 0x7ffff78688a0 <vkEnumeratePhysicalDeviceGroups>, fp_vkGetPhysicalDeviceFeatures2 = 0x7ffff78610a0 <vkGetPhysicalDeviceFeatures2>, fp_vkGetPhysicalDeviceProperties2 = 0x7ffff78610e0 <vkGetPhysicalDeviceProperties2>, fp_vkGetPhysicalDeviceFormatProperties2 = 0x7ffff7861120 <vkGetPhysicalDeviceFormatProperties2>, fp_vkGetPhysicalDeviceQueueFamilyProperties2 = 0x7ffff78611a0 <vkGetPhysicalDeviceQueueFamilyProperties2>, fp_vkGetPhysicalDeviceMemoryProperties2 = 0x7ffff78611e0 <vkGetPhysicalDeviceMemoryProperties2>, fp_vkDestroySurfaceKHR = 0x7ffff78614e0 <vkDestroySurfaceKHR>, fp_vkCreateXlibSurfaceKHR = 0x7ffff7861620 <vkCreateXlibSurfaceKHR>, fp_vkGetPhysicalDeviceXlibPresentationSupportKHR = 0x7ffff7861630 <vkGetPhysicalDeviceXlibPresentationSupportKHR>, fp_vkCreateXcbSurfaceKHR = 0x7ffff78615f0 <vkCreateXcbSurfaceKHR>, fp_vkGetPhysicalDeviceXcbPresentationSupportKHR = 0x7ffff7861600 <vkGetPhysicalDeviceXcbPresentationSupportKHR>, fp_vkCreateWaylandSurfaceKHR = 0x7ffff78615c0 <vkCreateWaylandSurfaceKHR>, fp_vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0x7ffff78615d0 <vkGetPhysicalDeviceWaylandPresentationSupportKHR>, library = 0x5555555e1f00}, instance = 0x5555557ed040, instance_version = 4202658, vk_version = {major = 1, minor = 2, patch = 162}, ext_funcs = {vkGetPhysicalDeviceSurfaceSupportKHR = 0x7ffff78614f0 <vkGetPhysicalDeviceSurfaceSupportKHR>, vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0x7ffff7861510 <vkGetPhysicalDeviceSurfaceCapabilitiesKHR>, vkGetPhysicalDeviceSurfaceFormatsKHR = 0x7ffff7861530 <vkGetPhysicalDeviceSurfaceFormatsKHR>, vkGetPhysicalDeviceSurfacePresentModesKHR = 0x7ffff7861550 <vkGetPhysicalDeviceSurfacePresentModesKHR>, vkGetDeviceGroupPresentCapabilitiesKHR = 0x7ffff7861740 <vkGetDeviceGroupPresentCapabilitiesKHR>, vkGetPhysicalDeviceSurfaceFormats2KHR = 0x7ffff7861830 <vkGetPhysicalDeviceSurfaceFormats2KHR>, vkGetPhysicalDeviceProperties2KHR = 0x7ffff78610e0 <vkGetPhysicalDeviceProperties2>, vkGetPhysicalDeviceFormatProperties2KHR = 0x7ffff7861120 <vkGetPhysicalDeviceFormatProperties2>, vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0x7ffff78611a0 <vkGetPhysicalDeviceQueueFamilyProperties2>, vkGetPhysicalDeviceFeatures2KHR = 0x7ffff78610a0 <vkGetPhysicalDeviceFeatures2>, vkGetPhysicalDeviceMemoryProperties2KHR = 0x7ffff78611e0 <vkGetPhysicalDeviceMemoryProperties2>, vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0x7ffff7861810 <vkGetPhysicalDeviceSurfaceCapabilities2KHR>, vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0x7ffff784cb90 <GetPhysicalDeviceSurfaceCapabilities2EXT>, vkEnumeratePhysicalDeviceGroupsKHR = 0x7ffff78688a0 <vkEnumeratePhysicalDeviceGroups>, vkGetPhysicalDeviceToolPropertiesEXT = 0x7ffff784cc10 <GetPhysicalDeviceToolPropertiesEXT>, vkGetInstanceProcAddr = 0x7ffff78583f0 <vkGetInstanceProcAddr>, instance = 0x5555557ed040}, global_layers = std::vector of length 2, capacity 2 = {{layer_properties = {layerName = "VK_LAYER_NV_optimus", '\000' <repeats 236 times>, specVersion = 4202671, implementationVersion = 1, description = "NVIDIA Optimus layer", '\000' <repeats 235 times>}, extension_properties = std::vector of length 0, capacity 0}, {layer_properties = {layerName = "VK_LAYER_MESA_device_select", '\000' <repeats 228 times>, specVersion = 4202569, implementationVersion = 1, description = "Linux device selection layer", '\000' <repeats 227 times>}, extension_properties = std::vector of length 0, capacity 0}}, global_extensions = std::vector of length 18, capacity 18 = {{extensionName = "VK_KHR_device_group_creation", '\000' <repeats 227 times>, specVersion = 1}, {extensionName = "VK_KHR_display", '\000' <repeats 241 times>, specVersion = 23}, {extensionName = "VK_KHR_external_fence_capabilities", '\000' <repeats 221 times>, specVersion = 1}, {extensionName = "VK_KHR_external_memory_capabilities", '\000' <repeats 220 times>, specVersion = 1}, {extensionName = "VK_KHR_external_semaphore_capabilities", '\000' <repeats 217 times>, specVersion = 1}, {extensionName = "VK_KHR_get_display_properties2", '\000' <repeats 225 times>, specVersion = 1}, {extensionName = "VK_KHR_get_physical_device_properties2", '\000' <repeats 217 times>, specVersion = 2}, {extensionName = "VK_KHR_get_surface_capabilities2", '\000' <repeats 223 times>, specVersion = 1}, {extensionName = "VK_KHR_surface", '\000' <repeats 241 times>, specVersion = 25}, {extensionName = "VK_KHR_surface_protected_capabilities", '\000' <repeats 218 times>, specVersion = 1}, {extensionName = "VK_KHR_wayland_surface", '\000' <repeats 233 times>, specVersion = 6}, {extensionName = "VK_KHR_xcb_surface", '\000' <repeats 237 times>, specVersion = 6}, {extensionName = "VK_KHR_xlib_surface", '\000' <repeats 236 times>, specVersion = 6}, {extensionName = "VK_EXT_acquire_xlib_display", '\000' <repeats 228 times>, specVersion = 1}, {extensionName = "VK_EXT_debug_report", '\000' <repeats 236 times>, specVersion = 9}, {extensionName = "VK_EXT_direct_mode_display", '\000' <repeats 229 times>, specVersion = 1}, {extensionName = "VK_EXT_display_surface_counter", '\000' <repeats 225 times>, specVersion = 1}, {extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>, specVersion = 2}}, inst_extensions = std::vector of length 18, capacity 32 = {"VK_KHR_device_group_creation", "VK_KHR_display", "VK_KHR_external_fence_capabilities", "VK_KHR_external_memory_capabilities", "VK_KHR_external_semaphore_capabilities", "VK_KHR_get_display_properties2", "VK_KHR_get_physical_device_properties2", "VK_KHR_get_surface_capabilities2", "VK_KHR_surface", "VK_KHR_surface_protected_capabilities", "VK_KHR_wayland_surface", "VK_KHR_xcb_surface", "VK_KHR_xlib_surface", "VK_EXT_acquire_xlib_display", "VK_EXT_debug_report", "VK_EXT_direct_mode_display", "VK_EXT_display_surface_counter", "VK_EXT_debug_utils"}, surface_extensions = std::vector of length 3, capacity 4 = {{name = "VK_KHR_xcb_surface", create_window = 0x55555556a3f0 <AppCreateXcbWindow(AppInstance&)>, create_surface = 0x55555556a210 <AppCreateXcbSurface(AppInstance&)>, destroy_window = 0x55555556a580 <AppDestroyXcbWindow(AppInstance&)>, surface = 0x555555a669b0, supports_present = 0}, {name = "VK_KHR_xlib_surface", create_window = 0x55555556a5c0 <AppCreateXlibWindow(AppInstance&)>, create_surface = 0x55555556a2b0 <AppCreateXlibSurface(AppInstance&)>, destroy_window = 0x55555556a6c0 <AppDestroyXlibWindow(AppInstance&)>, surface = 0x555555a6c360, supports_present = 0}, {name = "VK_KHR_wayland_surface", create_window = 0x55555556a770 <AppCreateWaylandWindow(AppInstance&)>, create_surface = 0x55555556a350 <AppCreateWaylandSurface(AppInstance&)>, destroy_window = 0x55555556a7f0 <AppDestroyWaylandWindow(AppInstance&)>, surface = 0x555555a839c0, supports_present = 0}}, width = 256, height = 256, surface_capabilities = {minImageCount = 728, maxImageCount = 0, currentExtent = {width = 728, height = 0}, minImageExtent = {width = 728, height = 0}, maxImageExtent = {width = 68, height = 0}, maxImageArrayLayers = 68, supportedTransforms = 0, currentTransform = VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, supportedCompositeAlpha = 0, supportedUsageFlags = 1685382483}, xcb_connection = 0x555555a6d6a0, xcb_screen = 0x555555a68e14, xcb_window = 10485760, xlib_display = 0x555555a6a060, xlib_window = 12582913, wayland_display = 0x555555a7e360, wayland_surface = 0x555555a82750}
        phys_devices = std::vector of length 2, capacity 2 = {0x555555a6d040, 0x555555a6d420}
        __for_begin = Python Exception <class 'gdb.error'> value has been optimized out: 

        __for_end = Python Exception <class 'gdb.error'> value has been optimized out: 

        gpu_counter = <optimized out>
        surface_extension = <optimized out>
        pNext_chains = {phys_device_props2 = std::vector of length 36, capacity 36 = {{sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR, mem_size = 64}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, mem_size = 56}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, mem_size = 112}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, mem_size = 536}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, mem_size = 88}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR, mem_size = 96}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, mem_size = 64}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR, mem_size = 48}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, mem_size = 48}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT, mem_size = 48}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, mem_size = 64}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES, mem_size = 112}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES, mem_size = 736}}, phys_device_mem_props2 = std::vector of length 1, capacity 1 = {{sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT, mem_size = 272}}, phys_device_features2 = std::vector of length 59, capacity 59 = {{sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, mem_size = 96}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR, mem_size = 80}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR, mem_size = 40}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT, mem_size = 64}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, mem_size = 64}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, mem_size = 208}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES, mem_size = 32}, {sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT, mem_size = 24}}, surface_capabilities2 = std::vector of length 2, capacity 2 = {{sType = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, mem_size = 24}, {sType = VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR, mem_size = 24}}, format_properties2 = std::vector of length 1, capacity 1 = {{sType = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT, mem_size = 32}}}
        surfaces = std::vector of length 4, capacity 4 = {std::unique_ptr<AppSurface> = {get() = 0x5555556a7be0}, std::unique_ptr<AppSurface> = {get() = 0x555555a69e10}, std::unique_ptr<AppSurface> = {get() = 0x555555a7de40}, std::unique_ptr<AppSurface> = {get() = 0x555555a7e0f0}}
        gpus = std::vector of length 17591766591640, capacity 2198620602149 = {<error reading variable gpus (Cannot access memory at address 0xc0000002)>
        __for_range = <optimized out>
        selected_gpu = <optimized out>
        show_formats = <optimized out>
        output_path = <optimized out>
        printers = std::vector of length 0, capacity 0
        out = {<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {_vptr.ios_base = 0x5555555ce928 <vtable for std::ostream+64>, static boolalpha = std::_S_boolalpha, static dec = std::_S_dec, static fixed = std::_S_fixed, static hex = std::_S_hex, static internal = std::_S_internal, static left = std::_S_left, static oct = std::_S_oct, static right = std::_S_right, static scientific = std::_S_scientific, static showbase = std::_S_showbase, static showpoint = std::_S_showpoint, static showpos = std::_S_showpos, static skipws = std::_S_skipws, static unitbuf = std::_S_unitbuf, static uppercase = std::_S_uppercase, static adjustfield = std::_S_adjustfield, static basefield = std::_S_basefield, static floatfield = std::_S_floatfield, static badbit = std::_S_badbit, static eofbit = std::_S_eofbit, static failbit = std::_S_failbit, static goodbit = std::_S_goodbit, static app = std::_S_app, static ate = std::_S_ate, static binary = std::_S_bin, static in = std::_S_in, static out = std::_S_out, static trunc = std::_S_trunc, static beg = std::_S_beg, static cur = std::_S_cur, static end = std::_S_end, _M_precision = 6, _M_width = 0, _M_flags = 4098, _M_exception = std::_S_goodbit, _M_streambuf_state = std::_S_goodbit, _M_callbacks = 0x0, _M_word_zero = {_M_pword = 0x0, _M_iword = 0}, _M_local_word = {{_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}}, _M_word_size = 8, _M_word = 0x7fffffffd0b8, _M_ios_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_tie = 0x0, _M_fill = 0 '\000', _M_fill_init = false, _M_streambuf = 0x7ffff7e13e20 <__gnu_internal::buf_cout_sync>, _M_ctype = 0x7ffff7e157c0 <(anonymous namespace)::ctype_c>, _M_num_put = 0x7ffff7e15750 <(anonymous namespace)::num_put_c>, _M_num_get = 0x7ffff7e15760 <(anonymous namespace)::num_get_c>}, _vptr.basic_ostream = 0x5555555ce900 <vtable for std::ostream+24>}
        json_out = {<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {_vptr.ios_base = 0x7ffff7e0cf48 <vtable for std::basic_ofstream<char, std::char_traits<char> >+64>, static boolalpha = std::_S_boolalpha, static dec = std::_S_dec, static fixed = std::_S_fixed, static hex = std::_S_hex, static internal = std::_S_internal, static left = std::_S_left, static oct = std::_S_oct, static right = std::_S_right, static scientific = std::_S_scientific, static showbase = std::_S_showbase, static showpoint = std::_S_showpoint, static showpos = std::_S_showpos, static skipws = std::_S_skipws, static unitbuf = std::_S_unitbuf, static uppercase = std::_S_uppercase, static adjustfield = std::_S_adjustfield, static basefield = std::_S_basefield, static floatfield = std::_S_floatfield, static badbit = std::_S_badbit, static eofbit = std::_S_eofbit, static failbit = std::_S_failbit, static goodbit = std::_S_goodbit, static app = std::_S_app, static ate = std::_S_ate, static binary = std::_S_bin, static in = std::_S_in, static out = std::_S_out, static trunc = std::_S_trunc, static beg = std::_S_beg, static cur = std::_S_cur, static end = std::_S_end, _M_precision = 6, _M_width = 0, _M_flags = 4098, _M_exception = std::_S_goodbit, _M_streambuf_state = std::_S_goodbit, _M_callbacks = 0x0, _M_word_zero = {_M_pword = 0x0, _M_iword = 0}, _M_local_word = {{_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}}, _M_word_size = 8, _M_word = 0x7fffffffd8b8, _M_ios_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_tie = 0x0, _M_fill = 0 '\000', _M_fill_init = false, _M_streambuf = 0x7fffffffd788, _M_ctype = 0x7ffff7e157c0 <(anonymous namespace)::ctype_c>, _M_num_put = 0x7ffff7e15750 <(anonymous namespace)::num_put_c>, _M_num_get = 0x7ffff7e15760 <(anonymous namespace)::num_get_c>}, _vptr.basic_ostream = 0x7ffff7e0cf20 <vtable for std::basic_ofstream<char, std::char_traits<char> >+24>}, _M_filebuf = {<std::basic_streambuf<char, std::char_traits<char> >> = {_vptr.basic_streambuf = 0x7ffff7e0cd68 <vtable for std::basic_filebuf<char, std::char_traits<char> >+16>, _M_in_beg = 0x0, _M_in_cur = 0x0, _M_in_end = 0x0, _M_out_beg = 0x0, _M_out_cur = 0x0, _M_out_end = 0x0, _M_buf_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_lock = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, _M_file = {_M_cfile = 0x0, _M_cfile_created = false}, _M_mode = 0, _M_state_beg = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_cur = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_last = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_buf = 0x0, _M_buf_size = 8192, _M_buf_allocated = false, _M_reading = false, _M_writing = false, _M_pback = 0 '\000', _M_pback_cur_save = 0x0, _M_pback_end_save = 0x0, _M_pback_init = false, _M_codecvt = 0x7ffff7e15730 <(anonymous namespace)::codecvt_c>, _M_ext_buf = 0x0, _M_ext_buf_size = 0, _M_ext_next = 0x0, _M_ext_end = 0x0}}
        portability_out = {<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {_vptr.ios_base = 0x7ffff7e0cf48 <vtable for std::basic_ofstream<char, std::char_traits<char> >+64>, static boolalpha = std::_S_boolalpha, static dec = std::_S_dec, static fixed = std::_S_fixed, static hex = std::_S_hex, static internal = std::_S_internal, static left = std::_S_left, static oct = std::_S_oct, static right = std::_S_right, static scientific = std::_S_scientific, static showbase = std::_S_showbase, static showpoint = std::_S_showpoint, static showpos = std::_S_showpos, static skipws = std::_S_skipws, static unitbuf = std::_S_unitbuf, static uppercase = std::_S_uppercase, static adjustfield = std::_S_adjustfield, static basefield = std::_S_basefield, static floatfield = std::_S_floatfield, static badbit = std::_S_badbit, static eofbit = std::_S_eofbit, static failbit = std::_S_failbit, static goodbit = std::_S_goodbit, static app = std::_S_app, static ate = std::_S_ate, static binary = std::_S_bin, static in = std::_S_in, static out = std::_S_out, static trunc = std::_S_trunc, static beg = std::_S_beg, static cur = std::_S_cur, static end = std::_S_end, _M_precision = 6, _M_width = 0, _M_flags = 4098, _M_exception = std::_S_goodbit, _M_streambuf_state = std::_S_goodbit, _M_callbacks = 0x0, _M_word_zero = {_M_pword = 0x0, _M_iword = 0}, _M_local_word = {{_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}}, _M_word_size = 8, _M_word = 0x7fffffffd6b8, _M_ios_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_tie = 0x0, _M_fill = 0 '\000', _M_fill_init = false, _M_streambuf = 0x7fffffffd588, _M_ctype = 0x7ffff7e157c0 <(anonymous namespace)::ctype_c>, _M_num_put = 0x7ffff7e15750 <(anonymous namespace)::num_put_c>, _M_num_get = 0x7ffff7e15760 <(anonymous namespace)::num_get_c>}, _vptr.basic_ostream = 0x7ffff7e0cf20 <vtable for std::basic_ofstream<char, std::char_traits<char> >+24>}, _M_filebuf = {<std::basic_streambuf<char, std::char_traits<char> >> = {_vptr.basic_streambuf = 0x7ffff7e0cd68 <vtable for std::basic_filebuf<char, std::char_traits<char> >+16>, _M_in_beg = 0x0, _M_in_cur = 0x0, _M_in_end = 0x0, _M_out_beg = 0x0, _M_out_cur = 0x0, _M_out_end = 0x0, _M_buf_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_lock = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, _M_file = {_M_cfile = 0x0, _M_cfile_created = false}, _M_mode = 0, _M_state_beg = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_cur = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_last = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_buf = 0x0, _M_buf_size = 8192, _M_buf_allocated = false, _M_reading = false, _M_writing = false, _M_pback = 0 '\000', _M_pback_cur_save = 0x0, _M_pback_end_save = 0x0, _M_pback_init = false, _M_codecvt = 0x7ffff7e15730 <(anonymous namespace)::codecvt_c>, _M_ext_buf = 0x0, _M_ext_buf_size = 0, _M_ext_next = 0x0, _M_ext_end = 0x0}}
        html_out = {<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {_vptr.ios_base = 0x7ffff7e0cf48 <vtable for std::basic_ofstream<char, std::char_traits<char> >+64>, static boolalpha = std::_S_boolalpha, static dec = std::_S_dec, static fixed = std::_S_fixed, static hex = std::_S_hex, static internal = std::_S_internal, static left = std::_S_left, static oct = std::_S_oct, static right = std::_S_right, static scientific = std::_S_scientific, static showbase = std::_S_showbase, static showpoint = std::_S_showpoint, static showpos = std::_S_showpos, static skipws = std::_S_skipws, static unitbuf = std::_S_unitbuf, static uppercase = std::_S_uppercase, static adjustfield = std::_S_adjustfield, static basefield = std::_S_basefield, static floatfield = std::_S_floatfield, static badbit = std::_S_badbit, static eofbit = std::_S_eofbit, static failbit = std::_S_failbit, static goodbit = std::_S_goodbit, static app = std::_S_app, static ate = std::_S_ate, static binary = std::_S_bin, static in = std::_S_in, static out = std::_S_out, static trunc = std::_S_trunc, static beg = std::_S_beg, static cur = std::_S_cur, static end = std::_S_end, _M_precision = 6, _M_width = 0, _M_flags = 4098, _M_exception = std::_S_goodbit, _M_streambuf_state = std::_S_goodbit, _M_callbacks = 0x0, _M_word_zero = {_M_pword = 0x0, _M_iword = 0}, _M_local_word = {{_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}}, _M_word_size = 8, _M_word = 0x7fffffffd4b8, _M_ios_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_tie = 0x0, _M_fill = 0 '\000', _M_fill_init = false, _M_streambuf = 0x7fffffffd388, _M_ctype = 0x7ffff7e157c0 <(anonymous namespace)::ctype_c>, _M_num_put = 0x7ffff7e15750 <(anonymous namespace)::num_put_c>, _M_num_get = 0x7ffff7e15760 <(anonymous namespace)::num_get_c>}, _vptr.basic_ostream = 0x7ffff7e0cf20 <vtable for std::basic_ofstream<char, std::char_traits<char> >+24>}, _M_filebuf = {<std::basic_streambuf<char, std::char_traits<char> >> = {_vptr.basic_streambuf = 0x7ffff7e0cd68 <vtable for std::basic_filebuf<char, std::char_traits<char> >+16>, _M_in_beg = 0x0, _M_in_cur = 0x0, _M_in_end = 0x0, _M_out_beg = 0x0, _M_out_cur = 0x0, _M_out_end = 0x0, _M_buf_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_lock = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, _M_file = {_M_cfile = 0x0, _M_cfile_created = false}, _M_mode = 0, _M_state_beg = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_cur = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_last = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_buf = 0x0, _M_buf_size = 8192, _M_buf_allocated = false, _M_reading = false, _M_writing = false, _M_pback = 0 '\000', _M_pback_cur_save = 0x0, _M_pback_end_save = 0x0, _M_pback_init = false, _M_codecvt = 0x7ffff7e15730 <(anonymous namespace)::codecvt_c>, _M_ext_buf = 0x0, _M_ext_buf_size = 0, _M_ext_next = 0x0, _M_ext_end = 0x0}}
        vkconfig_out = {<std::basic_ostream<char, std::char_traits<char> >> = {<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {_vptr.ios_base = 0x7ffff7e0cf48 <vtable for std::basic_ofstream<char, std::char_traits<char> >+64>, static boolalpha = std::_S_boolalpha, static dec = std::_S_dec, static fixed = std::_S_fixed, static hex = std::_S_hex, static internal = std::_S_internal, static left = std::_S_left, static oct = std::_S_oct, static right = std::_S_right, static scientific = std::_S_scientific, static showbase = std::_S_showbase, static showpoint = std::_S_showpoint, static showpos = std::_S_showpos, static skipws = std::_S_skipws, static unitbuf = std::_S_unitbuf, static uppercase = std::_S_uppercase, static adjustfield = std::_S_adjustfield, static basefield = std::_S_basefield, static floatfield = std::_S_floatfield, static badbit = std::_S_badbit, static eofbit = std::_S_eofbit, static failbit = std::_S_failbit, static goodbit = std::_S_goodbit, static app = std::_S_app, static ate = std::_S_ate, static binary = std::_S_bin, static in = std::_S_in, static out = std::_S_out, static trunc = std::_S_trunc, static beg = std::_S_beg, static cur = std::_S_cur, static end = std::_S_end, _M_precision = 6, _M_width = 0, _M_flags = 4098, _M_exception = std::_S_goodbit, _M_streambuf_state = std::_S_goodbit, _M_callbacks = 0x0, _M_word_zero = {_M_pword = 0x0, _M_iword = 0}, _M_local_word = {{_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}, {_M_pword = 0x0, _M_iword = 0}}, _M_word_size = 8, _M_word = 0x7fffffffd2b8, _M_ios_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_tie = 0x0, _M_fill = 0 '\000', _M_fill_init = false, _M_streambuf = 0x7fffffffd188, _M_ctype = 0x7ffff7e157c0 <(anonymous namespace)::ctype_c>, _M_num_put = 0x7ffff7e15750 <(anonymous namespace)::num_put_c>, _M_num_get = 0x7ffff7e15760 <(anonymous namespace)::num_get_c>}, _vptr.basic_ostream = 0x7ffff7e0cf20 <vtable for std::basic_ofstream<char, std::char_traits<char> >+24>}, _M_filebuf = {<std::basic_streambuf<char, std::char_traits<char> >> = {_vptr.basic_streambuf = 0x7ffff7e0cd68 <vtable for std::basic_filebuf<char, std::char_traits<char> >+16>, _M_in_beg = 0x0, _M_in_cur = 0x0, _M_in_end = 0x0, _M_out_beg = 0x0, _M_out_cur = 0x0, _M_out_end = 0x0, _M_buf_locale = {static none = 0, static ctype = 1, static numeric = 2, static collate = 4, static time = 8, static monetary = 16, static messages = 32, static all = 63, _M_impl = 0x7ffff7e15da0 <(anonymous namespace)::c_locale_impl>}}, _M_lock = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, _M_file = {_M_cfile = 0x0, _M_cfile_created = false}, _M_mode = 0, _M_state_beg = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_cur = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_state_last = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, _M_buf = 0x0, _M_buf_size = 8192, _M_buf_allocated = false, _M_reading = false, _M_writing = false, _M_pback = 0 '\000', _M_pback_cur_save = 0x0, _M_pback_end_save = 0x0, _M_pback_init = false, _M_codecvt = 0x7ffff7e15730 <(anonymous namespace)::codecvt_c>, _M_ext_buf = 0x0, _M_ext_buf_size = 0, _M_ext_next = 0x0, _M_ext_end = 0x0}}

Been digging into this a little more lately… it’s hard to say what’s valid here, but in going over the spec again it seems like we could avoid crashes by checking vkGetPhysicalDeviceSurfaceSupportKHR, which we’ve now made the very first VkSurfaceKHR call in FNA3D:

However, it still crashes instead of setting pSupported=VK_FALSE like you’d expect. Getting this function to work would at least give us a path to valid behavior without crashing, though I don’t think it’s mandatory to call this first before the other device functions involving the surface. The crash has become a major blocker for SDL moving to Wayland by default since it makes Vulkan completely unsafe to use:

Checked out 470.63.01 since it added support for KHR_wayland_surface, and it definitely fixes the hard crash! Now it fails more gracefully, though I don’t know if it’s supposed to do that. vulkaninfo doesn’t crash anymore, but does return a failure code after vkGetPhysicalDeviceSurfacePresentModesKHR fails. Rendering of course does not work since pSupported is now VK_FALSE.

It seems to work now with the new GBM backend in the 495.29.05 driver

I was unable to reproduce this with 495.46 and GNOME 41.3. It is using the GBM renderer:

Jan 13 16:47:04 flibitTower gnome-shell[2004]: Created gbm renderer for '/dev/dri/card0'

Vulkan still fails because vkGetPhysicalDeviceSurfaceSupportKHR still returns pSupported=VK_FALSE.

This is fixed with the 510.47.03 drivers!

1 Like