From f0c4e71d58ac7257bffd3839d86d9a4173afddd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 1 Dec 2024 03:01:36 -0500 Subject: [PATCH] nir/opt_varyings: fix getting deref variables for sysvals This might fix array system values. Noticed by luck. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_varyings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_varyings.c b/src/compiler/nir/nir_opt_varyings.c index 608eccef5c6..4d069f50885 100644 --- a/src/compiler/nir/nir_opt_varyings.c +++ b/src/compiler/nir/nir_opt_varyings.c @@ -1053,7 +1053,7 @@ is_sysval(nir_instr *instr, gl_system_value sysval) nir_instr_as_deref(intr->src[0].ssa->parent_instr); return nir_deref_mode_is_one_of(deref, nir_var_system_value) && - deref->var->data.location == sysval; + nir_deref_instr_get_variable(deref)->data.location == sysval; } }