aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-27 17:04:46 +0200
committermarha <marha@users.sourceforge.net>2012-03-27 17:04:46 +0200
commitec617f09d07e32d6f57c0da133f53ad3d43a568a (patch)
tree336f2ef770cf4bd48005f99fcbac22ec64ff51db /mesalib/src/glsl/ir.cpp
parent1d6d472342aee7b9c68e9f1d92762ef808d35ac2 (diff)
downloadvcxsrv-ec617f09d07e32d6f57c0da133f53ad3d43a568a.tar.gz
vcxsrv-ec617f09d07e32d6f57c0da133f53ad3d43a568a.tar.bz2
vcxsrv-ec617f09d07e32d6f57c0da133f53ad3d43a568a.zip
fontconfig libxcb xcb-proto mesa xserver git update 27 Mar 2012
Diffstat (limited to 'mesalib/src/glsl/ir.cpp')
-rw-r--r--mesalib/src/glsl/ir.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index a5eca5a51..3c9d6e174 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -1026,9 +1026,11 @@ ir_loop::ir_loop()
ir_dereference_variable::ir_dereference_variable(ir_variable *var)
{
+ assert(var != NULL);
+
this->ir_type = ir_type_dereference_variable;
this->var = var;
- this->type = (var != NULL) ? var->type : glsl_type::error_type;
+ this->type = var->type;
}
@@ -1055,19 +1057,18 @@ ir_dereference_array::ir_dereference_array(ir_variable *var,
void
ir_dereference_array::set_array(ir_rvalue *value)
{
+ assert(value != NULL);
+
this->array = value;
- this->type = glsl_type::error_type;
- if (this->array != NULL) {
- const glsl_type *const vt = this->array->type;
+ const glsl_type *const vt = this->array->type;
- if (vt->is_array()) {
- type = vt->element_type();
- } else if (vt->is_matrix()) {
- type = vt->column_type();
- } else if (vt->is_vector()) {
- type = vt->get_base_type();
- }
+ if (vt->is_array()) {
+ type = vt->element_type();
+ } else if (vt->is_matrix()) {
+ type = vt->column_type();
+ } else if (vt->is_vector()) {
+ type = vt->get_base_type();
}
}
@@ -1075,11 +1076,12 @@ ir_dereference_array::set_array(ir_rvalue *value)
ir_dereference_record::ir_dereference_record(ir_rvalue *value,
const char *field)
{
+ assert(value != NULL);
+
this->ir_type = ir_type_dereference_record;
this->record = value;
this->field = ralloc_strdup(this, field);
- this->type = (this->record != NULL)
- ? this->record->type->field_type(field) : glsl_type::error_type;
+ this->type = this->record->type->field_type(field);
}
@@ -1091,8 +1093,7 @@ ir_dereference_record::ir_dereference_record(ir_variable *var,
this->ir_type = ir_type_dereference_record;
this->record = new(ctx) ir_dereference_variable(var);
this->field = ralloc_strdup(this, field);
- this->type = (this->record != NULL)
- ? this->record->type->field_type(field) : glsl_type::error_type;
+ this->type = this->record->type->field_type(field);
}
bool