anv: don't try to fast clear D/S with multiview
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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: e488773b29 ("anv: Fast clear depth/stencil surface in vkCmdClearAttachments")

Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40229>
This commit is contained in:
Iván Briano 2026-03-04 15:14:28 -08:00 committed by Marge Bot
parent 6936282bd3
commit 5d22f307d5

View file

@ -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,