summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 9c58f869dc4..c712c6a7bd9 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -1543,6 +1543,8 @@ ir_swizzle::variable_referenced() const
}
+bool ir_variable::temporaries_allocate_names = false;
+
const char ir_variable::tmp_name[] = "compiler_temp";
ir_variable::ir_variable(const struct glsl_type *type, const char *name,
@@ -1551,6 +1553,9 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
{
this->type = type;
+ if (mode == ir_var_temporary && !ir_variable::temporaries_allocate_names)
+ name = NULL;
+
/* The ir_variable clone method may call this constructor with name set to
* tmp_name.
*/