Hi all, This series is a first result of debugging some random crashes in dEQP's multi-threaded EGL tests.
The OpenGL spec is pretty clear that application must not modify a texture in one context while simultaneously using it for texturing (or even modifying) it in another context. Texturing simultaneously in multiple contexts is fine, though. This can lead to races when st_finalize_texture is called simultaneously for two contexts, or if two contexts simultaneously attempt to access the sampler view array of a texture. This series should fix most (all?) issues where our internal data structures could become corrupted. I am aware of one remaining corner case that could lead to rendering corruption. It appears rather non-trivial to fix, and it is documented in a comment of patch #5. Please review! Thanks, Nicolai -- src/gallium/auxiliary/util/u_inlines.h | 16 ++- src/gallium/include/pipe/p_context.h | 10 ++ src/mesa/state_tracker/st_atom_sampler.c | 12 +- src/mesa/state_tracker/st_atom_texture.c | 12 -- src/mesa/state_tracker/st_cb_texture.c | 59 +++++++-- src/mesa/state_tracker/st_manager.c | 3 + src/mesa/state_tracker/st_sampler_view.c | 137 +++++++++++++++++---- src/mesa/state_tracker/st_sampler_view.h | 7 ++ src/mesa/state_tracker/st_texture.h | 23 +++- 9 files changed, 205 insertions(+), 74 deletions(-) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev