summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 72618852430..9d2cc803c2d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2973,5 +2973,9 @@ out:
void si_shader_destroy(struct pipe_context *ctx, struct si_shader *shader)
{
+ if (shader->gs_copy_shader)
+ si_shader_destroy(ctx, shader->gs_copy_shader);
+
r600_resource_reference(&shader->bo, NULL);
+ r600_resource_reference(&shader->scratch_bo, NULL);
}