[PATCH 8/9] wined3d: remove ENTER_GL/LEAVE_GL in texture and cube texture PreLoad.

Alexander Dorofeyev alexd4 at inbox.lv
Tue Mar 25 12:00:55 CDT 2008

Why, I checked what routines get called from that ENTER_GL/LEAVE_GL block in 
PreLoad, and they all seem to be pretty safe. LoadTexture doesn't do gl calls 
itself, but it calls LoadLocation. Other calls made in PreLoad like AddDirtyRect 
also don't do gl calls but may call LoadLocation. So it all comes down to 
LoadLocation (with location either INSYSMEM or INTEXTURE), and LoadLocation and 
all its callees that do gl calls appear to be handling this correctly.

Roderick Colenbrander wrote:
>> Not really needed for anything and can lead to ActivateContext being
>> called 
>> while holding lock.
> Sure this is a problem but there needs to be a place which calls ENTER_GL/LEAVE_GL. I believe LoadTexture and some of the other functions aren't handling that properly yet, so I wouldn't add this yet.
> It is very tricky.
> Roderick

More information about the wine-devel mailing list