From: Nicolai Haehnle Date: Sun, 6 Jul 2008 14:39:31 +0000 (+0200) Subject: r500_fragprog: Fix RSQ with negative parameters X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=056689d457924ba4d8a0723d0c5f24383d1757d9;p=mesa.git r500_fragprog: Fix RSQ with negative parameters --- 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);