From 8fc7a98e3161137d492dc631140a3f16c5df0f7c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 8 Aug 2022 09:17:21 +0300 Subject: [PATCH] intel/fs: disable split_array_vars on opencl kernels Signed-off-by: Lionel Landwerlin Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_nir.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index fb89a783ec8..debeda90f25 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -641,7 +641,14 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, do { progress = false; - OPT(nir_split_array_vars, nir_var_function_temp); + /* This pass is causing problems with types used by OpenCL : + * https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13955 + * + * Running with it disabled made no difference in the resulting assembly + * code. + */ + if (nir->info.stage != MESA_SHADER_KERNEL) + OPT(nir_split_array_vars, nir_var_function_temp); OPT(nir_shrink_vec_array_vars, nir_var_function_temp); OPT(nir_opt_deref); if (OPT(nir_opt_memcpy))