From bda89200ce768d003d3b2786200fe4edb9aad1a5 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 10 Jul 2025 15:27:27 +1000 Subject: [PATCH] glsl: fix reuse of deref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can't reuse the deref or validation will get mad at us. Fixes: 3da4b5eaa51e ("glsl: always copy bindless sampler packing constructors to a temp") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13464 Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/ast_function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 9012cbdb16d..4957a6c91d9 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -2439,7 +2439,7 @@ ast_function_expression::hir(exec_list *instructions, ir_dereference *lhs = new(ctx) ir_dereference_variable(var); ir_instruction *assignment = new(ctx) ir_assignment(lhs, result); instructions->push_tail(assignment); - result = lhs; + result = new(ctx) ir_dereference_variable(var); } /* Attempt to convert the parameter to a constant valued expression.