From 654c05725704fdb589ebe3bff7c88d695675a2d9 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 10 Mar 2010 00:21:27 -0800 Subject: [PATCH] ir_variable: Initialize all attribute bits to reasonable defaults This prevents variables from randomly having their 'invariant' or 'read_only' bits set, for example. --- ir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ir.cpp b/ir.cpp index 2eac2c90cd1..ad93310bc90 100644 --- a/ir.cpp +++ b/ir.cpp @@ -95,7 +95,8 @@ ir_dereference::ir_dereference(ir_instruction *var) ir_variable::ir_variable(const struct glsl_type *type, const char *name) - : ir_instruction(ir_op_var_decl) + : ir_instruction(ir_op_var_decl), read_only(false), centroid(false), + invariant(false), mode(ir_var_auto), interpolation(ir_var_smooth) { this->type = type; this->name = name; -- 2.30.2