ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index);
assert(index->type->is_scalar());
- assert(index->type->base_type == GLSL_TYPE_INT);
+ assert(index->type->base_type == GLSL_TYPE_INT || index->type->base_type == GLSL_TYPE_UINT);
assert(components >= 1 && components <= 4);
if (components > 1) {
return (ir->type->is_array() || ir->type->is_matrix());
}
+namespace {
/**
* Replace a dereference of a variable with a specified r-value
*
ir_variable* var;
assignment_generator()
+ : base_ir(NULL),
+ rvalue(NULL),
+ old_index(NULL),
+ is_write(false),
+ write_mask(0),
+ var(NULL)
{
}
if (var == NULL)
return this->lower_temps;
- switch (var->mode) {
+ switch (var->data.mode) {
case ir_var_auto:
case ir_var_temporary:
return this->lower_temps;
}
};
+} /* anonymous namespace */
+
bool
lower_variable_index_to_cond_assign(exec_list *instructions,
bool lower_input,