broadcom/compiler: Don't forget the discard state on TLB Z writes.
authorEric Anholt <eric@anholt.net>
Thu, 28 Sep 2017 18:06:53 +0000 (11:06 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 10 Oct 2017 18:42:05 +0000 (11:42 -0700)
We don't want to write Z for discarded fragments.

src/broadcom/compiler/nir_to_vir.c

index af9f8485c13dbe2ae9d6ad7bbd30ffc7c4b5d348..1c9a9a9746c7d018bae2198774bc0e64c5e77e24 100644 (file)
@@ -1031,6 +1031,7 @@ emit_frag_end(struct v3d_compile *c)
                 struct qinst *inst = vir_MOV_dest(c,
                                                   vir_reg(QFILE_TLBU, 0),
                                                   c->outputs[c->output_position_index]);
+                vir_set_cond(inst, discard_cond);
 
                 inst->src[vir_get_implicit_uniform_src(inst)] =
                         vir_uniform_ui(c,