i965: Always hand the absolute value to RSQ.
authorEric Anholt <eric@anholt.net>
Tue, 7 Dec 2010 20:34:30 +0000 (12:34 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 7 Dec 2010 21:13:27 +0000 (13:13 -0800)
commitfa0d5a2c5bfb6109d365a6f0b9bee53dfee50325
treeebdf71bb58e4ea5e563d52c9f90f76d751b79118
parent6d36be508ff0765beb6cf6bb95a323ff01e458dd
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)
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/i965/brw_wm_fp.c