summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-11-03 20:22:28 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-11-03 20:25:13 +0000
commit01b39b053b0cb6c7493b560b26734f3c4fa52efa (patch)
tree666a07d4d1ec92deed37ea51050184fc9dfb1668
parentb29ca2a561621425991727f8dc2145ae21f0f3b2 (diff)
r600g: Swap the util_blitter_destroy call order.
Trivial change that avoids a segmentation fault when the blitter state happens to be bound when the context is destroyed. The free calls should probably removed altogether in the future -- the responsibility to destroy the state atoms lies with whoever created it, and the safest thing for the pipe driver is to not touch any bound state in its destructor.
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 55370f06fd..128c998b93 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -80,12 +80,13 @@ static void r600_destroy_context(struct pipe_context *context)
rctx->context.delete_depth_stencil_alpha_state(&rctx->context, rctx->custom_dsa_flush);
r600_context_fini(&rctx->ctx);
+
+ util_blitter_destroy(rctx->blitter);
+
for (int i = 0; i < R600_PIPE_NSTATES; i++) {
free(rctx->states[i]);
}
- util_blitter_destroy(rctx->blitter);
-
u_upload_destroy(rctx->upload_vb);
u_upload_destroy(rctx->upload_ib);