From 5d22f307d516f8e54b9536034ac83df648b4ebfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Wed, 4 Mar 2026 15:14:28 -0800 Subject: [PATCH] anv: don't try to fast clear D/S with multiview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If multiview is enabled on the render pass, baseLayer and layerCount will be 0 and 1 respectively and throw us off. We can still fast clear if view_mask == 1, but anything else hits the BLORP_BATCH_NO_EMIT_DEPTH_STENCIL restriction. Fixes: e488773b29d ("anv: Fast clear depth/stencil surface in vkCmdClearAttachments") Signed-off-by: Iván Briano Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/anv_blorp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 091223ce22a..324fe7aab4e 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -2022,7 +2022,8 @@ can_hiz_clear_att(struct anv_cmd_buffer *cmd_buffer, * clear the first slice of the currently configured depth/stencil view. */ assert(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL); - if (pRects[0].layerCount > 1 || pRects[0].baseArrayLayer > 0) + if (cmd_buffer->state.gfx.view_mask > 1 || + pRects[0].layerCount > 1 || pRects[0].baseArrayLayer > 0) return false; return anv_can_hiz_clear_image(cmd_buffer, ds_att->iview->image,