radv: only consider HiZ as valid after clears with the depth aspect

If it's a stencil-only clear it shouldn't be marked as valid because
HiZ wasn't updated by the clear.

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-10 10:42:50 +01:00 committed by Marge Bot
parent 8b993f46f5
commit cea75b3d95

View file

@ -542,7 +542,8 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer, VkClearDepthStencilV
enum radv_cmd_flush_bits flush_bits =
radv_clear_hiz(cmd_buffer, iview->image, &range, radv_gfx12_get_hiz_initial_value());
radv_update_hiz_metadata(cmd_buffer, iview->image, &range, true);
if (aspects & VK_IMAGE_ASPECT_DEPTH_BIT)
radv_update_hiz_metadata(cmd_buffer, iview->image, &range, true);
if (post_flush)
*post_flush |= flush_bits;