glsl: Set the precision of function return value temporaries.
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 <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21666>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user