aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-01-16 01:45:06 +0100
committerChristian König <[email protected]>2011-01-16 03:30:25 +0100
commitac6334145ec8eef42505cdd727aed7fae0831e12 (patch)
tree218f963b39c2cd5cbc29b28e771521ddd8a9e337 /src/gallium/drivers/r600/r600_shader.c
parent3bee900a720685a96b39ce25307197512e457b6e (diff)
r600d: fix some bugs added reworking literal handling
If a literal slot isn't used it should be set to 0 instead of an uninitialized value. Also the channels for pre R700 trig functions were incorrect. And most important literals were not counted against ndw, resulting in an invalid force_add_cf detection.
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 e85e829badd..5d952a0cae7 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1000,7 +1000,7 @@ static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
alu.src[1].chan = 0;
alu.src[1].value = (uint32_t *)&half_inv_pi;
alu.src[2].sel = V_SQ_ALU_SRC_0_5;
- alu.src[2].chan = 1;
+ alu.src[2].chan = 0;
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
@@ -1034,7 +1034,7 @@ static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
alu.src[1].chan = 0;
alu.src[2].sel = V_SQ_ALU_SRC_LITERAL;
- alu.src[2].chan = 1;
+ alu.src[2].chan = 0;
if (ctx->bc->chiprev == CHIPREV_R600) {
alu.src[1].value = (uint32_t *)&double_pi;