etnaviv: fix stencil operation without Z write
authorLucas Stach <l.stach@pengutronix.de>
Wed, 23 Nov 2022 10:52:44 +0000 (11:52 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Nov 2022 21:23:01 +0000 (21:23 +0000)
commit4449b5a2714c463a4250bc3a1847430212f04de6
tree022d0439176a719b975b0bc0483f85500d6f2d4a
parentea3f73ba85be46dcb9712b43fef52b09cfae643b
etnaviv: fix stencil operation without Z write

If stencil operations are enabled, we either need the full early or
late ZS stage, even if Z writes are disabled. Empirically the early
stage properly supports stencil operations, just need to be careful to
not mix early tests with late writes when stencil operations modify
the depth buffer.

Fixes piglit tests:
spec@!opengl 1.1@depthstencil-default_fb-copypixels
spec@!opengl 1.1@depthstencil-default_fb-readpixels
spec@!opengl 1.1@depthstencil-default_fb-blit

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19958>
src/gallium/drivers/etnaviv/etnaviv_state.c