summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-10 00:21:27 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-03-10 00:21:27 -0800
commit654c05725704fdb589ebe3bff7c88d695675a2d9 (patch)
tree7fc34b187803b6c43a303f2bf08f58b3a5994cae
parentfe10250355682bcfb87d1688151b93b08d0a4e3c (diff)
ir_variable: Initialize all attribute bits to reasonable defaults
This prevents variables from randomly having their 'invariant' or 'read_only' bits set, for example.
-rw-r--r--ir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ir.cpp b/ir.cpp
index 2eac2c90cd..ad93310bc9 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;