From e4ef724e06621be9325fc41ed886fd404467fdc0 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 31 Oct 2013 08:40:01 +0100 Subject: fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013 xserver commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa xkeyboard-config commit 70bbf18d6cddb7271db1b2e042765ace3c4ac485 libX11 commit 6cb02b166361200da35ba14f52cd9aaa493eb0ea glproto commit aacc7a51b6161c765b04524e0d2ab31e5e586834 fontconfig commit 525a135ccf53e4bf3363c3143d9cfdf15fba55ab mesa commit b16b3c8703f198ca0f025b730d582600df79c19c --- mesalib/src/glsl/glsl_types.h | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'mesalib/src/glsl/glsl_types.h') diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h index 4b5b6efb3..fdb1f3a6e 100644 --- a/mesalib/src/glsl/glsl_types.h +++ b/mesalib/src/glsl/glsl_types.h @@ -53,6 +53,7 @@ enum glsl_base_type { GLSL_TYPE_FLOAT, GLSL_TYPE_BOOL, GLSL_TYPE_SAMPLER, + GLSL_TYPE_ATOMIC_UINT, GLSL_TYPE_STRUCT, GLSL_TYPE_INTERFACE, GLSL_TYPE_ARRAY, @@ -440,6 +441,32 @@ struct glsl_type { return base_type == GLSL_TYPE_ERROR; } + /** + * Return the amount of atomic counter storage required for a type. + */ + unsigned atomic_size() const + { + if (base_type == GLSL_TYPE_ATOMIC_UINT) + return ATOMIC_COUNTER_SIZE; + else if (is_array()) + return length * element_type()->atomic_size(); + else + return 0; + } + + /** + * Return whether a type contains any atomic counters. + */ + bool contains_atomic() const + { + return atomic_size(); + } + + /** + * Return whether a type contains any opaque types. + */ + bool contains_opaque() const; + /** * Query the full type of a matrix row * @@ -468,7 +495,6 @@ struct glsl_type { : error_type; } - /** * Get the type of a structure field * @@ -478,13 +504,11 @@ struct glsl_type { */ const glsl_type *field_type(const char *name) const; - /** * Get the location of a filed within a record type */ int field_index(const char *name) const; - /** * Query the number of elements in an array type * @@ -498,6 +522,14 @@ struct glsl_type { return is_array() ? length : -1; } + /** + * Query whether the array size for all dimensions has been declared. + */ + bool is_unsized_array() const + { + return is_array() && length == 0; + } + /** * Return the number of coordinate components needed for this sampler type. * -- cgit v1.2.3