summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-08-31 10:43:04 +1000
committerDave Airlie <[email protected]>2010-08-31 10:47:03 +1000
commit9bbc54a10d225679a180a085f7ca5bb88ee2bd15 (patch)
treec5ad8909013ac34de07fd71c4a0bbbbcd0f9fa34 /src/gallium/drivers/r600/r600_shader.c
parent85e401d8bfd80450a31eac234e13008e33e64227 (diff)
r600g: fix constant splitting
constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 2210f83283c..2197a1610fe 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -650,7 +650,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_s
for (k = 0; k < 4; k++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV;
- alu.src[0].sel = r600_src[0].sel;
+ alu.src[0].sel = r600_src[j].sel;
alu.src[0].chan = k;
alu.dst.sel = ctx->temp_reg + j;
alu.dst.chan = k;
@@ -661,7 +661,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_s
if (r)
return r;
}
- r600_src[0].sel = ctx->temp_reg + j;
+ r600_src[j].sel = ctx->temp_reg + j;
j--;
}
}