summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2022-03-23 15:24:10 +1100
committerMarge Bot <emma+marge@anholt.net>2022-05-16 03:33:18 +0000
commitc1fbd0b8abb4ee5861b9b41cbb67e48999e3b2cf (patch)
treeddda4a46abd3550938aa276831e0157dc5d7fe51
parent99ab53061736d0f7559d0bd2f3ff0d4d1aa8e192 (diff)
nir: skip lowering io to scalar for must_be_shader_input
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 <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15731>
-rw-r--r--src/compiler/nir/nir_lower_io_to_scalar.c3
1 files changed, 3 insertions, 0 deletions
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)))