Created attachment 144918 [details]
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:
It can be tested by running
> cargo run --features vulkan --example cube
Machine: Dell XPS 15 9570
OS/Distro: KDE Neon 5.16.4 (based on Ubuntu 18.04)
Output of version information commands:
> inxi -G -c0
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: email@example.com, firstname.lastname@example.org
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)
> pkg-config --modversion libdrm
> uname -r
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.
*** This bug has been marked as a duplicate of bug 109630 ***