radv: lower deref operations for global memory for both backends
To match ACO. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5316>
This commit is contained in:

committed by
Marge Bot

parent
10b73e2b52
commit
1588644543
@@ -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;
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user