From 21324c40366eeeeacc29ac496e646491ebe3412f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 20 Aug 2020 16:06:56 +1000 Subject: [PATCH] gallivm/nir: lower frexp/ldexp Fixes: dEQP-VK.glsl.builtin.precision.frexp* dEQP-VK.glsl.builtin.precision.ldexp* Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c | 1 + 2 files changed, 2 insertions(+) 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, -- 2.30.2