glsl: copy precision val of function output params

We need to copy the precision to our temp values when converting
to nir or this information will be lost. This change fixes the new
test introduced in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26755>
This commit is contained in:
Timothy Arceri 2023-12-19 20:15:46 +11:00 committed by Marge Bot
parent e3c26889ac
commit d42f9d94af

View file

@ -1635,6 +1635,7 @@ nir_visitor::visit(ir_call *ir)
if (sig_param->data.mode == ir_var_function_out) {
nir_variable *out_param =
nir_local_variable_create(this->impl, sig_param->type, "param");
out_param->data.precision = sig_param->data.precision;
nir_deref_instr *out_param_deref = nir_build_deref_var(&b, out_param);
call->params[i] = nir_src_for_ssa(&out_param_deref->def);
} else if (sig_param->data.mode == ir_var_function_in) {