aco: drop useless lowering of deref operations for shared memory
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 7 Nov 2019 21:34:20 +0000 (22:34 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 29 Nov 2019 20:58:25 +0000 (21:58 +0100)
Moved to RADV. No pipeline-db changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_instruction_selection_setup.cpp

index dd93ea2e94828a16b2fbb971c715c355550c1bba..ba7c7c12a52628df7200aa7d8188c1b700ecddc0 100644 (file)
@@ -834,8 +834,6 @@ setup_isel_context(Program* program,
                                     (uint8_t*)nir->constant_data + nir->constant_data_size);
 
       /* the variable setup has to be done before lower_io / CSE */
-      if (nir->info.stage == MESA_SHADER_COMPUTE)
-         nir_lower_vars_to_explicit_types(nir, nir_var_mem_shared, shared_var_info);
       setup_variables(&ctx, nir);
 
       /* optimize and lower memory operations */
@@ -848,9 +846,7 @@ setup_isel_context(Program* program,
          lower_to_scalar = true;
          lower_pack = true;
       }
-      if (nir->info.stage == MESA_SHADER_COMPUTE)
-         lower_to_scalar |= nir_lower_explicit_io(nir, nir_var_mem_shared, nir_address_format_32bit_offset);
-      else
+      if (nir->info.stage != MESA_SHADER_COMPUTE)
          nir_lower_io(nir, (nir_variable_mode)(nir_var_shader_in | nir_var_shader_out), type_size, (nir_lower_io_options)0);
       nir_lower_explicit_io(nir, nir_var_mem_global, nir_address_format_64bit_global);