"invalid type `%s' in empty declaration",
type_name);
} else {
- if (decl_type->base_type == GLSL_TYPE_ARRAY) {
+ if (decl_type->is_array()) {
/* From Section 13.22 (Array Declarations) of the GLSL ES 3.2
* spec:
*
static void
print_type(FILE *f, const glsl_type *t)
{
- if (t->base_type == GLSL_TYPE_ARRAY) {
+ if (t->is_array()) {
fprintf(f, "(array ");
print_type(f, t->fields.array);
fprintf(f, " %u)", t->length);
{
const glsl_type *element_type = var->type;
- while (element_type->base_type == GLSL_TYPE_ARRAY) {
+ while (element_type->is_array()) {
element_type = element_type->fields.array;
}
ir_constant *val, unsigned red_zone_size,
unsigned int boolean_true)
{
- if (val->type->base_type == GLSL_TYPE_ARRAY) {
+ if (val->type->is_array()) {
const glsl_type *const element_type = val->array_elements[0]->type;
for (unsigned i = 0; i < storage_array_size; i++) {
component = this->result;
if (ir->offset) {
ir->offset->accept(this);
- if (ir->offset->type->base_type == GLSL_TYPE_ARRAY) {
+ if (ir->offset->type->is_array()) {
const glsl_type *elt_type = ir->offset->type->fields.array;
for (i = 0; i < ir->offset->type->length; i++) {
offset[i] = this->result;