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 <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user