glsl: fix reuse of deref

We can't reuse the deref or validation will get mad at us.

Fixes: 3da4b5eaa5 ("glsl: always copy bindless sampler packing constructors to a temp")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13464

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36038>
(cherry picked from commit bda89200ce)
This commit is contained in:
Timothy Arceri 2025-07-10 15:27:27 +10:00 committed by Eric Engestrom
parent eb217aa317
commit 2a33be88ce
2 changed files with 2 additions and 2 deletions

View file

@ -3744,7 +3744,7 @@
"description": "glsl: fix reuse of deref",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "3da4b5eaa51ea74a4e3e1309a75308a9586189a6",
"notes": null

View file

@ -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.