Mesa (master): ir3: update info about applicability of saturation modifier

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 22 15:19:42 UTC 2021


Module: Mesa
Branch: master
Commit: 208250b3765600681b768057d4772f5bb38f186d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=208250b3765600681b768057d4772f5bb38f186d

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Mon Mar 22 15:06:08 2021 +0200

ir3: update info about applicability of saturation modifier

On a6xx saturation doesn't work on cat4 and on bary.f

Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9751>

---

 src/freedreno/ir3/instr-a3xx.h       | 4 +++-
 src/freedreno/ir3/ir3_compiler_nir.c | 4 ----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/freedreno/ir3/instr-a3xx.h b/src/freedreno/ir3/instr-a3xx.h
index 9eb4ea66f85..4fc1d51e565 100644
--- a/src/freedreno/ir3/instr-a3xx.h
+++ b/src/freedreno/ir3/instr-a3xx.h
@@ -1042,12 +1042,14 @@ static inline bool instr_sat(instr_t *instr)
 
 static inline bool is_sat_compatible(opc_t opc)
 {
-	/* TODO probably opc_cat==4 is ok too */
+	/* On a6xx saturation doesn't work on cat4 */
 	if (opc_cat(opc) != 2 && opc_cat(opc) != 3)
 		return false;
 
 	switch (opc) {
+	/* On a3xx and a6xx saturation doesn't work on bary.f */
 	case OPC_BARY_F:
+	/* On a6xx saturation doesn't work on sel.* */
 	case OPC_SEL_B16:
 	case OPC_SEL_B32:
 	case OPC_SEL_S16:
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 38a4aba3b4e..62be47c5f32 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -429,10 +429,6 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
 		 * (sat) bit, we can just fold the (sat) flag back to the
 		 * src instruction and create a mov.  This is easier for cp
 		 * to eliminate.
-		 *
-		 * NOTE: a3xx definitely seen not working with flat bary.f. Same test
-		 * uses ldlv on a4xx+, so not definitive. Seems rare enough to apply
-		 * everywhere.
 		 */
 		if (alu->src[0].src.is_ssa &&
 				is_sat_compatible(src[0]->opc) &&



More information about the mesa-commit mailing list