tgsi: add a tgsi_free_tokens() function
authorBrian Paul <brianp@vmware.com>
Fri, 31 Oct 2014 01:08:59 +0000 (19:08 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 31 Oct 2014 21:29:59 +0000 (15:29 -0600)
To match tgsi_alloc_tokens().

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_parse.c
src/gallium/auxiliary/tgsi/tgsi_parse.h

index 5bf8f48397066ef7b071232c0ded7bd2fd293c5e..f2370ed7a060bfd78b0983c09848f810df824d7f 100644 (file)
@@ -291,6 +291,16 @@ tgsi_alloc_tokens(unsigned num_tokens)
 }
 
 
+/**
+ * Free tokens allocated by tgsi_alloc_tokens() or tgsi_dup_tokens()
+ */
+void
+tgsi_free_tokens(const struct tgsi_token *tokens)
+{
+   FREE((void *) tokens);
+}
+
+
 void
 tgsi_dump_tokens(const struct tgsi_token *tokens)
 {
index 2e450a4e3b0bedb1e0b2b0ac0e2500a2fbc0a18e..bfcca4845765b42913e56d9783965081e3fd0699 100644 (file)
@@ -150,6 +150,9 @@ tgsi_dup_tokens(const struct tgsi_token *tokens);
 struct tgsi_token *
 tgsi_alloc_tokens(unsigned num_tokens);
 
+void
+tgsi_free_tokens(const struct tgsi_token *tokens);
+
 
 #if defined __cplusplus
 }