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

            Bug ID: 95035
           Summary: Gallium OSMesa driver is far from being thread-safe
           Product: Mesa
           Version: 11.2
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: frederic.dever...@m4x.org
        QA Contact: mesa-dev@lists.freedesktop.org

see src/gallium/state_trackers/osmesa/osmesa.c

There are at least three global variables with no protection:
- stapi in get_st_api()
- stmgr in get_st_manager()
- BufferList

Consequently:
- OSMesaCreateContext cannot be called simultaneously from two threads
- OSMesaMakeCurrent called from two threads with the same buffer attribs will
share the same element in BufferList, and thus render to the same memory!

My guess is that these two objects should simply be stored in the context
itself, but I cannot foresee the consequences.

For example, will shared display lists still work?

I am willing to help on solving this (we use OSMesa in highly multithreaded
application).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to