Re: [PATCH 8/9] wined3d: remove ENTER_GL/LEAVE_GL in texture and cube texture PreLoad.
Not really needed for anything and can lead to ActivateContext being called while holding lock. --- dlls/wined3d/cubetexture.c | 2 -- dlls/wined3d/texture.c | 3 +-- 2 files changed, 1 insertions(+), 4 deletions(-)
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 -- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.gmx.net/de/entertainment/games/free
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
participants (2)
-
Alexander Dorofeyev -
Roderick Colenbrander