added tgsi_exec_machine_free_data()
authorBrian <brian.paul@tungstengraphics.com>
Tue, 25 Dec 2007 00:37:59 +0000 (17:37 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 1 Jan 2008 17:21:20 +0000 (10:21 -0700)
src/mesa/pipe/tgsi/exec/tgsi_exec.c
src/mesa/pipe/tgsi/exec/tgsi_exec.h

index e469281..49affc1 100644 (file)
@@ -275,6 +275,22 @@ tgsi_exec_machine_init(
 }
 
 
+void
+tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach)
+{
+   if (mach->Instructions) {
+      FREE(mach->Instructions);
+      mach->Instructions = NULL;
+      mach->NumInstructions = 0;
+   }
+   if (mach->Declarations) {
+      FREE(mach->Declarations);
+      mach->Declarations = NULL;
+      mach->NumDeclarations = 0;
+   }
+}
+
+
 static void
 micro_abs(
    union tgsi_exec_channel *dst,
index db92e28..1fb66ee 100644 (file)
@@ -227,6 +227,11 @@ uint
 tgsi_exec_machine_run(
    struct tgsi_exec_machine *mach );
 
+
+void
+tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
+
+
 #if defined __cplusplus
 } /* extern "C" */
 #endif