diff options
author | Eric Anholt <[email protected]> | 2008-09-26 12:48:23 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-09-26 15:39:20 -0700 |
commit | 7d99ddcb2bb09f1f54d91e6e20e42d217a5bccdf (patch) | |
tree | 375b1df8ec08f194877dd12dec77b20cd716db88 /src/mesa/drivers/dri/i915 | |
parent | 8338cc25f913c809bec20f190a0e9f9bf8129aea (diff) |
intel: Fix a number of memory leaks on context destroy.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_vtbl.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_vtbl.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index 0ab27704d52..773a8b4dd01 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -566,6 +566,13 @@ i830_destroy_context(struct intel_context *intel) GLuint i; struct i830_context *i830 = i830_context(&intel->ctx); + intel_region_release(&i830->state.draw_region); + intel_region_release(&i830->state.depth_region); + intel_region_release(&i830->meta.draw_region); + intel_region_release(&i830->meta.depth_region); + intel_region_release(&i830->initial.draw_region); + intel_region_release(&i830->initial.depth_region); + for (i = 0; i < I830_TEX_UNITS; i++) { if (i830->state.tex_buffer[i] != NULL) { dri_bo_unreference(i830->state.tex_buffer[i]); diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index edbbe23e094..7431a9cf76d 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -490,6 +490,13 @@ i915_destroy_context(struct intel_context *intel) GLuint i; struct i915_context *i915 = i915_context(&intel->ctx); + intel_region_release(&i915->state.draw_region); + intel_region_release(&i915->state.depth_region); + intel_region_release(&i915->meta.draw_region); + intel_region_release(&i915->meta.depth_region); + intel_region_release(&i915->initial.draw_region); + intel_region_release(&i915->initial.depth_region); + for (i = 0; i < I915_TEX_UNITS; i++) { if (i915->state.tex_buffer[i] != NULL) { dri_bo_unreference(i915->state.tex_buffer[i]); |