Commit b54553a2 authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

wined3d: Avoid calling LoadTexture with gl lock held in IWineD3DSurfaceImpl_PreLoad.

Needed to prevent ActivateContext being called while holding gl lock.
parent 1e6f02ed
......@@ -509,19 +509,22 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
}
glBindTexture(This->glDescription.target, This->glDescription.textureName);
checkGLcall("glBindTexture");
LEAVE_GL();
IWineD3DSurface_LoadTexture(iface, FALSE);
/* This is where we should be reducing the amount of GLMemoryUsed */
} else if (This->glDescription.textureName) { /* NOTE: the level 0 surface of a mpmapped texture must be loaded first! */
/* assume this is a coding error not a real error for now */
FIXME("Mipmap surface has a glTexture bound to it!\n");
LEAVE_GL();
}
if (This->resource.pool == WINED3DPOOL_DEFAULT) {
/* Tell opengl to try and keep this texture in video ram (well mostly) */
GLclampf tmp;
tmp = 0.9f;
ENTER_GL();
glPrioritizeTextures(1, &This->glDescription.textureName, &tmp);
LEAVE_GL();
}
LEAVE_GL();
}
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment