diff options
author | Christian König <[email protected]> | 2014-03-08 14:18:30 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2014-03-08 16:08:15 +0100 |
commit | 1fa2acba6195230fc738d2854678bc28864ca5c0 (patch) | |
tree | aa53cc2e8219ebaf883bef68d9680f73187cf9ed /src/gallium | |
parent | 1a8c66023b0b7679ec7d310707e0dd005540d529 (diff) |
radeonsi: avoid stale state pointers
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index ff11a67b7b1..ac9e49a9cb8 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -83,15 +83,9 @@ static void si_destroy_context(struct pipe_context *context) pipe_resource_reference(&sctx->null_const_buf.buffer, NULL); r600_resource_reference(&sctx->border_color_table, NULL); - if (sctx->gs_on) { - si_pm4_free_state(sctx, sctx->gs_on, 0); - } - if (sctx->gs_off) { - si_pm4_free_state(sctx, sctx->gs_off, 0); - } - if (sctx->gs_rings) { - si_pm4_free_state(sctx, sctx->gs_rings, 0); - } + si_pm4_delete_state(sctx, gs_rings, sctx->gs_rings); + si_pm4_delete_state(sctx, gs_onoff, sctx->gs_on); + si_pm4_delete_state(sctx, gs_onoff, sctx->gs_off); if (sctx->dummy_pixel_shader) { sctx->b.b.delete_fs_state(&sctx->b.b, sctx->dummy_pixel_shader); |