glsl: give all unnamed structs the same name
[mesa.git] / src / compiler / glsl / lower_buffer_access.cpp
index 1613806de4e891b2e5556830eb929d8659c088bc..24a96e2fba4092bb76cdddeb4275bf8c30f3c3e4 100644 (file)
@@ -164,8 +164,8 @@ lower_buffer_access::emit_access(void *mem_ctx,
       /* We're dereffing a column out of a row-major matrix, so we
        * gather the vector from each stored row.
       */
-      assert(deref->type->base_type == GLSL_TYPE_FLOAT ||
-             deref->type->is_double());
+      assert(deref->type->is_float() || deref->type->is_double());
+
       /* Matrices, row_major or not, are stored as if they were
        * arrays of vectors of the appropriate size in std140.
        * Arrays have their strides rounded up to a vec4, so the
@@ -199,7 +199,7 @@ lower_buffer_access::emit_access(void *mem_ctx,
       else
          matrix_stride = glsl_align(matrix_columns * N, 16);
 
-      const glsl_type *deref_type = deref->type->base_type == GLSL_TYPE_FLOAT ?
+      const glsl_type *deref_type = deref->type->is_float() ?
          glsl_type::float_type : glsl_type::double_type;
 
       for (unsigned i = 0; i < deref->type->vector_elements; i++) {