kk: Update dynamic depth stencil state regardless of set attachments.

Even if the attachments are not defined, we still need to update the state to reflect
changes like depth test being turned off, etc. The state compile itself will take into
account which attachments are set and appropriately configure the Metal depth-stencil
state.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41119>
This commit is contained in:
squidbus 2026-04-22 18:22:23 -07:00 committed by Marge Bot
parent 40fa195cd0
commit 378974588e

View file

@ -660,8 +660,6 @@ kk_flush_pipeline(struct kk_cmd_buffer *cmd)
/* Depth/stencil state may be dynamic, handle it as part of the pipeline. */
if (cmd->state.gfx.is_depth_stencil_dynamic &&
(cmd->state.gfx.render.depth_att.vk_format != VK_FORMAT_UNDEFINED ||
cmd->state.gfx.render.stencil_att.vk_format != VK_FORMAT_UNDEFINED) &&
(IS_DIRTY(DS_DEPTH_TEST_ENABLE) | IS_DIRTY(DS_DEPTH_WRITE_ENABLE) |
IS_DIRTY(DS_DEPTH_COMPARE_OP) | IS_DIRTY(DS_STENCIL_TEST_ENABLE) |
IS_DIRTY(DS_STENCIL_OP) | IS_DIRTY(DS_STENCIL_COMPARE_MASK) |