wined3d: Call ActivateContext regardless of WINED3DCREATE_MULTITHREADED.
This commit is contained in:
parent
af268c6211
commit
c46c53a12c
|
@ -4246,12 +4246,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
|
|||
ERR("Output vertex declaration not implemented yet\n");
|
||||
}
|
||||
|
||||
/* Need any context to write to the vbo. In a non-multithreaded environment a context is there anyway,
|
||||
* and this call is quite performance critical, so don't call needlessly
|
||||
*/
|
||||
if(This->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED) {
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
/* Need any context to write to the vbo. */
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
|
||||
/* ProcessVertices reads from vertex buffers, which have to be assigned. DrawPrimitive and DrawPrimitiveUP
|
||||
* control the streamIsUP flag, thus restore it afterwards.
|
||||
|
@ -4741,9 +4737,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) {
|
|||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if(This->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED) {
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
ENTER_GL();
|
||||
glFlush();
|
||||
|
|
|
@ -158,9 +158,7 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface)
|
|||
if(locks == 0 && This->vbo && (This->dirtyend - This->dirtystart) > 0) {
|
||||
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
|
||||
|
||||
if(device->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED) {
|
||||
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
|
||||
ENTER_GL();
|
||||
GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, This->vbo));
|
||||
|
|
|
@ -44,9 +44,8 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
|
|||
return;
|
||||
}
|
||||
|
||||
if(myDevice->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED) {
|
||||
ActivateContext(myDevice, myDevice->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
ActivateContext(myDevice, myDevice->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
|
||||
if(This->Flags & SFLAG_CONVERTED) {
|
||||
FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(This->resource.format));
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue