From 18e096769c48ac11d6be881ad595dbf3ed6ac0ce Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 1 Mar 2023 16:02:38 -0800 Subject: [PATCH] glsl: Set the precision of function return value temporaries. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The signature should dictate the precision of the temp we store into. This ends up ignored by lower_precision for now, which always rewrites it so as to handle custom lowering of builtin precision.. Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/ast_function.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 64c7517b4cc..65cc825d075 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -651,6 +651,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig, ir_variable *var; var = new(ctx) ir_variable(sig->return_type, name, ir_var_temporary); + var->data.precision = sig->return_precision; instructions->push_tail(var); ralloc_free(name);