From 836a22d1a26433ceeeea6b63b529fe1191ef04c9 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 (cherry picked from commit 5d22f307d516f8e54b9536034ac83df648b4ebfa) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/anv_blorp.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4d81f6f5c66..01cf6476841 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1024,7 +1024,7 @@ "description": "anv: don't try to fast clear D/S with multiview", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e488773b29d971a2f24904465cf027c9f4650a94", "notes": null diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index d9a8a36e4b4..284a4c9ad60 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -2025,7 +2025,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,