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 <robclark@freedesktop.org>
This commit is contained in:
parent
e8f83538dd
commit
5e5604cc28
|
@ -45,7 +45,8 @@
|
||||||
static void
|
static void
|
||||||
delete_variant(struct ir3_shader_variant *v)
|
delete_variant(struct ir3_shader_variant *v)
|
||||||
{
|
{
|
||||||
ir3_destroy(v->ir);
|
if (v->ir)
|
||||||
|
ir3_destroy(v->ir);
|
||||||
fd_bo_del(v->bo);
|
fd_bo_del(v->bo);
|
||||||
free(v);
|
free(v);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +70,10 @@ assemble_variant(struct ir3_shader_variant *v)
|
||||||
|
|
||||||
v->instrlen = v->info.sizedwords / 8;
|
v->instrlen = v->info.sizedwords / 8;
|
||||||
v->constlen = v->info.max_const + 1;
|
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
|
/* for vertex shader, the inputs are loaded into registers before the shader
|
||||||
|
|
Loading…
Reference in New Issue