Keith Whitwell wrote:
> On Wed, Sep 24, 2008 at 2:23 PM, Ian Romanick <[EMAIL PROTECTED]> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Keith and Eric,
>>
>> Starting with Mesa commit 33fef8be825ee8ec6abc0c2ffd9a3a967d84df88 I'm
>> seeing consistent assertion failures in GEM-based Mesa builds.
>> Specifically, I'm seeing:
>>
>> teapot: intel_buffer_objects.c:247: intel_bufferobj_unmap: Assertion
>> `intel_obj' failed.
>>
>> I haven't really investigated it beyond git-bisect yet.  I'm hoping that
>> one of you will see something obvious.  Thoughts?
> 
> Most likely the "Null buffer object" is being mapped/unmapped here.
> 
> 
> There are quite a few cases through core mesa where we do checks for
> 
>    if (bufferObj->Name != 0) {
>        do things one way, for proper buffer obj's
>    } else {
>        do things in a very similar way for the NULL buffer obj (ie
> traditional array data)
>    }
> 
> That code is missing in this instance.  Note that in almost every case
> the NULL bufferobj code is what the regular bufferobj code would
> degenerate to if the MapBuffer() call returned NULL.
> 
> Ideally core mesa should be able to treat the NULL BufferObject in the
> same path as regular bufferobject & not have to special case every
> place where it might be used.
> 
> Maybe the easiest way to do that would be to add something like a:
> 
> void *_mesa_map_buffer_object( GLcontext *ctx, struct gl_buffer_object
> *BufferObj, ... )
> {
>    if (BufferObj->Name == 0)
>       return NULL;
> 
>    return ctx->Driver.MapBufferObj( ctx, BufferObj, ... );
> }
> 
> and use that in place of direct calls to the driver function
> throughout mesa.  There'd be a need to examine each usage to see if
> this was safe.
> 
> In the meantime, either adding the Name==0 check to the vbo code, or
> returning NULL in the driver code would probably fix the issue.

I basically did the later.

The NullBufferObject probably shouldn't be used at all in the VBO 
module.  It was only meant to simplify the buffer object-related API 
functions.

-Brian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to