[Mesa-dev] [RFC 2/2] glx: drop GLX_MESA_multithread_makecurrent support

Eric Anholt eric at anholt.net
Thu Apr 20 18:58:21 UTC 2017


Timothy Arceri <tarceri at itsqueeze.com> writes:

> On 20/04/17 10:53, Eric Anholt wrote:
>> Timothy Arceri <tarceri at itsqueeze.com> writes:
>> 
>>> This extension is not supported by GLVND, also as far
>>> as I can tell this extension requires us to do extra
>>> locking for objects that are not normaly shared across
>>> contexts, like vertex array and pipeline objects.
>> 
>> Can you explain how it would require extra locking?  The extension
>> requires that the user not enter the same GL context twice at the same
>> time -- is there something else missing?
>> 
>
> So you can't end up with tread 1 calling glGenVertexArrays() while 
> thread 2 does some other call that requires a lookup of the vertex array 
> object hash table (which could currently be in the middle of rehashing 
> from the insert in glGenVertexArrays())?
>
> I didn't see anything that forbids this. It's totally possible I'm 
> misunderstanding this extension, if you could set me straight that would 
> be great.

From the spec:

        A direct rendering context may be
	current to multiple threads, with synchronization of access to
	the context thruogh the GL managed by the application through
	mutexes.

The application must use a mutex (or something) to keep itself from
entering the context twice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170420/420533c7/attachment.sig>


More information about the mesa-dev mailing list