<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 - [CM246] Flickering with multiple draw calls within the same graphics pipeline if a compute pipeline is present"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111267">111267</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[CM246] Flickering with multiple draw calls within the same graphics pipeline if a compute pipeline is present
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Drivers/Vulkan/intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dragly@cognite.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jason@jlekstrand.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=144918" name="attach_144918" title="Zip file containing RenderDoc captures, a vktrace and two screenshots">attachment 144918</a> <a href="attachment.cgi?id=144918&action=edit" title="Zip file containing RenderDoc captures, a vktrace and two screenshots">[details]</a></span>
Zip file containing RenderDoc captures, a vktrace and two screenshots

During development of a Vulkan application in Rust, we have identified what
appears to be a graphics driver bug. The minimal example that reproduces this
is a simple application that does the following each frame:

- Start a compute pass
- Set the compute pipeline
- Dispatch the compute pass, which can even be an empty shader
- Start a render pass
- Set the render pipeline
- Draw a simple geometry with many instances (200k)
- Draw a simple geometry with two instances

The observed behavior is flickering of the two instances that are rendered last
between frames.

A workaround is to set the pipeline again after the first draw call. This will
remove the flickering.

I have attached two captures from RenderDoc of a good and a bad frame, where
the bad frame is missing the geometry (which causes the flickering). However,
upon loading both frames in RenderDoc again, the geometry is always shown -
indicating a possible driver bug.

I have also attached a vktrace, which on an affected machine reproduces the
flickering during a vkreplay. The flickering will also vary between replays.

Finally, I have attached two screenshots that illustrate the difference between
good and bad frames.

Source code to reproduce the issue can be found in the following branch of
gfx-rs/wgpu-rs:

<a href="https://github.com/dragly/wgpu-rs/tree/dragly/comp-issue">https://github.com/dragly/wgpu-rs/tree/dragly/comp-issue</a>

It can be tested by running

<span class="quote">> cargo run --features vulkan --example cube</span >

System information:

Machine: Dell XPS 15 9570
Chipset: CM246
OS/Distro: KDE Neon 5.16.4 (based on Ubuntu 18.04)

Output of version information commands:

<span class="quote">> inxi -G -c0</span >
Graphics:  Card-1: Intel Device 3e9b
           Card-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile]
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded:
fbdev,vesa)
           Resolution: <a href="mailto:3840x2160@60.00hz">3840x2160@60.00hz</a>, <a href="mailto:2560x1440@59.95hz">2560x1440@59.95hz</a>
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8
GT2)
           version: 4.5 Mesa 19.2.0-devel (git-3a22a8b 2019-07-31
bionic-oibaf-ppa)

<span class="quote">> pkg-config --modversion libdrm</span >
2.4.99

<span class="quote">> uname -r</span >
4.15.0-55-generic

Note: I am currently running a more recent set of drivers to see if an update
would help, but the issue is also there for the default drivers that come with
Ubuntu 18.04.</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>