summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-24 17:37:59 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-01 10:21:20 -0700
commiteba2e044a04da99fea2214ba10ca5981f596702e (patch)
treee799f1e02704093c2fcc943b4ac2c2ebcd20f5ac /src/mesa/pipe
parent552907d8a497d42f6693ca0f9324f003cfe3a66d (diff)
added tgsi_exec_machine_free_data()
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.c16
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.h5
2 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
index e469281d22..49affc12f3 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
@@ -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,
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.h b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
index db92e282df..1fb66ee960 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
@@ -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