Mesa (master): r300/compiler: fix LIT in VS

Marek Olšák mareko at kemper.freedesktop.org
Sat Dec 11 07:18:46 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sat Dec 11 07:32:24 2010 +0100

r300/compiler: fix LIT in VS

This fixes broken rendering of trees in ETQW. The trees still disappear
for an unknown reason when they are close.

Broken since:
2ff9d4474bdf5f05852ad4963d0b597d20743678
r300/compiler: make lowering passes possibly use up to two less temps

NOTE: This is a candidate for the 7.10 branch.

---

 .../drivers/dri/r300/compiler/radeon_program_alu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
index 58977a4..c806317 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
@@ -689,11 +689,12 @@ static void transform_r300_vertex_fix_LIT(struct radeon_compiler* c,
 							 &constant_swizzle);
 
 	/* MOV dst, src */
+	dst.WriteMask = RC_MASK_XYZW;
 	emit1(c, inst->Prev, RC_OPCODE_MOV, 0,
 		dst,
 		inst->U.I.SrcReg[0]);
 
-	/* MAX dst.z, src, 0.00...001 */
+	/* MAX dst.y, src, 0.00...001 */
 	emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
 		dstregtmpmask(dst.Index, RC_MASK_Y),
 		srcreg(RC_FILE_TEMPORARY, dst.Index),




More information about the mesa-commit mailing list