llvmpipe: fix some integer instruction lowering.
authorDave Airlie <airlied@redhat.com>
Mon, 20 Jan 2020 03:16:49 +0000 (13:16 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Jan 2020 03:48:16 +0000 (13:48 +1000)
We want to lower to shifts for bitfields, and lower ifind_msb.

Fixes a bunch of gpu shader5 tests.

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

src/gallium/drivers/llvmpipe/lp_screen.c

index 82085a08e116c24a1d0925515bc33877cc96b1e7..e951baa0653deb8e77674a9cd4c2978affbe2625 100644 (file)
@@ -597,8 +597,8 @@ static const struct nir_shader_compiler_options gallivm_nir_options = {
    .lower_flrp32 = true,
    .lower_flrp64 = true,
    .lower_fsat = true,
-   .lower_bitfield_insert_to_bitfield_select = true,
-   .lower_bitfield_extract = true,
+   .lower_bitfield_insert_to_shifts = true,
+   .lower_bitfield_extract_to_shifts = true,
    .lower_sub = true,
    .lower_ffma = true,
    .lower_fmod = true,
@@ -615,6 +615,7 @@ static const struct nir_shader_compiler_options gallivm_nir_options = {
    .lower_extract_byte = true,
    .lower_extract_word = true,
    .lower_rotate = true,
+   .lower_ifind_msb = true,
    .optimize_sample_mask_in = true,
    .max_unroll_iterations = 32,
    .use_interpolated_input_intrinsics = true,