This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Questions about vulkan depth testing on mali

Hi mali experts, we have tried the pre z pass on mali gpu and found that on OpenGL it's working correctly but on vulkan there are some z-fighting like artifacts.

After some investigation, it seems on vulkan, even the depth of base pass matches the depth in pre-z pass, and the depth function is set to EQUAL, the depth testing still fail:

When we checked the vertex shader in render doc, it seems the gl_Position variable already has a invariant qualifier:

Also by default we use D24S8 format for depth-stencil attachement, after we change it to 32bit depth attachment, there are even more z-fighting like artifacts, so it seems like this artifacts is not caused by insufficient precision of the depth value.

Besides, we have tested the same scene with OpenGL and Vulkan on same mali devices( GLES: ARM, Mali-G710 MC10, OpenGL ES 3.2 v1.r32p1-01eac0.55ce131ae332d8a4a1eb9e0a95da701 ):

For the same period of time, it seems vulkan's early z and fpk are not working as efficient as opengl.

Any suggestions? Thanks in advance!

Parents
  • For the shader issues, can you share a matching pair of shaders (i.e. depth pass + main pass) where you expect the depth to match, with instructions for how you are generating the SPIR-V for them? If you can't share these publicly you can email "developer <at> arm <dot> com".

    For the FPK issues, it will be hard to tell what's going on without seeing an APK. Happy to look if you can share via the above.

    Cheers, 
    Pete

Reply
  • For the shader issues, can you share a matching pair of shaders (i.e. depth pass + main pass) where you expect the depth to match, with instructions for how you are generating the SPIR-V for them? If you can't share these publicly you can email "developer <at> arm <dot> com".

    For the FPK issues, it will be hard to tell what's going on without seeing an APK. Happy to look if you can share via the above.

    Cheers, 
    Pete

Children