diff options
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_exec.c | 16 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_exec.h | 5 |
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 |