because the hw and LLVM only support subdword single-component SSBO loads,
and ac_nir_to_llvm splits multi-component loads because of that, which is
inefficient.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
NIR_PASS(_, stage->nir, ac_nir_lower_subdword_loads,
(ac_nir_lower_subdword_options) {
.modes_1_comp = nir_var_mem_ubo,
- .modes_N_comps = nir_var_mem_ubo
+ .modes_N_comps = nir_var_mem_ubo | nir_var_mem_ssbo
});
progress = false;
NIR_PASS_V(nir, ac_nir_lower_subdword_loads,
(ac_nir_lower_subdword_options) {
.modes_1_comp = nir_var_mem_ubo,
- .modes_N_comps = nir_var_mem_ubo
+ .modes_N_comps = nir_var_mem_ubo | nir_var_mem_ssbo
});
NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_shared, nir_address_format_32bit_offset);