<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Vulkan spec break: VkCommandBufferInheritanceInfo.framebuffer is NOT optional"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110810">110810</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Vulkan spec break: VkCommandBufferInheritanceInfo.framebuffer is NOT optional
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sebastian@sydow.homeip.net
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=144406" name="attach_144406" title="Renderdoc capture, see How to reproduce 2">attachment 144406</a> <a href="attachment.cgi?id=144406&action=edit" title="Renderdoc capture, see How to reproduce 2">[details]</a></span>
Renderdoc capture, see How to reproduce 2

In the Vulkan spec about VkCommandBufferInheritanceInfo it is stated that:
(<a href="https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkCommandBufferInheritanceInfo.html">https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkCommandBufferInheritanceInfo.html</a>)

```
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:
<a href="https://github.com/SaschaWillems/Vulkan.git">https://github.com/SaschaWillems/Vulkan.git</a>
- 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
<a href="https://renderdoc.org/">https://renderdoc.org/</a>
- 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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>