summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 5e23f5da65b..68bb598cf3c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -653,15 +653,11 @@ tgsi_exec_machine_bind_shader(
if (!tokens) {
/* unbind and free all */
- if (mach->Declarations) {
- FREE( mach->Declarations );
- }
+ FREE(mach->Declarations);
mach->Declarations = NULL;
mach->NumDeclarations = 0;
- if (mach->Instructions) {
- FREE( mach->Instructions );
- }
+ FREE(mach->Instructions);
mach->Instructions = NULL;
mach->NumInstructions = 0;
@@ -804,15 +800,11 @@ tgsi_exec_machine_bind_shader(
}
tgsi_parse_free (&parse);
- if (mach->Declarations) {
- FREE( mach->Declarations );
- }
+ FREE(mach->Declarations);
mach->Declarations = declarations;
mach->NumDeclarations = numDeclarations;
- if (mach->Instructions) {
- FREE( mach->Instructions );
- }
+ FREE(mach->Instructions);
mach->Instructions = instructions;
mach->NumInstructions = numInstructions;
}
@@ -875,10 +867,8 @@ void
tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach)
{
if (mach) {
- if (mach->Instructions)
- FREE(mach->Instructions);
- if (mach->Declarations)
- FREE(mach->Declarations);
+ FREE(mach->Instructions);
+ FREE(mach->Declarations);
align_free(mach->Inputs);
align_free(mach->Outputs);