[Bug 103304] multi-threaded usage of Gallium RadeonSI leads to NULL pointer exception in pb_cache_reclaim_buffer
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 18 10:43:37 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103304
--- Comment #3 from Nicolai Hähnle <nhaehnle at gmail.com> ---
After thinking about it some more, I think it's very likely that your
application also has a bug, a write-after-read bug to be precise.
What I'm suspecting is that you're doing this:
Thread 1 Thread 2
-------- --------
glBindTexture(tex);
glDraw*(...);
glFlush();
glTextureSubImage(tex, ...);
Unless you use glFinish() or glFenceSync() / glWaitSync() synchronization,
there is no guarantee that thread 1's draw has completed before thread 2's
texture change. In other words, the implementation is allowed to execute the
texture modification *before* the draw. Especially with Gallium threading, this
is quite likely to happen.
(We still also have a bug in the driver, but until I can actually double-check
your code, I'd say it's quite likely that you have a write-after-read hazard
like the one explained above.)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171018/af7c889a/attachment.html>
More information about the dri-devel
mailing list