Module: wine
Branch: master
Commit: 2d4d18b59dc26b8aee04553671b942071d9213b9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d4d18b59dc26b8aee0455367…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Tue Jun 17 01:42:55 2008 +0200
wined3d: Delay render target activation.
The ActivateContext in SetRenderTarget was an old regression prevention,
but now it is time to remove it.
---
dlls/wined3d/device.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 416e828..7754e50 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6724,13 +6724,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
* SetViewport may catch NOP viewport changes, which would occur when switching between equally sized targets
*/
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VIEWPORT);
-
- /* Activate the new render target for now. This shouldn't stay here, but is needed until all methods using gl activate the
- * ctx properly.
- * Use resourceload usage, this will just set the drawables and context but not apply any states. The stateblock may be
- * incomplete or incorrect when SetRenderTarget is called. DrawPrim() will apply the states when it is called.
- */
- ActivateContext(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD);
}
return WINED3D_OK;
}
Module: wine
Branch: master
Commit: 1c7f39ed1e4a03aac2dd434ea88892234899c4f6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c7f39ed1e4a03aac2dd434ea…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Tue Jun 17 01:41:02 2008 +0200
wined3d: Use CTXUSAGE_RESOURCELOAD for fb->texture reads.
There is no need for _BLIT usage. RESOURCELOAD should be faster.
---
dlls/wined3d/surface.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0171e31..1db152e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -886,12 +886,11 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This)
d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
IWineD3DSurface_GetContainer((IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain);
- /* Activate the surface. Set it up for blitting now, although not necessarily needed for LockRect.
- * Certain graphics drivers seem to dislike some enabled states when reading from opengl, the blitting usage
- * should help here. Furthermore unlockrect will need the context set up for blitting. The context manager will find
- * context->last_was_blit set on the unlock.
+ /* Activate the surface to read from. In some situations it isn't the currently active target(e.g. backbuffer
+ * locking during offscreen rendering). RESOURCELOAD is ok because glCopyTexSubImage2D isn't affected by any
+ * states in the stateblock, and no driver was found yet that had bugs in that regard.
*/
- ActivateContext(device, (IWineD3DSurface *) This, CTXUSAGE_BLIT);
+ ActivateContext(device, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD);
surface_bind_and_dirtify(This);
ENTER_GL();