Henri Verbeet : wined3d: Do not depend on context_attach_surface_fbo() to load the surface in stretch_rect_fbo().
Alexandre Julliard
julliard at winehq.org
Wed Feb 3 09:33:05 CST 2010
Module: wine
Branch: master
Commit: 5f3dccddb46c3521572d0dfc3a54e9dbbdf8bf86
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f3dccddb46c3521572d0dfc3a54e9dbbdf8bf86
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Feb 3 11:02:23 2010 +0100
wined3d: Do not depend on context_attach_surface_fbo() to load the surface in stretch_rect_fbo().
---
dlls/wined3d/device.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f915d1b..1b5db14 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5791,6 +5791,12 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
break;
}
+ /* Make sure the drawables are up-to-date. Note that loading the
+ * destination surface isn't strictly required if we overwrite the
+ * entire surface. */
+ IWineD3DSurface_LoadLocation(src_surface, SFLAG_INDRAWABLE, NULL);
+ IWineD3DSurface_LoadLocation(dst_surface, SFLAG_INDRAWABLE, NULL);
+
/* Attach src surface to src fbo */
src_swapchain = get_swapchain(src_surface);
dst_swapchain = get_swapchain(dst_surface);
@@ -5806,9 +5812,6 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
GLenum buffer = surface_get_gl_buffer(src_surface);
TRACE("Source surface %p is onscreen\n", src_surface);
- /* Make sure the drawable is up to date. In the offscreen case
- * attach_surface_fbo() implicitly takes care of this. */
- IWineD3DSurface_LoadLocation(src_surface, SFLAG_INDRAWABLE, NULL);
if(buffer == GL_FRONT) {
RECT windowsize;
@@ -5845,9 +5848,6 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
GLenum buffer = surface_get_gl_buffer(dst_surface);
TRACE("Destination surface %p is onscreen\n", dst_surface);
- /* Make sure the drawable is up to date. In the offscreen case
- * attach_surface_fbo() implicitly takes care of this. */
- IWineD3DSurface_LoadLocation(dst_surface, SFLAG_INDRAWABLE, NULL);
if(buffer == GL_FRONT) {
RECT windowsize;
More information about the wine-cvs
mailing list