etnaviv: Fix depth stencil ops on GC880/GC2000
authorMarek Vasut <marex@denx.de>
Mon, 9 Mar 2020 03:14:26 +0000 (04:14 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 24 Apr 2020 19:22:55 +0000 (21:22 +0200)
commitc8ccd63911dcec731d64c72a40ec6a3afe38eaa1
tree1d818b3e928ecb11721a9401d70ff7b53ed3a1ee
parent5c5c2dd48fe0910dc79d3187bed99a52b5ed2848
etnaviv: Fix depth stencil ops on GC880/GC2000

This patch fixes depth stencil ops on MX6S GC880 and MX6Q GC2000.
The following dEQPs now pass:
  dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_depth_funcs.*
  dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_ops.*
which is roughly 600 fixed dEQP tests.

The problem is that if the front-facing stencil has a value mask 0x00 and
the back-facing stencil has some non-zero value mask, then the stencil part
of the depth stencil buffer is written with 0x00 unconditionally. The blob
replicates the value mask of the back-facing stencil to the value mask of
the front-facing stencil to achieve correct rendering, replicate the same
behavior here.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4275>
src/gallium/drivers/etnaviv/etnaviv_zsa.c