zink, kopper, nv: assert on close of glxgears
System information
- OS: arch
- GPU: gtx1070 (nvidia proprietary 510.60 drivers)
- Kernel version:
5.17.1-arch1-1
- Mesa version: commit f2262228
- Xserver version (if applicable):
1.21.1.3
- Desktop manager and compositor: i3
Describe the issue
Starting glxgears via zink with kopper runs and renders but upon closing the window things go wrong and there is an assert in the zink drivers, or a segfault when compiled without asserts.
Starting glxgears with __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json glxgears
Vulkan validation complaints and Zink output:
VUID-VkDeviceCreateInfo-pNext-02829(ERROR / SPEC): msgNum: 222296132 - Validation Error: [ VUID-VkDeviceCreateInfo-pNext-02829 ] Object 0: handle = 0x55555576c880, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd3ff844 | If the pNext chain includes a VkPhysicalDeviceVulkan11Features structure, then it must not include a VkPhysicalDevice16BitStorageFeatures, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceSamplerYcbcrConversionFeatures, or VkPhysicalDeviceShaderDrawParametersFeatures structure The Vulkan spec states: If the pNext chain includes a VkPhysicalDeviceVulkan11Features structure, then it must not include a VkPhysicalDevice16BitStorageFeatures, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceSamplerYcbcrConversionFeatures, or VkPhysicalDeviceShaderDrawParametersFeatures structure (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-02829)
Objects: 1
[0] 0x55555576c880, type: 1, name: NULL
VUID-VkDeviceCreateInfo-pNext-02830(ERROR / SPEC): msgNum: 555635515 - Validation Error: [ VUID-VkDeviceCreateInfo-pNext-02830 ] Object 0: handle = 0x55555576c880, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x211e533b | If the pNext chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceBufferDeviceAddressFeatures, or VkPhysicalDeviceVulkanMemoryModelFeatures structure The Vulkan spec states: If the pNext chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceBufferDeviceAddressFeatures, or VkPhysicalDeviceVulkanMemoryModelFeatures structure (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-02830)
Objects: 1
[0] 0x55555576c880, type: 1, name: NULL
... (Window renders during this time)
VUID-vkAcquireNextImageKHR-swapchain-01802(ERROR / SPEC): msgNum: 1050126472 - Validation Error: [ VUID-vkAcquireNextImageKHR-swapchain-01802 ] Object 0: handle = 0xbd60bd0000000076, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0x3e97a888 | vkAcquireNextImageKHR: Application has already previously acquired 1 image from swapchain. Only 1 is available to be acquired using a timeout of UINT64_MAX (given the swapchain has 2, and VkSurfaceCapabilitiesKHR::minImageCount is 2). The Vulkan spec states: If the number of currently acquired images is greater than the difference between the number of images in swapchain and the value of VkSurfaceCapabilitiesKHR::minImageCount as returned by a call to vkGetPhysicalDeviceSurfaceCapabilities2KHR with the surface used to create swapchain, timeout must not be UINT64_MAX (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-01802)
Objects: 1
[0] 0xbd60bd0000000076, type: 1000001000, name: NULL
KILL 0x555556454440
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 1303270965 - Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x555556364d80, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[1].pCommandBuffers[0] command buffer VkCommandBuffer 0x555556364d80[] expects VkImage 0x68078f000000cbce[] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR--instead, current layout is VK_IMAGE_LAYOUT_UNDEFINED.
Objects: 1
[0] 0x555556364d80, type: 6, name: NULL
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 1303270965 - Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x555556364d80, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[1].pCommandBuffers[0] command buffer VkCommandBuffer 0x555556364d80[] expects VkImage 0xb82de40000000077[] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
Objects: 1
[0] 0x555556364d80, type: 6, name: NULL
glxgears: ../mesa/src/gallium/drivers/zink/zink_kopper.c:684: zink_kopper_update: Assertion `res->obj->dt' failed.
Backtrace:
#0 0x00007ffff7b5d34c in __pthread_kill_implementation () from /usr/lib/libc.so.6
#1 0x00007ffff7b104b8 in raise () from /usr/lib/libc.so.6
#2 0x00007ffff7afa534 in abort () from /usr/lib/libc.so.6
#3 0x00007ffff7afa45c in __assert_fail_base.cold () from /usr/lib/libc.so.6
#4 0x00007ffff7b09116 in __assert_fail () from /usr/lib/libc.so.6
#5 0x00007ffff65bc13c in zink_kopper_update (pscreen=<optimized out>, pres=<optimized out>, w=<optimized out>, h=<optimized out>)
at ../mesa/src/gallium/drivers/zink/zink_kopper.c:684
#6 zink_kopper_update (h=0x55555645389c, w=0x555556453898, pres=<optimized out>, pscreen=0x555555615730)
at ../mesa/src/gallium/drivers/zink/zink_kopper.c:680
#7 kopper_update_drawable_info (drawable=<optimized out>) at ../mesa/src/gallium/frontends/dri/kopper.c:371
#8 0x00007ffff65bd947 in dri_st_framebuffer_validate (stctx=<optimized out>, stfbi=<optimized out>, statts=0x555556454158, count=2,
out=0x7fffffffe1b0) at ../mesa/src/gallium/frontends/dri/dri_drawable.c:80
#9 0x00007ffff678bc12 in st_framebuffer_validate (stfb=stfb@entry=0x555556453d00, st=st@entry=0x55555643e370)
at ../mesa/src/mesa/state_tracker/st_manager.c:238
#10 0x00007ffff6790f73 in st_manager_validate_framebuffers (st=0x55555643e370) at ../mesa/src/mesa/state_tracker/st_manager.c:1333
#11 0x00007ffff6729a78 in st_validate_state (st=0x55555643e370, pipeline=ST_PIPELINE_CLEAR)
at ../mesa/src/mesa/state_tracker/st_atom.c:231
#12 0x00007ffff69376d2 in st_Clear (ctx=0x5555563e43a0, mask=18) at ../mesa/src/mesa/state_tracker/st_cb_clear.c:438
#13 0x0000555555556c2f in ?? ()
#14 0x00005555555568b6 in ?? ()
#15 0x00007ffff7afb310 in __libc_start_call_main () from /usr/lib/libc.so.6
#16 0x00007ffff7afb3c1 in __libc_start_main_impl () from /usr/lib/libc.so.6
Regression
Not a regression.