Vulkan spec break: VkCommandBufferInheritanceInfo.framebuffer is NOT optional
Submitted by Sebastian Sydow
Assigned to mes..@..op.org
Link to original bug (#110810)
Description
Created attachment 144406 Renderdoc capture, see How to reproduce 2
In the Vulkan spec about VkCommandBufferInheritanceInfo it is stated that: (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkCommandBufferInheritanceInfo.html)
framebuffer optionally refers to the VkFramebuffer object that the VkCommandBuffer will be rendering to if it is executed within a render pass instance. It can be VK_NULL_HANDLE if the framebuffer is not known, or if the VkCommandBuffer will not be executed within a render pass instance.
VkCommandBufferInheritanceInfo.framebuffer is however NOT optional on Intel and AMD Mesa Vulkan drivers.
Effects on various drivers I could test:
- Intel HD 630 18.2.8: SEGFAULT
- Intel HD 630 19.0.1: works?
- AMD Vega m GL 18.2.8: blank screen
- AMD Vega m GL 19.0.1: blank screen
- AMD Vega 64 18.2.8: blank screen
- AMD Vega 64 19.0.1: blank screen I could only reproduce this behaviour on Mesa drivers, not with Windows and AMD drivers.
How to reproduce 1:
- Clone Sascha Willems Vulkan Examples and Demos repo: https://github.com/SaschaWillems/Vulkan.git
- open examples/multithreading/multithreading.cpp
- go to line 411 and comment out:
// Secondary command buffer also use the currently active framebuffer
inheritanceInfo.framebuffer = frameBuffer;
- this will cause framebuffer to be a nullptr, aka optional
How to reproduce 2:
- get RenderDoc https://renderdoc.org/
- open the attached file "Mesa Bug.rdc"
- in the middle select the texture viewer
- on the top in the timeline open up the two gray bars
- on the buttom inside the timeline chart you should see two triangles. These are the draws. Selecting them will show you the expected result.
- selecting the block afterwards will make the result disappear.
- I'm expecting that RenderDoc draws the currently selected draw separately on top of all previous draws
Attachment 144406, "Renderdoc capture, see How to reproduce 2":
Mesa_Bug.rdc
Version: 19.1