Mesa (master): nv50: fix saturation outside of tx_insn case

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Fri Oct 23 20:33:19 UTC 2009


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

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Fri Oct 23 21:57:42 2009 +0200

nv50: fix saturation outside of tx_insn case

---

 src/gallium/drivers/nv50/nv50_program.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index dd7634c..3f834b5 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -1821,7 +1821,7 @@ nv50_program_tx_insn(struct nv50_pc *pc,
 		for (c = 0; c < 4; c++) {
 			if (!(mask & (1 << c)) || dst[c]->type == P_TEMP)
 				continue;
-			rdst[c] = dst[c];
+			/* rdst[c] = dst[c]; */ /* done above */
 			dst[c] = temp_temp(pc);
 		}
 	}
@@ -2150,8 +2150,10 @@ nv50_program_tx_insn(struct nv50_pc *pc,
 		for (c = 0; c < 4; c++) {
 			if (!(mask & (1 << c)))
 				continue;
-			/* in this case we saturate later */
-			if (dst[c]->type == P_TEMP && dst[c]->index < 0)
+			/* In this case we saturate later, and dst[c] won't
+			 * be another temp_temp (and thus lost), since rdst
+			 * already is TEMP (see above). */
+			if (rdst[c]->type == P_TEMP && rdst[c]->index < 0)
 				continue;
 			emit_sat(pc, rdst[c], dst[c]);
 		}




More information about the mesa-commit mailing list