broadcom/compiler: Set up passthrough Z when doing FS discards.
authorEric Anholt <eric@anholt.net>
Thu, 28 Sep 2017 17:37:02 +0000 (10:37 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 10 Oct 2017 18:42:05 +0000 (11:42 -0700)
commit732a3a72cb8b5c78e95eee47572701b3f6055c19
tree5953561d0a1a8843e94a020fd87ecc4cf96bf895
parent4c4fbab345c164284e62e5e2587382785ade1750
broadcom/compiler: Set up passthrough Z when doing FS discards.

In order to keep early-Z from writing early in a discard shader, you need
to set the "modifies Z" bit in the shader state (which the new
prog_data.discards will indicate).  Then, in the shader we do a TLB write
to make Z passthrough happen (the QPU result is ignored, so we use a NULL
source).
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c