Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20499 Discussions

Vulkan depth test fails when depth buffer write is disabled and gl_FragDepth is updated in fragment shader

Flyinghead
Beginner
1,565 Views

System Setup Information:
-----------------------------------------

System Used: Intel NUC7i5BN
CPU SKU: i5
GPU SKU: Intel Iris Plus Graphics 640
Processor Line: i5-7260U
Graphics Driver Version: 26.20.100.7212
Operating System: Windows 10 Home
OS Version: 10.0.17763
API: Vulkan
Occurs on non-Intel GPUs?: No (tested on NVidia, AMD, Mali, Adreno)

Steps to Reproduce:
-------------------------------

See sample code to reproduce the issue at https://github.com/flyinghead/PracticalVulkan

1. Disable depth buffer write
2. Set z coordinate of vertices in the vertex shader outside the [0,1] range
3. Update gl_FragDepth in the fragment shader to a value within [0,1]

Under these conditions, geometry isn't drawn.

Enabling depth buffer writes makes geometry appear.

0 Kudos
4 Replies
Slawomir_C_Intel
Employee
1,563 Views

Hello!

This is Sławomir from the graphics software engineering team. 

 

Thank you for your report!   Yes, you are right, there is a bug in handling FragDepth shader output if depthWrite state is disabled.

The issue was reproduced and the team is now working on a fix.

 

 

0 Kudos
Flyinghead
Beginner
1,561 Views

Hi Slawomir,

Thank you for this update. Obviously this is great news!

Thanks again

 

0 Kudos
Koury__Shannon
Beginner
1,563 Views

THanks 

0 Kudos
Koury__Shannon
Beginner
1,561 Views

Thanks

0 Kudos
Reply