[Mesa-dev] [Bug 95035] Gallium OSMesa driver is far from being thread-safe
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Apr 21 14:28:40 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=95035
--- Comment #5 from Frederic Devernay <frederic.devernay at m4x.org> ---
OK, there was another issue, which actually may affect other Gallium drivers as
well:
st_framebuffer_reuse_or_create() uses pointer comparison to check if it can
reuse a framebuffer.
The problem is that a call to free followed by a call to malloc may very well
return the exact same pointer! Pointer comparison should be used as a safe
check but is very unreliable.
The consequence is that osmesa_st_framebuffer_validate() was not called and the
textures were not allocated, even though the osbuffer was just allocated.
I added a fix which explicitely sets st->ctx->WinSysDrawBuffer and
st->ctx->WinSysReadBuffer to NULL, so that the framebuffer is reallocated and
framebuffer_validate() is always called.
This is in the second version of the patch set.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160421/5bb917d3/attachment.html>
More information about the mesa-dev
mailing list