radeon: Also flush if it's not the current context that's being destroyed.
authorHenri Verbeet <hverbeet@gmail.com>
Thu, 15 Jul 2010 18:53:16 +0000 (14:53 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Thu, 15 Jul 2010 18:54:25 +0000 (14:54 -0400)
This avoids calling radeonFlush() during context destruction, when
ctx->DrawBuffer would be NULL.

NOTE: This is a candidate for the 7.8 branch.

src/mesa/drivers/dri/radeon/radeon_common_context.c

index 94f476617b6431ddb8f5827348879b57f1840746..5a7d52c4d2f2e4651eb79f06a800740794edab98 100644 (file)
@@ -300,10 +300,10 @@ void radeonDestroyContext(__DRIcontext *driContextPriv )
        _mesa_meta_free(radeon->glCtx);
 
        if (radeon == current) {
-               radeon_firevertices(radeon);
                _mesa_make_current(NULL, NULL, NULL);
        }
 
+       radeon_firevertices(radeon);
        if (!is_empty_list(&radeon->dma.reserved)) {
                rcommonFlushCmdBuf( radeon, __FUNCTION__ );
        }