Eric, I'm going to fix this in core Mesa so that we don't need to do this per-driver.
I didn't realize we were hitting this on the context-destroy path. -Brian Eric Anholt wrote: > Module: Mesa > Branch: master > Commit: 156a79f5bd7b3e79f219adf4619ec449a7c0ed1c > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=156a79f5bd7b3e79f219adf4619ec449a7c0ed1c > > Author: Eric Anholt <[email protected]> > Date: Wed May 6 13:58:57 2009 -0700 > > intel: Unmap buffers if needed at DeleteBuffer time. > > This fixes a crash in glean's pbo test, which tripped over the assert when a > context was destroyed while a buffer was still mapped (Mesa doesn't call > UnmapBuffer in that case). Regression in > c6bde8873fbda6d8467600b7491d8543c75b0509 > > --- > > src/mesa/drivers/dri/intel/intel_buffer_objects.c | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c > b/src/mesa/drivers/dri/intel/intel_buffer_objects.c > index c849e48..f6b0d76 100644 > --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c > +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c > @@ -35,6 +35,9 @@ > #include "intel_batchbuffer.h" > #include "intel_regions.h" > > +static GLboolean > +intel_bufferobj_unmap(GLcontext * ctx, > + GLenum target, struct gl_buffer_object *obj); > > /** Allocates a new dri_bo to store the data for the buffer object. */ > static void > @@ -100,7 +103,13 @@ intel_bufferobj_free(GLcontext * ctx, struct > gl_buffer_object *obj) > struct intel_buffer_object *intel_obj = intel_buffer_object(obj); > > assert(intel_obj); > - assert(!obj->Pointer); /* Mesa should have unmapped it */ > + > + /* Buffer objects are automatically unmapped when deleting according > + * to the spec, but Mesa doesn't do UnmapBuffer for us at context destroy > + * (though it does if you call glDeleteBuffers) > + */ > + if (obj->Pointer) > + intel_bufferobj_unmap(ctx, 0, obj); > > if (intel_obj->region) { > intel_bufferobj_release_region(intel, intel_obj); > > _______________________________________________ > mesa-commit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/mesa-commit > . > ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
