From dde1a69929212b4cb7e0156e7e364d8b1fc5aeb8 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 28 Jun 2024 12:05:56 +1000 Subject: [PATCH] glsl: set how_declared to hidden for compiler temps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be useful for the nir linker that otherwise cant detect these compiler temps created in glsl ir. Reviewed-by: Alejandro PiƱeiro Part-of: --- src/compiler/glsl/ir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 095fc165164..607ead44106 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -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;