summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-08-03 15:02:05 -0700
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-10 11:25:01 +0200
commitbea2f8beb53450bd07e5a33d48f00a9e9520645d (patch)
treeb54a978c2054180c0ec2b7031569e86c69e239ed
parentd00a239b288c5df7003f30ac80d156e70f27acf7 (diff)
i965: use double lowering pass
v2: also lower trunc, ceil, floor, fract and roundEven (Iago) v3: also lower mod for doubles (Sam) Signed-off-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_nir.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c
index 6141b0d58c3..eda0f6fa328 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.c
+++ b/src/mesa/drivers/dri/i965/brw_compiler.c
@@ -77,6 +77,7 @@ shader_perf_log_mesa(void *data, const char *fmt, ...)
.lower_fdiv = true, \
.lower_scmp = true, \
.lower_fmod32 = true, \
+ .lower_fmod64 = false, \
.lower_bitfield_extract = true, \
.lower_bitfield_insert = true, \
.lower_uadd_carry = true, \
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 5475276d9cf..4830774ebbb 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -410,6 +410,15 @@ nir_optimize(nir_shader *nir, bool is_scalar)
OPT(nir_opt_dead_cf);
OPT(nir_opt_remove_phis);
OPT(nir_opt_undef);
+ OPT_V(nir_lower_doubles, nir_lower_drcp |
+ nir_lower_dsqrt |
+ nir_lower_drsq |
+ nir_lower_dtrunc |
+ nir_lower_dfloor |
+ nir_lower_dceil |
+ nir_lower_dfract |
+ nir_lower_dround_even |
+ nir_lower_dmod);
} while (progress);
return nir;