nir: add nir_load_store_vectorize_options

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4202>
This commit is contained in:
Rhys Perry
2020-03-13 15:33:15 +00:00
committed by Marge Bot
parent f4eb833a12
commit 00c8bec47b
7 changed files with 59 additions and 42 deletions

View File

@@ -1026,11 +1026,14 @@ brw_vectorize_lower_mem_access(nir_shader *nir,
bool progress = false;
if (is_scalar) {
OPT(nir_opt_load_store_vectorize,
nir_var_mem_ubo | nir_var_mem_ssbo |
nir_var_mem_global | nir_var_mem_shared,
brw_nir_should_vectorize_mem,
(nir_variable_mode)0);
nir_load_store_vectorize_options options = {
.modes = nir_var_mem_ubo | nir_var_mem_ssbo |
nir_var_mem_global | nir_var_mem_shared,
.callback = brw_nir_should_vectorize_mem,
.robust_modes = (nir_variable_mode)0,
};
OPT(nir_opt_load_store_vectorize, &options);
}
OPT(brw_nir_lower_mem_access_bit_sizes, devinfo);