diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_shader.c | 7 |
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 |