YYLTYPE loc = expr->get_location();
if (op->type->is_error()) {
/* silently propagate the error */
- } else if (op->type->base_type == GLSL_TYPE_STRUCT
- || op->type->is_interface()) {
+ } else if (op->type->is_record() || op->type->is_interface()) {
result = new(ctx) ir_dereference_record(op,
expr->primary_expression.identifier);
return true;
}
- if (this->type->base_type == GLSL_TYPE_STRUCT) {
+ if (this->type->is_record()) {
const exec_node *a_node = this->components.get_head_raw();
const exec_node *b_node = c->components.get_head_raw();
fprintf(f, "(array ");
print_type(f, t->fields.array);
fprintf(f, " %u)", t->length);
- } else if ((t->base_type == GLSL_TYPE_STRUCT)
- && !is_gl_identifier(t->name)) {
+ } else if (t->is_record() && !is_gl_identifier(t->name)) {
fprintf(f, "%s@%p", t->name, (void *) t);
} else {
fprintf(f, "%s", t->name);
* get lucky, copy propagation will eliminate the extra moves.
*/
- if (ir->type->base_type == GLSL_TYPE_STRUCT) {
+ if (ir->type->is_record()) {
src_reg temp_base = get_temp(ir->type);
dst_reg temp = dst_reg(temp_base);
st_dst_reg *l, st_src_reg *r,
st_src_reg *cond, bool cond_swap)
{
- if (type->base_type == GLSL_TYPE_STRUCT) {
+ if (type->is_record()) {
for (unsigned int i = 0; i < type->length; i++) {
emit_block_mov(ir, type->fields.structure[i].type, l, r,
cond, cond_swap);
* aggregate constant and move each constant value into it. If we
* get lucky, copy propagation will eliminate the extra moves.
*/
- if (ir->type->base_type == GLSL_TYPE_STRUCT) {
+ if (ir->type->is_record()) {
st_src_reg temp_base = get_temp(ir->type);
st_dst_reg temp = st_dst_reg(temp_base);