radv: ignore the GFX12 HiZ WA for internal blits

To update HiZ properly during depth/stencil clears. There is a risk
but it's very minimal and it's also much better for performance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40176>
This commit is contained in:
Samuel Pitoiset 2026-03-03 14:31:51 +01:00 committed by Marge Bot
parent 3a503b4898
commit 8b993f46f5

View file

@ -5713,6 +5713,15 @@ radv_gfx12_emit_hiz_wa_full(struct radv_cmd_buffer *cmd_buffer)
if (!iview || !radv_image_has_hiz_metadata(iview->image))
return;
/* Ignore the HiZ workaround for internal blits to properly update HiZ. It's required for dynamic
* rendering depth/stencil clears because the framebuffer isn't re-emitted and HiZ might have
* been disabled previously. The risk should be minimal and it's much better for performance.
*/
if (cmd_buffer->state.meta.inside_meta_op) {
radv_gfx12_override_hiz_enable(cmd_buffer, true);
return;
}
struct vk_depth_stencil_state ds = d->vk.ds;
vk_optimize_depth_stencil_state(&ds, render->ds_att_aspects, true);