intel: infer scalar'ness locally for brw_vectorize_lower_mem_access

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>
This commit is contained in:
Rohan Garg
2023-05-17 17:26:35 +02:00
parent 3a8f5c2783
commit 6b8fe32322

View File

@@ -1441,10 +1441,10 @@ get_mem_access_size_align(nir_intrinsic_op intrin, uint8_t bytes,
static void static void
brw_vectorize_lower_mem_access(nir_shader *nir, brw_vectorize_lower_mem_access(nir_shader *nir,
const struct brw_compiler *compiler, const struct brw_compiler *compiler,
bool is_scalar,
bool robust_buffer_access) bool robust_buffer_access)
{ {
bool progress = false; bool progress = false;
const bool is_scalar = compiler->scalar_stage[nir->info.stage];
if (is_scalar) { if (is_scalar) {
nir_load_store_vectorize_options options = { nir_load_store_vectorize_options options = {
@@ -1569,8 +1569,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
brw_nir_optimize(nir, compiler); brw_nir_optimize(nir, compiler);
} }
brw_vectorize_lower_mem_access(nir, compiler, is_scalar, brw_vectorize_lower_mem_access(nir, compiler, robust_buffer_access);
robust_buffer_access);
if (OPT(nir_lower_int64)) if (OPT(nir_lower_int64))
brw_nir_optimize(nir, compiler); brw_nir_optimize(nir, compiler);