intel: Clean up several 965 memory leaks on context destroy.
This commit is contained in:
@@ -73,6 +73,8 @@ i830CreateContext(const __GLcontextModes * mesaVis,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
_math_matrix_ctr(&intel->ViewportMatrix);
|
||||
|
||||
/* Initialize swrast, tnl driver tables: */
|
||||
intelInitSpanFuncs(ctx);
|
||||
intelInitTriFuncs(ctx);
|
||||
|
||||
@@ -119,6 +119,8 @@ i915CreateContext(const __GLcontextModes * mesaVis,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
_math_matrix_ctr(&intel->ViewportMatrix);
|
||||
|
||||
/* Initialize swrast, tnl driver tables: */
|
||||
intelInitSpanFuncs(ctx);
|
||||
intelInitTriFuncs(ctx);
|
||||
|
||||
@@ -67,6 +67,8 @@ static void brw_destroy_context( struct intel_context *intel )
|
||||
brw_destroy_state(brw);
|
||||
brw_draw_destroy( brw );
|
||||
|
||||
_mesa_free(brw->wm.compile_data);
|
||||
|
||||
brw_FrameBufferTexDestroy( brw );
|
||||
|
||||
for (i = 0; i < brw->state.nr_draw_regions; i++)
|
||||
@@ -90,6 +92,7 @@ static void brw_destroy_context( struct intel_context *intel )
|
||||
dri_bo_release(&brw->wm.bind_bo);
|
||||
for (i = 0; i < BRW_WM_MAX_SURF; i++)
|
||||
dri_bo_release(&brw->wm.surf_bo[i]);
|
||||
dri_bo_release(&brw->wm.sampler_bo);
|
||||
dri_bo_release(&brw->wm.prog_bo);
|
||||
dri_bo_release(&brw->wm.state_bo);
|
||||
dri_bo_release(&brw->cc.prog_bo);
|
||||
|
||||
@@ -573,8 +573,6 @@ intelInitContext(struct intel_context *intel,
|
||||
|
||||
intel->do_usleeps = (fthrottle_mode == DRI_CONF_FTHROTTLE_USLEEPS);
|
||||
|
||||
_math_matrix_ctr(&intel->ViewportMatrix);
|
||||
|
||||
if (IS_965(intelScreen->deviceID) && !intel->intelScreen->irq_active) {
|
||||
_mesa_printf("IRQs not active. Exiting\n");
|
||||
exit(1);
|
||||
|
||||
@@ -302,6 +302,7 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv)
|
||||
|
||||
dri_bufmgr_destroy(intelScreen->bufmgr);
|
||||
intelUnmapScreenRegions(intelScreen);
|
||||
driDestroyOptionCache(&intelScreen->optionCache);
|
||||
|
||||
FREE(intelScreen);
|
||||
sPriv->private = NULL;
|
||||
|
||||
Reference in New Issue
Block a user