etnaviv: fix depth writes without testing

Depth writes are only gated by the depth writemask. The state object
member depth_enabled must only affect depth testing.

Fixes: b29fe26d43 ("etnaviv: rework ZSA into a derived state")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28403>
This commit is contained in:
Lucas Stach 2024-03-26 18:11:56 +01:00 committed by Marge Bot
parent 2b2f74ab35
commit 3a10d1be0e

View file

@ -48,7 +48,7 @@ etna_zsa_state_create(struct pipe_context *pctx,
cs->base = *so;
cs->z_test_enabled = so->depth_enabled && so->depth_func != PIPE_FUNC_ALWAYS;
cs->z_write_enabled = so->depth_enabled && so->depth_writemask;
cs->z_write_enabled = so->depth_writemask;
/* XXX does stencil[0] / stencil[1] order depend on rs->front_ccw? */