glsl: make use of glsl_type::is_interface()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Apr 2017 08:28:58 +0000 (10:28 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Apr 2017 17:33:34 +0000 (19:33 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/compiler/glsl/hir_field_selection.cpp
src/compiler/glsl/shader_cache.cpp

index eab08ad8235ea2451d1f2a62b45e80473d0a0412..aa1808afa157d2002ca154d7b2537b6577b4f970 100644 (file)
@@ -47,7 +47,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
    if (op->type->is_error()) {
       /* silently propagate the error */
    } else if (op->type->base_type == GLSL_TYPE_STRUCT
-              || op->type->base_type == GLSL_TYPE_INTERFACE) {
+              || op->type->is_interface()) {
       result = new(ctx) ir_dereference_record(op,
                                              expr->primary_expression.identifier);
 
index 19d69c36fc469698fda94f4b62f6bfb8e7b18e99..800d3a29133a8f21718847413b106fd9196884f0 100644 (file)
@@ -129,7 +129,7 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type)
          blob_write_string(blob, type->fields.structure[i].name);
       }
 
-      if (type->base_type == GLSL_TYPE_INTERFACE) {
+      if (type->is_interface()) {
          blob_write_uint32(blob, type->interface_packing);
          blob_write_uint32(blob, type->interface_row_major);
       }