summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-01 12:36:34 -0400
committerRob Clark <[email protected]>2014-09-01 18:08:21 -0400
commit5e5604cc28a9542d3f21f63b1c3e04f7650dc0d6 (patch)
tree6e0b3bff7eece0c8a9a9f47535967003cd69f6a4 /src/gallium/drivers/freedreno
parente8f83538dd4203befe63998b703afd2b488ad56a (diff)
freedreno/ir3: don't keep IR around
Once we've assembled the shader, no need to keep the intermediate around. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
index ddf99dbc46e..04de532f499 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
@@ -45,7 +45,8 @@
static void
delete_variant(struct ir3_shader_variant *v)
{
- ir3_destroy(v->ir);
+ if (v->ir)
+ ir3_destroy(v->ir);
fd_bo_del(v->bo);
free(v);
}
@@ -69,6 +70,10 @@ assemble_variant(struct ir3_shader_variant *v)
v->instrlen = v->info.sizedwords / 8;
v->constlen = v->info.max_const + 1;
+
+ /* no need to keep the ir around beyond this point: */
+ ir3_destroy(v->ir);
+ v->ir = NULL;
}
/* for vertex shader, the inputs are loaded into registers before the shader