diff options
author | Dave Airlie <airlied@redhat.com> | 2010-08-30 14:13:01 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-30 14:22:12 +1000 |
commit | cb08b9fa84bf432dcca2e685daadd2df651b3025 (patch) | |
tree | c7562840800c37aa0affee190b8392e053cc4915 /src/gallium/drivers/r600/r600_shader.c | |
parent | 09547e1bcee7df3444dd8682770d1b31da1a5822 (diff) |
r600g: fix SSG and op3 neg writing
8 more piglits, mainly the two SSG tests.
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 82f4d73e43..4ff705622e 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -1142,8 +1142,9 @@ static int tgsi_ssg(struct r600_shader_ctx *ctx) memset(&alu, 0, sizeof(struct r600_bc_alu)); alu.inst = V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT; alu.is_op3 = 1; + alu.dst.sel = ctx->temp_reg; - alu.dst.write = 1; + alu.dst.chan = i; alu.src[0] = r600_src[0]; alu.src[0].chan = tgsi_chan(&inst->Src[0], i); @@ -1158,6 +1159,9 @@ static int tgsi_ssg(struct r600_shader_ctx *ctx) if (r) return r; } + r = r600_bc_add_literal(ctx->bc, ctx->value); + if (r) + return r; /* dst = (-tmp > 0 ? -1 : tmp) */ for (i = 0; i < 4; i++) { @@ -1169,14 +1173,15 @@ static int tgsi_ssg(struct r600_shader_ctx *ctx) return r; alu.src[0].sel = ctx->temp_reg; + alu.src[0].chan = i; alu.src[0].neg = 1; alu.src[1].sel = V_SQ_ALU_SRC_1; alu.src[1].neg = 1; alu.src[2].sel = ctx->temp_reg; + alu.src[2].chan = i; - alu.dst.write = 1; if (i == 3) alu.last = 1; r = r600_bc_add_alu(ctx->bc, &alu); |