nir: add nir_shader_compiler_options::lower_to_scalar
authorMarek Olšák <marek.olsak@amd.com>
Tue, 8 Oct 2019 02:46:00 +0000 (22:46 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 Oct 2019 19:49:18 +0000 (15:49 -0400)
This will replace PIPE_SHADER_CAP_SCALAR_ISA.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/broadcom/compiler/nir_to_vir.c
src/compiler/nir/nir.h
src/freedreno/ir3/ir3_nir.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/vc4/vc4_program.c
src/intel/compiler/brw_compiler.c

index b640dcc341b905b3d73351bd08702edcb6055a5f..a982778f8b15e51e9c9240136a62bb6b4b8cda22 100644 (file)
@@ -2668,6 +2668,7 @@ const nir_shader_compiler_options v3d_nir_options = {
         .lower_mul_high = true,
         .lower_wpos_pntc = true,
         .lower_rotate = true,
+        .lower_to_scalar = true,
 };
 
 /**
index 90b91390a64ec092740d5450a6bbc91d39ef09fa..960184b7f3c1e6a7b4708fb186a675d7679dbe13 100644 (file)
@@ -2736,6 +2736,7 @@ typedef struct nir_shader_compiler_options {
     * for IO purposes and would prefer loads/stores be vectorized.
     */
    bool vectorize_io;
+   bool lower_to_scalar;
 
    /**
     * Should nir_lower_io() create load_interpolated_input intrinsics?
index 9342c9d299b103199ba6e708df7cce135360283c..b729692bdff11ea2c78229f397d7f6ccfa0c4295 100644 (file)
@@ -56,6 +56,7 @@ static const nir_shader_compiler_options options = {
                .lower_bitfield_extract_to_shifts = true,
                .use_interpolated_input_intrinsics = true,
                .lower_rotate = true,
+               .lower_to_scalar = true,
 };
 
 /* we don't want to lower vertex_id to _zero_based on newer gpus: */
@@ -82,6 +83,7 @@ static const nir_shader_compiler_options options_a6xx = {
                .use_interpolated_input_intrinsics = true,
                .lower_rotate = true,
                .vectorize_io = true,
+               .lower_to_scalar = true,
 };
 
 const nir_shader_compiler_options *
index f0846867621bc8db0a4f8f9b848ccd96e78564f4..fe1f628a5ab6b996984ec099eb7eb2199075c2dd 100644 (file)
@@ -919,6 +919,7 @@ static const nir_shader_compiler_options nir_options = {
    .lower_all_io_to_temps = false,
    .lower_cs_local_index_from_id = true,
    .lower_rotate = true,
+   .lower_to_scalar = true,
    .use_interpolated_input_intrinsics = true,
    .max_unroll_iterations = 32,
 };
index 06f1fb2b7088da0a4024ed1daf4ac97d0400d18d..8c04cda17aae5d13827e1478aea51f06a641494a 100644 (file)
@@ -976,6 +976,7 @@ static const nir_shader_compiler_options nir_options = {
    .max_unroll_iterations = 32,
    .lower_int64_options = nir_lower_divmod64, // TODO
    .lower_doubles_options = nir_lower_dmod, // TODO
+   .lower_to_scalar = true,
 };
 
 static const void *
index 111279674e6318edc832f4bab88e72b49b9bfcde..e37319750f4844c2f5479254f1ad3d67d273d3c6 100644 (file)
@@ -524,6 +524,7 @@ static const struct nir_shader_compiler_options nir_options = {
        .lower_extract_byte = true,
        .lower_extract_word = true,
        .lower_rotate = true,
+       .lower_to_scalar = true,
        .optimize_sample_mask_in = true,
        .max_unroll_iterations = 32,
        .use_interpolated_input_intrinsics = true,
index 7d88444c6738962215fe16f9e47bf22b31d3f402..79edc6b1c2f60b96a2d5e3ee43ffe8110dcf794b 100644 (file)
@@ -2191,6 +2191,7 @@ static const nir_shader_compiler_options nir_options = {
         .lower_ldexp = true,
         .lower_negate = true,
         .lower_rotate = true,
+        .lower_to_scalar = true,
         .max_unroll_iterations = 32,
 };
 
index c04264cba323f9f7de9d2063eb23dd9671eacae7..20660d6fb280e83e22d8d4b440cb6553a17b3f98 100644 (file)
@@ -50,6 +50,7 @@
    .lower_base_vertex = true
 
 #define COMMON_SCALAR_OPTIONS                                                 \
+   .lower_to_scalar = true,                                                   \
    .lower_pack_half_2x16 = true,                                              \
    .lower_pack_snorm_2x16 = true,                                             \
    .lower_pack_snorm_4x8 = true,                                              \