From cc7db1fc537ea81310160be78716736544a51a9c Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Fri, 3 Dec 2021 10:44:14 +0100 Subject: [PATCH] broadcom/compiler: improve documentation for Z writes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/compiler/nir_to_vir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 6e645204b79..e93e754c51a 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1707,10 +1707,12 @@ emit_frag_end(struct v3d_compile *c) c->s->info.fs.early_fragment_tests = true; } - /* By default, the FEP will perform early fragment tests. This can be - * disabled when needed (Z writes from shader, discards, etc), by - * setting c->writes_z to True, in which case, the QPUs need to write - * the Z value. + /* By default, Z buffer writes are implicit using the Z values produced + * from FEP (Z value produced from rasterization). When this is not + * desirable (shader writes Z explicitly, has discards, etc) we need + * to let the hardware know by setting c->writes_z to true, in which + * case we always need to write a Z value from the QPU, even if it is + * just the passthrough Z value produced from FEP. * * Also, from the V3D 4.2 spec: *