diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 6d7a927cc66..d01bb2e9196 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -651,12 +651,6 @@ setup_nir(isel_context *ctx, nir_shader *nir) /* the variable setup has to be done before lower_io / CSE */ setup_variables(ctx, nir); - /* optimize and lower memory operations */ - if (nir_lower_explicit_io(nir, nir_var_mem_global, nir_address_format_64bit_global)) { - nir_opt_constant_folding(nir); - nir_opt_cse(nir); - } - bool lower_to_scalar = false; bool lower_pack = false; nir_variable_mode robust_modes = (nir_variable_mode)0; diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 3df8ccd3e62..17651fe7efb 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -668,6 +668,9 @@ radv_shader_compile_to_nir(struct radv_device *device, nir_var_mem_shared, nir_address_format_32bit_offset); } + nir_lower_explicit_io(nir, nir_var_mem_global, + nir_address_format_64bit_global); + /* Lower large variables that are always constant with load_constant * intrinsics, which get turned into PC-relative loads from a data * section next to the shader.