Mesa (master): freedreno/a2xx: ir2: fix saturate in cp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 02:24:44 UTC 2019


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

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Thu Sep  5 11:19:21 2019 -0400

freedreno/a2xx: ir2: fix saturate in cp

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/gallium/drivers/freedreno/a2xx/ir2_cp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_cp.c b/src/gallium/drivers/freedreno/a2xx/ir2_cp.c
index fa155887f80..0e16bdaa4c1 100644
--- a/src/gallium/drivers/freedreno/a2xx/ir2_cp.c
+++ b/src/gallium/drivers/freedreno/a2xx/ir2_cp.c
@@ -68,6 +68,9 @@ void cp_src(struct ir2_context *ctx)
 				if (!is_mov(p))
 					break;
 
+				if (p->alu.saturate)
+					break;
+
 				/* cant apply abs to const src, const src only for alu */
 				if (p->src[0].type == IR2_SRC_CONST &&
 					(src->abs || instr->type != IR2_ALU))
@@ -200,6 +203,7 @@ void cp_export(struct ir2_context *ctx)
 			p->is_ssa = true;
 			p->ssa.ncomp = 0;
 			memset(p->ssa.comp, 0, sizeof(p->ssa.comp));
+			p->alu.saturate |= instr->alu.saturate;
 
 			switch (instr->alu.vector_opc) {
 			case PRED_SETE_PUSHv ... PRED_SETGTE_PUSHv:




More information about the mesa-commit mailing list