radv: rework the TC-compat HTILE hardware bug with COND_EXEC

Graphics / Mesa 3D Graphics Library / Mesa - Samuel Pitoiset [gmail.com] - 5 December 2018 08:26 EST

After investigating on this, it appears that COND_WRITE doesn't work correctly in some situations. I don't know exactly why does it fail to update DB_Z_INFO.ZRANGE_PRECISION, but as AMDVLK also uses COND_EXEC I think there is a reason.

Now the driver stores a new metadata value in order to reflect the last fast depth clear state. If a TC-compat HTILE is fast cleared with 0.0f, we have to update ZRANGE_PRECISION to 0 in order to work around that hardware bug.

This fixes rendering issues with The Forest and DXVK and doesn't seem to introduce any regressions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108914 Fixes: 68dead112e7 ("radv: update the ZRANGE_PRECISION value for the TC-compat bug")

824cfc1ee5 radv: rework the TC-compat HTILE hardware bug with COND_EXEC
src/amd/vulkan/radv_cmd_buffer.c | 91 ++++++++++++++++++++++++++++------------
src/amd/vulkan/radv_image.c | 10 ++++-
src/amd/vulkan/radv_private.h | 8 ++++
3 files changed, 81 insertions(+), 28 deletions(-)

Upstream: cgit.freedesktop.org


  • Share