Disable the call to driBOReference() in i915_update_texture()
authorBrian <brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 16:53:25 +0000 (09:53 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 16:53:25 +0000 (09:53 -0700)
It doesn't seem to be needed and disabling it fixes a big memory leak with
some programs like xdemos/wincopy.c

src/mesa/pipe/i915simple/i915_state_sampler.c

index 8dec6781cd5c481f43a71ef958f18efc5959097b..95da30af4513d6ba9007c12e8f045f2a4f837ab9 100644 (file)
@@ -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->