diff options
author | Christian König <[email protected]> | 2014-03-08 14:16:23 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2014-03-08 16:08:15 +0100 |
commit | 1a8c66023b0b7679ec7d310707e0dd005540d529 (patch) | |
tree | bce2735dc0102a6ba095b725ecbb7138edcbc1a7 /src/gallium/drivers | |
parent | c1a06da4653b7bb8c0418bfbfa6cf46cc1aad2e8 (diff) |
radeonsi: avoid stale pointers in si_delete_shader_selector
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 8f90000eea0..0ee415406d2 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2356,7 +2356,12 @@ static void si_delete_shader_selector(struct pipe_context *ctx, while (p) { c = p->next_variant; - si_pm4_delete_state(sctx, vs, p->pm4); + 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, ps, p->pm4); + else + si_pm4_delete_state(sctx, vs, p->pm4); si_pipe_shader_destroy(ctx, p); free(p); p = c; |