nir: Add lower_rotate flag and set to true in all drivers
authorSagar Ghuge <sagar.ghuge@intel.com>
Tue, 4 Jun 2019 00:11:57 +0000 (17:11 -0700)
committerSagar Ghuge <sagar.ghuge@intel.com>
Mon, 1 Jul 2019 17:14:22 +0000 (10:14 -0700)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/amd/vulkan/radv_shader.c
src/broadcom/compiler/nir_to_vir.c
src/freedreno/ir3/ir3_nir.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/lima_program.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/panfrost/midgard/midgard_compile.h
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/vc4/vc4_program.c

index 0ec0d67e3b6477ed85c4d845be6dadcdb542962d..3c3f761ca8966775814b4263c663248de1e7facf 100644 (file)
@@ -74,6 +74,7 @@ static const struct nir_shader_compiler_options nir_options = {
        .lower_ffma = true,
        .lower_fpow = true,
        .lower_mul_2x32_64 = true,
+       .lower_rotate = true,
        .max_unroll_iterations = 32
 };
 
index cb58b737a8069a5bc57cd697c7412df4f6453667..b05c892bba617100b83af8645317602d472bbab1 100644 (file)
@@ -2419,6 +2419,7 @@ const nir_shader_compiler_options v3d_nir_options = {
         .lower_ldexp = true,
         .lower_mul_high = true,
         .lower_wpos_pntc = true,
+        .lower_rotate = true,
 };
 
 /**
index 437f196bbe0504221748f41baa0dd2808bc3ef80..6a4c60b0c1f148f4f3b9cac7f3e2cf5da7cb741f 100644 (file)
@@ -55,6 +55,7 @@ static const nir_shader_compiler_options options = {
                .lower_bitfield_insert_to_shifts = true,
                .lower_bitfield_extract_to_shifts = true,
                .use_interpolated_input_intrinsics = true,
+               .lower_rotate = true,
 };
 
 /* we don't want to lower vertex_id to _zero_based on newer gpus: */
@@ -79,6 +80,7 @@ static const nir_shader_compiler_options options_a6xx = {
                .lower_bitfield_insert_to_shifts = true,
                .lower_bitfield_extract_to_shifts = true,
                .use_interpolated_input_intrinsics = true,
+               .lower_rotate = true,
 };
 
 const nir_shader_compiler_options *
index 5becd522615a253bd7b334f269e04fdda563a5bb..8226d271a38b895f7bad63c7770cef05b6561162 100644 (file)
@@ -40,6 +40,7 @@ static const nir_shader_compiler_options options = {
        .lower_all_io_to_temps = true,
        .vertex_id_zero_based = true, /* its not implemented anyway */
        .lower_bitshift = true,
+       .lower_rotate = true,
 };
 
 const nir_shader_compiler_options *
index 7adc3ba0a71b60025823d2be8d7584d445a62b42..5e92726df068873deea2bc86e257a00a864253c7 100644 (file)
@@ -52,6 +52,7 @@ static const nir_shader_compiler_options vs_nir_options = {
    /* could be implemented by clamp */
    .lower_fsat = true,
    .lower_bitshift = true,
+   .lower_rotate = true,
 };
 
 static const nir_shader_compiler_options fs_nir_options = {
@@ -63,6 +64,7 @@ static const nir_shader_compiler_options fs_nir_options = {
    .lower_flrp32 = true,
    .lower_flrp64 = true,
    .lower_fsign = true,
+   .lower_rotate = true,
 };
 
 const void *
index b84330b4b3812195054d8daf05192e4f6eea62de..3db1f38c9e492dc0ca0f75bfd91fe8257e107d74 100644 (file)
@@ -900,6 +900,7 @@ static const nir_shader_compiler_options nir_options = {
    .lower_extract_word = true,
    .lower_all_io_to_temps = false,
    .lower_cs_local_index_from_id = true,
+   .lower_rotate = true,
    .use_interpolated_input_intrinsics = true,
    .max_unroll_iterations = 32,
 };
index 44c3533b6de3e2bccdd5f5bf94eae263cb6ac4e0..147494b8e8a1a95fc88437f944265937ed2a62e2 100644 (file)
@@ -117,6 +117,7 @@ static const nir_shader_compiler_options midgard_nir_options = {
         .vertex_id_zero_based = true,
         .lower_extract_byte = true,
         .lower_extract_word = true,
+        .lower_rotate = true,
 
         .lower_doubles_options = nir_lower_dmod,
 
index 3ed90c79cbafafe801d34d866a520c04d9cda518..dae5a55a3daa04577f26f414d9a18b96d022d8fe 100644 (file)
@@ -503,6 +503,7 @@ static const struct nir_shader_compiler_options nir_options = {
        .lower_unpack_unorm_4x8 = true,
        .lower_extract_byte = true,
        .lower_extract_word = true,
+       .lower_rotate = true,
        .optimize_sample_mask_in = true,
        .max_unroll_iterations = 32,
 };
index 707fa1d27ed2282b8edaec8b101b0c730be9a7c8..7fb25ba782e4b4bba9c36a0b28d818a82d3f1d9b 100644 (file)
@@ -2195,6 +2195,7 @@ static const nir_shader_compiler_options nir_options = {
         .lower_fsqrt = true,
         .lower_ldexp = true,
         .lower_negate = true,
+        .lower_rotate = true,
         .max_unroll_iterations = 32,
 };