summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog_emit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
index 678114b8c17..8c900941c4d 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
@@ -784,7 +784,8 @@ static void do_inst(struct r500_pfs_compile_state *cs, struct prog_instruction *
break;
case OPCODE_RSQ:
src[0] = make_src(cs, fpi->SrcReg[0]);
- emit_sop(cs, R500_ALPHA_OP_RSQ, fpi->DstReg, src[0], make_sop_swizzle(fpi->SrcReg[0]));
+ emit_sop(cs, R500_ALPHA_OP_RSQ, fpi->DstReg, src[0],
+ (make_sop_swizzle(fpi->SrcReg[0]) | (R500_SWIZ_MOD_ABS<<3)) & ~(R500_SWIZ_MOD_NEG<<3));
break;
case OPCODE_SCS:
emit_trig(cs, fpi);