[Mesa-dev] [Bug 75543] New: OSMesa Gallium OSMesaMakeCurrent

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 26 11:13:28 PST 2014


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

          Priority: medium
            Bug ID: 75543
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: OSMesa Gallium OSMesaMakeCurrent
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: nachooya at gmail.com
          Hardware: All
            Status: NEW
           Version: git
         Component: Mesa core
           Product: Mesa

Related Bug ID: 63117

Function at /Mesa-10.0.3/src/gallium/state_trackers/osmesa/osmesa.c

Is defined as:

osmesa_find_buffer(enum pipe_format color_format,
                   enum pipe_format ds_format,
                   enum pipe_format accum_format)

but should take care, also, of buffer size, other case mesa segfaults when size
changes between calls.

As a workaround I implemented it as (but probably is not the best approach):

static struct osmesa_buffer *
osmesa_find_buffer(enum pipe_format color_format,
                   enum pipe_format ds_format,
                   enum pipe_format accum_format,
                   GLsizei width, GLsizei height
                  )
{
   struct osmesa_buffer *b;

   /* Check if we already have a suitable buffer for the given formats */
   for (b = BufferList; b; b = b->next) {
      if (b->visual.color_format == color_format &&
          b->visual.depth_stencil_format == ds_format &&
          b->visual.accum_format == accum_format &&
          b->width == width &&
          b->height == height) {
         return b;
      }
   }
   return NULL;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140226/a61b9ecb/attachment.html>


More information about the mesa-dev mailing list