i965: Fix RNDZ and RNDE on Sandybridge and Ivybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 11 May 2011 09:18:24 +0000 (02:18 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:33:02 +0000 (23:33 -0700)
commit344283de5d3f4e2bfa10455f6b974cf731184b55
tree75f073d65338b165333c003dc74c477c445670f1
parent199a2f90abdd5dd11f8e2b95e587401d3b46f3ff
i965: Fix RNDZ and RNDE on Sandybridge and Ivybridge.

On gen4/5, the RNDZ and RNDE instructions return floor(x), but set special
"round increment bits" in the flag register; a predicated ADD (+1) fixes
the result.

The documentation still lists '.r' as existing, and says that the
predicated add is necessary, but it apparently lies.  According to the
simulator, BRW_CONDITIONAL_R (7) is not a valid conditional modifier
and the RNDZ and RNDE instructions simply produce the correct value.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c