glsl: set how_declared to hidden for compiler temps

This will be useful for the nir linker that otherwise cant detect these
compiler temps created in glsl ir.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30199>
This commit is contained in:
Timothy Arceri
2024-06-28 12:05:56 +10:00
committed by Marge Bot
parent bb0efdd4d8
commit dde1a69929

View File

@@ -2040,7 +2040,8 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
this->data.explicit_invariant = false;
this->data.invariant = false;
this->data.precise = false;
this->data.how_declared = ir_var_declared_normally;
this->data.how_declared =
mode == ir_var_temporary ? ir_var_hidden : ir_var_declared_normally;
this->data.mode = mode;
this->data.interpolation = INTERP_MODE_NONE;
this->data.max_array_access = -1;