diff options
author | Samuel Iglesias Gonsálvez <[email protected]> | 2016-04-12 10:55:44 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-04 08:07:49 +0200 |
commit | b902377a56b802d4fca95fb3733f47e466dfe501 (patch) | |
tree | 14be5478a492dc448bfe8e4dd7640c4d1e568f92 /src/compiler/nir/nir.h | |
parent | 9f81434c5f593bd50a9069c5e845a5730ed501db (diff) |
nir/lower_double_ops: lower mod()
There are rounding errors with the division in i965 that affect
the mod(x,y) result when x = N * y. Instead of returning '0' it
was returning 'y'.
This lowering pass fixes those cases.
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 32eb3b2ca07..de573b45c08 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2425,7 +2425,8 @@ typedef enum { nir_lower_dfloor = (1 << 4), nir_lower_dceil = (1 << 5), nir_lower_dfract = (1 << 6), - nir_lower_dround_even = (1 << 7) + nir_lower_dround_even = (1 << 7), + nir_lower_dmod = (1 << 8) } nir_lower_doubles_options; void nir_lower_doubles(nir_shader *shader, nir_lower_doubles_options options); |