gallivm/nir: lower frexp/ldexp
authorDave Airlie <airlied@redhat.com>
Thu, 20 Aug 2020 06:06:56 +0000 (16:06 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 31 Aug 2020 03:20:11 +0000 (13:20 +1000)
Fixes:
dEQP-VK.glsl.builtin.precision.frexp*
dEQP-VK.glsl.builtin.precision.ldexp*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>

src/gallium/auxiliary/gallivm/lp_bld_nir.c
src/gallium/drivers/llvmpipe/lp_screen.c

index b9fb3393a7c3c0a59e7c613a0967cb99d6a03ecb..d4d35a1159413640c4cc713da2722bcdec7febfc 100644 (file)
@@ -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;
index b12bcbd1af1b91ecd1a2565e06458d07de58f330..fb4d9835af7caf91dc7b3573e0bc8f794ea68602 100644 (file)
@@ -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,