From: Juan A. Suarez Romero Date: Wed, 22 Mar 2023 18:05:17 +0000 (+0100) Subject: v3d: fix condition for EZ disabling when stencil on X-Git-Tag: upstream/23.3.3~11239 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2413cb2965928f8927ae8d3d4d4d90fc64e034f8;p=platform%2Fupstream%2Fmesa.git v3d: fix condition for EZ disabling when stencil on When stencil is enabled and it isn't non-op, Early-Z must be disabled. The condition that checks this for stencil[0] is correct, but the one for stencil[1] is wrong: it uses an "and" instead of "or" condition. This affects dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.14 Signed-off-by: Juan A. Suarez Romero Reviewed-by: Iago Toral Quiroga Part-of: --- diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index b740b21..56d2769 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -208,7 +208,7 @@ v3d_create_depth_stencil_alpha_state(struct pipe_context *pctx, (cso->stencil[0].zfail_op != PIPE_STENCIL_OP_KEEP || cso->stencil[0].func != PIPE_FUNC_ALWAYS || (cso->stencil[1].enabled && - (cso->stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP && + (cso->stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP || cso->stencil[1].func != PIPE_FUNC_ALWAYS)))) { so->ez_state = V3D_EZ_DISABLED; }