From: Dave Airlie Date: Thu, 20 Aug 2020 06:06:56 +0000 (+1000) Subject: gallivm/nir: lower frexp/ldexp X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=21324c40366eeeeacc29ac496e646491ebe3412f gallivm/nir: lower frexp/ldexp Fixes: dEQP-VK.glsl.builtin.precision.frexp* dEQP-VK.glsl.builtin.precision.ldexp* Reviewed-by: Roland Scheidegger Part-of: --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index b9fb3393a7c..d4d35a11594 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2036,6 +2036,7 @@ void lp_build_opt_nir(struct nir_shader *nir) .lower_tg4_offsets = true, }; NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options); + NIR_PASS_V(nir, nir_lower_frexp); do { progress = false; diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index b12bcbd1af1..fb4d9835af7 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -553,6 +553,7 @@ static const struct nir_shader_compiler_options gallivm_nir_options = { .lower_fmod = true, .lower_hadd = true, .lower_add_sat = true, + .lower_ldexp = true, .lower_pack_snorm_2x16 = true, .lower_pack_snorm_4x8 = true, .lower_pack_unorm_2x16 = true,