radv: update the ZRANGE_PRECISION value for the TC-compat bug

Graphics / Mesa 3D Graphics Library / Mesa - Samuel Pitoiset [gmail.com] - 14 June 2018 09:38 EDT

On GFX8+, there is a bug that affects TC-compatible depth surfaces when the ZRange is not reset after LateZ kills pixels.

The workaround is to always set DB_Z_INFO.ZRANGE_PRECISION to match the last fast clear value. Because the value is set to 1 by default, we only need to update it when clearing Z to 0.0.

We also need to set the depth clear regs and to update ZRANGE_PRECISION when initializing a TC-compat depth image to 0.

Original patch from James Legg.

This fixes random CTS fails with dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.input.*

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105396 CC:

68dead112e radv: update the ZRANGE_PRECISION value for the TC-compat bug
src/amd/vulkan/radv_cmd_buffer.c | 108 +++++++++++++++++++++++++++++++++++++++
1 file changed, 108 insertions(+)

Upstream: cgit.freedesktop.org


  • Share