Mesa (master): r600g: fix LIT tests

Dave Airlie airlied at kemper.freedesktop.org
Tue Aug 31 00:47:36 UTC 2010


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Aug 31 09:56:35 2010 +1000

r600g: fix LIT tests

---

 src/gallium/drivers/r600/r600_shader.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 4834eaa..2210f83 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -987,7 +987,7 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
 	if (r)
 		return r;
 	alu.src[1].sel  = V_SQ_ALU_SRC_0; /*0.0*/
-	alu.src[1].chan = tgsi_chan(&inst->Src[0], 0);
+	alu.src[1].chan = 0;
 	r = tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst);
 	if (r)
 		return r;
@@ -1033,7 +1033,7 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
 		r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
 		if (r)
 			return r;
-		alu.src[0].chan = tgsi_chan(&inst->Src[0], 1);
+		alu.src[0].chan = tgsi_chan(&inst->Src[0], 3);
 		r = tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
 		if (r)
 			return r;
@@ -1045,6 +1045,7 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
 		r = r600_bc_add_literal(ctx->bc, ctx->value);
 		if (r)
 			return r;
+
 		chan = alu.dst.chan;
 		sel = alu.dst.sel;
 




More information about the mesa-commit mailing list