From: Connor Abbott Date: Mon, 3 Aug 2015 22:02:05 +0000 (-0700) Subject: i965: use double lowering pass X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bea2f8beb53450bd07e5a33d48f00a9e9520645d;p=mesa.git 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 Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Kenneth Graunke Reviewed-by: Francisco Jerez --- 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;