diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-07-06 16:39:31 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-07-06 16:39:31 +0200 |
commit | 056689d457924ba4d8a0723d0c5f24383d1757d9 (patch) | |
tree | b8cb9d2a5bfac8ad31c75dbcf92839ab9a8e8fa3 /src | |
parent | 2b2cb566563b9f1f9739327ef9874143af838850 (diff) |
r500_fragprog: Fix RSQ with negative parameters
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r500_fragprog_emit.c | 3 |
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 678114b8c1..8c900941c4 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); |