Mesa (main): broadcom/compiler: improve documentation for Z writes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 3 11:14:25 UTC 2021
Module: Mesa
Branch: main
Commit: cc7db1fc537ea81310160be78716736544a51a9c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc7db1fc537ea81310160be78716736544a51a9c
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Dec 3 10:44:14 2021 +0100
broadcom/compiler: improve documentation for Z writes
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14037>
---
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:
*
More information about the mesa-commit
mailing list