DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
_ac_DestroyContext( rmesa->glCtx );
_swrast_DestroyContext( rmesa->glCtx );
- /* free the Mesa context */
- rmesa->glCtx->DriverCtx = NULL;
- _mesa_destroy_context(rmesa->glCtx);
-
if ( release_texture_heaps ) {
/* This share group is about to go away, free our private
* texture object data.
assert( is_empty_list( & rmesa->swapped ) );
}
+ /* free the Mesa context */
+ rmesa->glCtx->DriverCtx = NULL;
+ _mesa_destroy_context(rmesa->glCtx);
+
/* free the option cache */
driDestroyOptionCache (&rmesa->optionCache);
r200VtxfmtDestroy( rmesa->glCtx );
}
- /* free the Mesa context */
- rmesa->glCtx->DriverCtx = NULL;
- _mesa_destroy_context( rmesa->glCtx );
-
if (rmesa->state.scissor.pClipRects) {
FREE(rmesa->state.scissor.pClipRects);
rmesa->state.scissor.pClipRects = NULL;
assert( is_empty_list( & rmesa->swapped ) );
}
+ /* free the Mesa context */
+ rmesa->glCtx->DriverCtx = NULL;
+ _mesa_destroy_context( rmesa->glCtx );
+
/* free the option cache */
driDestroyOptionCache (&rmesa->optionCache);
radeonVtxfmtDestroy( rmesa->glCtx );
}
- /* free the Mesa context */
- rmesa->glCtx->DriverCtx = NULL;
- _mesa_destroy_context( rmesa->glCtx );
-
_mesa_vector4f_free( &rmesa->tcl.ObjClean );
if (rmesa->state.scissor.pClipRects) {
assert( is_empty_list( & rmesa->swapped ) );
}
+ /* free the Mesa context */
+ rmesa->glCtx->DriverCtx = NULL;
+ _mesa_destroy_context( rmesa->glCtx );
+
/* free the option cache */
driDestroyOptionCache (&rmesa->optionCache);