Mesa (main): nir: skip lowering io to scalar for must_be_shader_input

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 04:43:32 UTC 2022


Module: Mesa
Branch: main
Commit: c1fbd0b8abb4ee5861b9b41cbb67e48999e3b2cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1fbd0b8abb4ee5861b9b41cbb67e48999e3b2cf

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Wed Mar 23 15:24:10 2022 +1100

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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15731>

---

 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)))



More information about the mesa-commit mailing list