mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
radeonsi: Use util_writes_stencil() helper
Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8598>
This commit is contained in:
parent
04f8aa7c1e
commit
77398a9e41
1 changed files with 1 additions and 9 deletions
|
|
@ -1100,13 +1100,6 @@ static uint32_t si_translate_stencil_op(int s_op)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool si_dsa_writes_stencil(const struct pipe_stencil_state *s)
|
||||
{
|
||||
return s->enabled && s->writemask &&
|
||||
(s->fail_op != PIPE_STENCIL_OP_KEEP || s->zfail_op != PIPE_STENCIL_OP_KEEP ||
|
||||
s->zpass_op != PIPE_STENCIL_OP_KEEP);
|
||||
}
|
||||
|
||||
static bool si_order_invariant_stencil_op(enum pipe_stencil_op op)
|
||||
{
|
||||
/* REPLACE is normally order invariant, except when the stencil
|
||||
|
|
@ -1194,8 +1187,7 @@ static void *si_create_dsa_state(struct pipe_context *ctx,
|
|||
dsa->depth_write_enabled = state->depth_enabled && state->depth_writemask;
|
||||
dsa->stencil_enabled = state->stencil[0].enabled;
|
||||
dsa->stencil_write_enabled =
|
||||
state->stencil[0].enabled &&
|
||||
(si_dsa_writes_stencil(&state->stencil[0]) || si_dsa_writes_stencil(&state->stencil[1]));
|
||||
(util_writes_stencil(&state->stencil[0]) || util_writes_stencil(&state->stencil[1]));
|
||||
dsa->db_can_write = dsa->depth_write_enabled || dsa->stencil_write_enabled;
|
||||
|
||||
bool zfunc_is_ordered =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue