Commit 33a6c01e authored by Marek Vasut's avatar Marek Vasut

etnaviv: Fix rework ZSA into a derived state

In case the stencil is modified, it is also enabled. That was the
behavior of the original code, which was also the correct behavior,
so reinstate the behavior.

Fixes dEQP-GLES2.functional.fragment_ops.depth_stencil.* on STM32MP1 GC400T.

Fixes: b29fe26d ("etnaviv: rework ZSA into a derived state")
Reviewed-by: Christian Gmeiner's avatarChristian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
Part-of: <mesa/mesa!8174>
parent 8bec23a9
......@@ -77,11 +77,13 @@ etna_zsa_state_create(struct pipe_context *pctx,
if (so->stencil[0].fail_op != PIPE_STENCIL_OP_KEEP ||
so->stencil[0].zfail_op != PIPE_STENCIL_OP_KEEP ||
so->stencil[0].zpass_op != PIPE_STENCIL_OP_KEEP) {
cs->stencil_enabled = 1;
cs->stencil_modified = 1;
} else if (so->stencil[1].enabled) {
if (so->stencil[1].fail_op != PIPE_STENCIL_OP_KEEP ||
so->stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP ||
so->stencil[1].zpass_op != PIPE_STENCIL_OP_KEEP) {
cs->stencil_enabled = 1;
cs->stencil_modified = 1;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment