Forums - Vulkan driver bug when stencil+discard is used without depth. Solid repro included

1 post / 0 new
Vulkan driver bug when stencil+discard is used without depth. Solid repro included
Join Date: 13 Feb 13
Location: Stockholm
Posts: 1
Posted: Thu, 2018-12-20 11:51


There's a bug in Vulkan drivers for Adreno 500+ (not sure exactly which model is the first affected) where if you draw with a stencil writing mode set, like VK_COMPARE_ALWAYS and VK_STENCIL_OP_REPLACE, and discard some pixels in the fragment shaders, the stencil value will get written even to the pixels that should have been discarded.

I have a very easy repro.

Install this APK:

Or any later than v1.7.5-308 from the same buildbot. 

Start it, make sure that Backend is set to Vulkan in graphics settings, and go to Settings/Tools/Developer Tools/GPU Driver Test.

You'll find that some of the green text doesn't print correctly on Adreno 540+ (and possibly some earlier models) . This is a sure sign of the bug. On all other GPU families, all the green text prints correctly.

A fix would be nice.




(This is really the same bug as , just now with a repro and simpler setup)

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.