| Summary: | OSMesa Gallium OSMesaMakeCurrent | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | nachooya |
| Component: | Mesa core | Assignee: | mesa-dev |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | CC: | nachooya |
| Version: | git | ||
| Hardware: | All | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: | Patch to check buffer size when searching | ||
I think your fix is correct. I'll write a patch for this. Created attachment 94934 [details] [review] Patch to check buffer size when searching Can you verify this patch is OK? Verified, that's working. Thanks! Committed: cbacee207faf866b0444beb583d3d6f341a8ee78 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
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; }