summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-06-21 15:52:03 +0200
committerMarek Olšák <[email protected]>2016-06-29 20:12:00 +0200
commitebb9c7d7c48c78f3a50654ec6385d9065c1eb7b7 (patch)
tree42aef39ebe4b86e28351b1448a3e6e186bff8697 /src/gallium/drivers/radeonsi/si_pipe.c
parente607a6be2bd2507f704dd8f10013fe96f4b1b8da (diff)
radeonsi: unreference framebuffer state with set_framebuffer_state
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 633d4bb7a52..6c88fe381f4 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -43,7 +43,11 @@ static void si_destroy_context(struct pipe_context *context)
struct si_context *sctx = (struct si_context *)context;
int i;
- si_dec_framebuffer_counters(&sctx->framebuffer.state);
+ /* Unreference the framebuffer normally to disable related logic
+ * properly.
+ */
+ struct pipe_framebuffer_state fb = {};
+ context->set_framebuffer_state(context, &fb);
si_release_all_descriptors(sctx);
@@ -79,7 +83,6 @@ static void si_destroy_context(struct pipe_context *context)
sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_fastclear);
if (sctx->custom_blend_dcc_decompress)
sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_dcc_decompress);
- util_unreference_framebuffer_state(&sctx->framebuffer.state);
if (sctx->blitter)
util_blitter_destroy(sctx->blitter);