summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-08-17 19:01:18 +1000
committerDave Airlie <[email protected]>2010-08-17 19:01:18 +1000
commit1c2a44e445fa4d3bd6f95d9c63041c222268724a (patch)
tree32ee630ec3e23c512c1535efa69c744515f73cc7 /src
parent462e8a8b0d0836c2c2e3b4bf137ecd17db7292d2 (diff)
r300g: fix context destroy under hyperz
we were destroying the mm before unrefing all the objects, so segfault. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index a83ad892eaa..852d88af543 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -119,15 +119,15 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->upload_ib)
u_upload_destroy(r300->upload_ib);
- if (r300->zmask_mm)
- r300_hyperz_destroy_mm(r300);
-
if (r300->tran.translate_cache)
translate_cache_destroy(r300->tran.translate_cache);
/* XXX: This function assumes r300->query_list was initialized */
r300_release_referenced_objects(r300);
+ if (r300->zmask_mm)
+ r300_hyperz_destroy_mm(r300);
+
if (r300->cs)
r300->rws->cs_destroy(r300->cs);