nir: add lower_all_io_to_elements
authorRob Clark <robdclark@gmail.com>
Thu, 28 Mar 2019 14:57:31 +0000 (10:57 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 30 Mar 2019 16:56:01 +0000 (12:56 -0400)
I need this part of lower_all_io_to_temps but without the actual
lowering to temps part.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/compiler/nir/nir.h
src/mesa/state_tracker/st_glsl_to_nir.cpp

index 806e47dd7bb1b284dbf767cd170fb21db0bb6ed5..bc72d8f83f538d34e827b3e4c7aaa2a9a8710db6 100644 (file)
@@ -2273,6 +2273,7 @@ typedef struct nir_shader_compiler_options {
    bool lower_extract_word;
 
    bool lower_all_io_to_temps;
+   bool lower_all_io_to_elements;
 
    /**
     * Does the driver support real 32-bit integers?  (Otherwise, integers
index 96fc257032eab589a19c01b0d9452e2dd88f41ae..8a58328ce4868211b621b7332b56a7a2994ad8fd 100644 (file)
@@ -922,6 +922,7 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog,
    NIR_PASS_V(nir, nir_split_var_copies);
    NIR_PASS_V(nir, nir_lower_var_copies);
    if (options->lower_all_io_to_temps ||
+       options->lower_all_io_to_elements ||
        nir->info.stage == MESA_SHADER_VERTEX ||
        nir->info.stage == MESA_SHADER_GEOMETRY) {
       NIR_PASS_V(nir, nir_lower_io_arrays_to_elements_no_indirects, false);