From c1fbd0b8abb4ee5861b9b41cbb67e48999e3b2cf Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 23 Mar 2022 15:24:10 +1100 Subject: [PATCH] nir: skip lowering io to scalar for must_be_shader_input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These varyings cannot be packed by the GLSL linkers packing pass so we need to skip this lowering until later when we can properly handle them. Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_lower_io_to_scalar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c index ad3a186aff8..7f0d1332d65 100644 --- a/src/compiler/nir/nir_lower_io_to_scalar.c +++ b/src/compiler/nir/nir_lower_io_to_scalar.c @@ -470,6 +470,9 @@ nir_lower_io_to_scalar_early_instr(nir_builder *b, nir_instr *instr, void *data) if (var->data.always_active_io) return false; + if (var->data.must_be_shader_input) + return false; + /* Skip types we cannot split */ if (glsl_type_is_matrix(glsl_without_array(var->type)) || glsl_type_is_struct_or_ifc(glsl_without_array(var->type)))