mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 01:10:39 +01:00
radeonsi: properly destroy the GS copy shader and scratch_bo for compute
Cc: 10.2 10.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit dc05a9e4e0)
[Emil Velikov: remove unref scratch_bo, s/si_shader/si_pipe_shader/]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
4748d2f065
commit
8e2d0f59f7
2 changed files with 8 additions and 3 deletions
|
|
@ -2894,5 +2894,9 @@ out:
|
|||
|
||||
void si_pipe_shader_destroy(struct pipe_context *ctx, struct si_pipe_shader *shader)
|
||||
{
|
||||
if (shader->gs_copy_shader)
|
||||
si_pipe_shader_destroy(ctx, shader->gs_copy_shader);
|
||||
|
||||
r600_resource_reference(&shader->bo, NULL);
|
||||
r600_resource_reference(&shader->scratch_bo, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2316,9 +2316,10 @@ static void si_delete_shader_selector(struct pipe_context *ctx,
|
|||
|
||||
while (p) {
|
||||
c = p->next_variant;
|
||||
if (sel->type == PIPE_SHADER_GEOMETRY)
|
||||
if (sel->type == PIPE_SHADER_GEOMETRY) {
|
||||
si_pm4_delete_state(sctx, gs, p->pm4);
|
||||
else if (sel->type == PIPE_SHADER_FRAGMENT)
|
||||
si_pm4_delete_state(sctx, vs, p->gs_copy_shader->pm4);
|
||||
} else if (sel->type == PIPE_SHADER_FRAGMENT)
|
||||
si_pm4_delete_state(sctx, ps, p->pm4);
|
||||
else if (p->key.vs.as_es)
|
||||
si_pm4_delete_state(sctx, es, p->pm4);
|
||||
|
|
@ -2331,7 +2332,7 @@ static void si_delete_shader_selector(struct pipe_context *ctx,
|
|||
|
||||
free(sel->tokens);
|
||||
free(sel);
|
||||
}
|
||||
}
|
||||
|
||||
static void si_delete_vs_shader(struct pipe_context *ctx, void *state)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue