}
+void
+_mesa_glsl_release_types(void)
+{
+ if (glsl_type::array_types != NULL) {
+ hash_table_dtor(glsl_type::array_types);
+ glsl_type::array_types = NULL;
+ }
+
+ if (glsl_type::record_types != NULL) {
+ hash_table_dtor(glsl_type::record_types);
+ glsl_type::record_types = NULL;
+ }
+
+ if (glsl_type::ctx != NULL) {
+ talloc_free(glsl_type::ctx);
+ glsl_type::ctx = NULL;
+ }
+}
+
+
ir_function *
glsl_type::generate_constructor(glsl_symbol_table *symtab) const
{
extern "C" void
_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state);
+extern "C" void
+_mesa_glsl_release_types(void);
+
#define GLSL_TYPE_UINT 0
#define GLSL_TYPE_INT 1
#define GLSL_TYPE_FLOAT 2
bool);
static void generate_EXT_texture_array_types(class glsl_symbol_table *,
bool);
+ /*@}*/
+
/**
- * This function is a friend because it needs to call the various
- * generate_*_types functions and it has C linkage.
+ * \name Friend functions.
+ *
+ * These functions are friends because they must have C linkage and the
+ * need to call various private methods or access various private static
+ * data.
*/
+ /*@{*/
friend void _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *);
+ friend void _mesa_glsl_release_types(void);
/*@}*/
};