wined3d: Improve thread safety in IWineD3DSurfaceImpl_BltOverride.
This commit is contained in:
parent
3e005ce915
commit
1dbc9d50c9
|
@ -3236,6 +3236,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ActivateContext(myDevice, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD);
|
||||||
|
ENTER_GL();
|
||||||
|
|
||||||
TRACE("Calling GetSwapChain with mydevice = %p\n", myDevice);
|
TRACE("Calling GetSwapChain with mydevice = %p\n", myDevice);
|
||||||
if(dstSwapchain && dstSwapchain->backBuffer && This == (IWineD3DSurfaceImpl*) dstSwapchain->backBuffer[0]) {
|
if(dstSwapchain && dstSwapchain->backBuffer && This == (IWineD3DSurfaceImpl*) dstSwapchain->backBuffer[0]) {
|
||||||
glDrawBuffer(GL_BACK);
|
glDrawBuffer(GL_BACK);
|
||||||
|
@ -3247,6 +3250,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
|
||||||
glDrawBuffer(myDevice->offscreenBuffer);
|
glDrawBuffer(myDevice->offscreenBuffer);
|
||||||
checkGLcall("glDrawBuffer(myDevice->offscreenBuffer3)");
|
checkGLcall("glDrawBuffer(myDevice->offscreenBuffer3)");
|
||||||
} else {
|
} else {
|
||||||
|
LEAVE_GL();
|
||||||
TRACE("Surface is higher back buffer, falling back to software\n");
|
TRACE("Surface is higher back buffer, falling back to software\n");
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
@ -3268,6 +3272,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
|
||||||
glDrawBuffer(GL_BACK);
|
glDrawBuffer(GL_BACK);
|
||||||
}
|
}
|
||||||
vcheckGLcall("glDrawBuffer");
|
vcheckGLcall("glDrawBuffer");
|
||||||
|
LEAVE_GL();
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue