[Mesa-dev] [Bug 29824] New: OSMesaMakeCurrent triggers assertion on multiple MakeCurrent calls

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 26 13:42:55 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29824

           Summary: OSMesaMakeCurrent triggers assertion on multiple
                    MakeCurrent calls
           Product: Mesa
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: vladimir at pobox.com


OSMesaMakeCurrent seems to expect that it will be called only once, because
each time it ends up creating a new osmesa renderbuffer from the given buffer
and calls _mesa_add_renderbuffer to attach it to BUFFER_FRONT_LEFT.

Ignoring the performance implications of this if you're trying to use OSMesa
with multiple contexts, this ends up triggering an assertion in renderbuffer.c
_mesa_add_renderbuffer -- it asserts that there's no currently attached
renderbuffer at that attachment point, but of course there will be, from the
previous time that OSMesaMakeCurrent was called.

I'm not sure if this is currently leading to leaks of the renderbuffer
structures if the assertion is ignored; an easy fix would probably be to check
if there's a buffer attached to the gl_buffer, and if so, to detach it before
attaching a new one.  Not sure how to do that code-wise, though.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list