summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-28 11:54:57 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-29 11:15:39 -0700
commit49e3577b91f44013746f7a3db411e7041b7d899e (patch)
treed1a496d1e38b7a26e6bcac0c3eded20101510072 /src/glsl/glsl_types.h
parent31bcce04b1f9c8c5e33370e26a3a9d6e60049aa8 (diff)
glsl_type: Add get_record_instance method
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r--src/glsl/glsl_types.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index e1bfd34f4e..a1c9fae4f9 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -206,6 +206,12 @@ struct glsl_type {
unsigned elements);
/**
+ * Get the instance of a record type
+ */
+ static const glsl_type *get_record_instance(const glsl_struct_field *fields,
+ unsigned num_fields,
+ const char *name);
+ /**
* Generate the constructor for this type and add it to the symbol table
*/
class ir_function *generate_constructor(class glsl_symbol_table *) const;
@@ -407,6 +413,12 @@ private:
static int array_key_compare(const void *a, const void *b);
static unsigned array_key_hash(const void *key);
+ /** Hash table containing the known record types. */
+ static struct hash_table *record_types;
+
+ static int record_key_compare(const void *a, const void *b);
+ static unsigned record_key_hash(const void *key);
+
/**
* \name Pointers to various type singletons
*/