[Mesa-dev] [PATCH] st/wgl: Release stw_framebuffer::mutex after pbuffer creation

Jose Fonseca jfonseca at vmware.com
Thu Oct 13 11:18:25 PDT 2011


----- Original Message -----
> 
> Hi,
> 
> We have experienced a problem with the win32 wgl pbuffer
> implementation using
> gallium together with threading.
> 
> This attached change releases the stw_framebuffer::mutex past
> creation of
> the pbuffer stw_framebuffer. Without this change the pbuffers
> lock is never released. Since on win32 mutexes are recursive, this
> does not hurt as long as all actions on a context are done from
> the same thread. But if, for example, context creation happens in
> a different thread than usage, every access to the context will
> block for ever.
> 
> This actually fixes the observed problems in an application that
> really creates
> the context in a different thread than it makes use of the pbuffer.
> 
> Please review and may be apply if its ok.
> Thanks!
> 
> Mathias

Looks good.

We should also acquire/release the mutex on every entry point on that file for consistency, but it would make no difference, given that pbuffers can't be resized like normal windows are.

Do you have commit access or should I commit?

Jose


More information about the mesa-dev mailing list