zink: set depth dynamic state values unconditionally

spec requires the state values to be set if the dynamic state is
enabled regardless of whether they will take effect

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22827>
(cherry picked from commit d5ceb4770b)
This commit is contained in:
Mike Blumenkrantz 2023-05-03 10:39:10 -04:00 committed by Eric Engestrom
parent 6d9fdc7faa
commit 0c6903846f
2 changed files with 3 additions and 3 deletions

View file

@ -805,7 +805,7 @@
"description": "zink: set depth dynamic state values unconditionally",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -583,8 +583,7 @@ zink_draw(struct pipe_context *pctx,
dsa_state->hw_state.min_depth_bounds,
dsa_state->hw_state.max_depth_bounds);
VKCTX(CmdSetDepthTestEnableEXT)(batch->state->cmdbuf, dsa_state->hw_state.depth_test);
if (dsa_state->hw_state.depth_test)
VKCTX(CmdSetDepthCompareOpEXT)(batch->state->cmdbuf, dsa_state->hw_state.depth_compare_op);
VKCTX(CmdSetDepthCompareOpEXT)(batch->state->cmdbuf, dsa_state->hw_state.depth_compare_op);
VKCTX(CmdSetDepthWriteEnableEXT)(batch->state->cmdbuf, dsa_state->hw_state.depth_write);
VKCTX(CmdSetStencilTestEnableEXT)(batch->state->cmdbuf, dsa_state->hw_state.stencil_test);
if (dsa_state->hw_state.stencil_test) {
@ -610,6 +609,7 @@ zink_draw(struct pipe_context *pctx,
} else {
VKCTX(CmdSetStencilWriteMask)(batch->state->cmdbuf, VK_STENCIL_FACE_FRONT_AND_BACK, dsa_state->hw_state.stencil_front.writeMask);
VKCTX(CmdSetStencilCompareMask)(batch->state->cmdbuf, VK_STENCIL_FACE_FRONT_AND_BACK, dsa_state->hw_state.stencil_front.compareMask);
VKCTX(CmdSetStencilOpEXT)(batch->state->cmdbuf, VK_STENCIL_FACE_FRONT_AND_BACK, VK_STENCIL_OP_KEEP, VK_STENCIL_OP_KEEP, VK_STENCIL_OP_KEEP, VK_COMPARE_OP_ALWAYS);
}
}
ctx->dsa_state_changed = false;