diff options
-rw-r--r-- | src/compiler/glsl_types.cpp | 11 | ||||
-rw-r--r-- | src/compiler/glsl_types.h | 16 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 55e5285f6c1..44cd2acb61d 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -248,7 +248,7 @@ glsl_type::contains_sampler() const { if (this->is_array()) { return this->fields.array->contains_sampler(); - } else if (this->is_record()) { + } else if (this->is_record() || this->is_interface()) { for (unsigned int i = 0; i < this->length; i++) { if (this->fields.structure[i].type->contains_sampler()) return true; @@ -265,7 +265,7 @@ glsl_type::contains_integer() const { if (this->is_array()) { return this->fields.array->contains_integer(); - } else if (this->is_record()) { + } else if (this->is_record() || this->is_interface()) { for (unsigned int i = 0; i < this->length; i++) { if (this->fields.structure[i].type->contains_integer()) return true; @@ -281,7 +281,7 @@ glsl_type::contains_double() const { if (this->is_array()) { return this->fields.array->contains_double(); - } else if (this->is_record()) { + } else if (this->is_record() || this->is_interface()) { for (unsigned int i = 0; i < this->length; i++) { if (this->fields.structure[i].type->contains_double()) return true; @@ -302,6 +302,7 @@ glsl_type::contains_opaque() const { case GLSL_TYPE_ARRAY: return fields.array->contains_opaque(); case GLSL_TYPE_STRUCT: + case GLSL_TYPE_INTERFACE: for (unsigned int i = 0; i < length; i++) { if (fields.structure[i].type->contains_opaque()) return true; @@ -317,7 +318,7 @@ glsl_type::contains_subroutine() const { if (this->is_array()) { return this->fields.array->contains_subroutine(); - } else if (this->is_record()) { + } else if (this->is_record() || this->is_interface()) { for (unsigned int i = 0; i < this->length; i++) { if (this->fields.structure[i].type->contains_subroutine()) return true; @@ -363,7 +364,7 @@ glsl_type::contains_image() const { if (this->is_array()) { return this->fields.array->contains_image(); - } else if (this->is_record()) { + } else if (this->is_record() || this->is_interface()) { for (unsigned int i = 0; i < this->length; i++) { if (this->fields.structure[i].type->contains_image()) return true; diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index e5b9f3ba03d..f607dd8bc37 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -473,14 +473,14 @@ struct glsl_type { } /** - * Query whether or not type is an integral type, or for struct and array - * types, contains an integral type. + * Query whether or not type is an integral type, or for struct, interface + * and array types, contains an integral type. */ bool contains_integer() const; /** - * Query whether or not type is a double type, or for struct and array - * types, contains a double type. + * Query whether or not type is a double type, or for struct, interface and + * array types, contains a double type. */ bool contains_double() const; @@ -533,8 +533,8 @@ struct glsl_type { } /** - * Query whether or not type is a sampler, or for struct and array - * types, contains a sampler. + * Query whether or not type is a sampler, or for struct, interface and + * array types, contains a sampler. */ bool contains_sampler() const; @@ -544,8 +544,8 @@ struct glsl_type { gl_texture_index sampler_index() const; /** - * Query whether or not type is an image, or for struct and array - * types, contains an image. + * Query whether or not type is an image, or for struct, interface and + * array types, contains an image. */ bool contains_image() const; |