diff options
author | Eric Anholt <eric@anholt.net> | 2010-12-07 12:34:30 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-12-07 13:13:27 -0800 |
commit | fa0d5a2c5bfb6109d365a6f0b9bee53dfee50325 (patch) | |
tree | ebdf71bb58e4ea5e563d52c9f90f76d751b79118 /src/mesa/drivers/dri/i965/brw_vs_emit.c | |
parent | 6d36be508ff0765beb6cf6bb95a323ff01e458dd (diff) | |
download | external_mesa3d-fa0d5a2c5bfb6109d365a6f0b9bee53dfee50325.zip external_mesa3d-fa0d5a2c5bfb6109d365a6f0b9bee53dfee50325.tar.gz external_mesa3d-fa0d5a2c5bfb6109d365a6f0b9bee53dfee50325.tar.bz2 |
i965: Always hand the absolute value to RSQ.
gen6 builtin RSQ apparently clamps negative values to 0 instead of
returning the RSQ of the absolute value like ARB_fragment_program
desires and pre-gen6 apparently does.
Fixes:
glean/fp1-RSQ test 2 (reciprocal square root of negative value)
glean/vp1-RSQ test 2 (reciprocal square root of negative value)
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs_emit.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 407358f..1844526 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -1958,7 +1958,7 @@ void brw_vs_emit(struct brw_vs_compile *c ) emit_math1(c, BRW_MATH_FUNCTION_INV, dst, args[0], BRW_MATH_PRECISION_FULL); break; case OPCODE_RSQ: - emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst, args[0], BRW_MATH_PRECISION_FULL); + emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst, brw_abs(args[0]), BRW_MATH_PRECISION_FULL); break; case OPCODE_SEQ: |