From: Brian Date: Wed, 7 Nov 2007 16:53:25 +0000 (-0700) Subject: Disable the call to driBOReference() in i915_update_texture() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=182e861eeae479c85191fcd6ccb41bf10f43507b;p=mesa.git Disable the call to driBOReference() in i915_update_texture() It doesn't seem to be needed and disabling it fixes a big memory leak with some programs like xdemos/wincopy.c --- diff --git a/src/mesa/pipe/i915simple/i915_state_sampler.c b/src/mesa/pipe/i915simple/i915_state_sampler.c index 8dec6781cd5..95da30af451 100644 --- a/src/mesa/pipe/i915simple/i915_state_sampler.c +++ b/src/mesa/pipe/i915simple/i915_state_sampler.c @@ -234,10 +234,14 @@ i915_update_texture(struct i915_context *i915, uint unit, } #endif - + /* this reference does not seem to be needed. In fact, when it's enabled + * we leak a lot of memory (try xdemos/wincopy). + */ +#if 0 { /*struct pipe_buffer_handle *p =*/ driBOReference(mt->region->buffer); } +#endif #if 0 i915->state.tex_buffer[unit] = driBOReference(intelObj->mt->region->