From ec09ac150179502d3af22732a6fbd88abff752b2 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 14 Jul 2025 15:26:16 +0200 Subject: [PATCH] radv: switch to the full HiZ workaround by default on GFX12 The full HiZ workaround is the only one that fixes the issue reliably. Sadly, the performance results are mixed and sometimes it hurts. To maintain performance, RADV will opt-in by selecting which workarounds to apply from drirc. As we can't know the full list of games that will be affected by a potential performance regression, users are encouraged to try with RADV_GFX12_HIZ_WA (see Mesa documentation for more explanations). Signed-off-by: Samuel Pitoiset Part-of: --- docs/envvars.rst | 3 ++- src/amd/vulkan/radv_physical_device.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index 9b200f8756a..1ecac8ed2c5 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1658,9 +1658,10 @@ RADV driver environment variables no HiZ workaround is enabled, use at your own risk but optimal for performance ``partial`` mitigate the issue partially, potentially risky but performance should be - mostly optimal (default value) + mostly optimal ``full`` mitigate the issue completely, no risk but performance might be decreased + (default value) RadeonSI driver environment variables ------------------------------------- diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 219b2e9c7bd..b6095498a19 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -2315,7 +2315,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm if (pdev->info.gfx_level == GFX12) { const char *gfx12_hiz_wa_str = instance->drirc.performance.gfx12_hiz_wa; - pdev->gfx12_hiz_wa = RADV_GFX12_HIZ_WA_PARTIAL; /* Default */ + pdev->gfx12_hiz_wa = RADV_GFX12_HIZ_WA_FULL; /* Default */ if (strlen(gfx12_hiz_wa_str) > 0) { if (!strcmp(gfx12_hiz_wa_str, "disabled")) {