radeonCleanupContext(&r300->radeon);
+#ifdef USER_BUFFERS
+ /* the memory manager might be accessed when Mesa frees the shared
+ * state, so don't destroy it earlier
+ */
+ radeon_mm_destroy(r300);
+#endif
+
/* free the option cache */
driDestroyOptionCache(&r300->radeon.optionCache);
resize_u_list(rmesa);
}
+void radeon_mm_destroy(r300ContextPtr rmesa)
+{
+ _mesa_free(rmesa->rmm->u_list);
+ rmesa->rmm->u_list = NULL;
+
+ _mesa_free(rmesa->rmm);
+ rmesa->rmm = NULL;
+}
+
void *radeon_mm_ptr(r300ContextPtr rmesa, int id)
{
assert(id <= rmesa->rmm->u_last);
};
extern void radeon_mm_init(r300ContextPtr rmesa);
+extern void radeon_mm_destroy(r300ContextPtr rmesa);
extern void *radeon_mm_ptr(r300ContextPtr rmesa, int id);
extern int radeon_mm_find(r300ContextPtr rmesa, void *ptr);
extern int radeon_mm_alloc(r300ContextPtr rmesa, int alignment, int size);