From bea2f8beb53450bd07e5a33d48f00a9e9520645d Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 3 Aug 2015 15:02:05 -0700 Subject: [PATCH] i965: use double lowering pass MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: also lower trunc, ceil, floor, fract and roundEven (Iago) v3: also lower mod for doubles (Sam) Signed-off-by: Iago Toral Quiroga Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Kenneth Graunke Reviewed-by: Francisco Jerez --- src/mesa/drivers/dri/i965/brw_compiler.c | 1 + src/mesa/drivers/dri/i965/brw_nir.c | 9 +++++++++ 2 files changed, 10 insertions(+) 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; -- 2.30.2