H. Verbeet : wined3d: Invert "upsidedown" in fb_copy_to_texture_direct() and fb_copy_to_texture_hwstretch() rather than BltOverride().

Alexandre Julliard julliard at winehq.org
Mon Jun 30 08:26:54 CDT 2008


Module: wine
Branch: master
Commit: 469e791f0058921790b8619c5443384721685f3e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=469e791f0058921790b8619c5443384721685f3e

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Sun Jun 29 22:49:05 2008 +0200

wined3d: Invert "upsidedown" in fb_copy_to_texture_direct() and fb_copy_to_texture_hwstretch() rather than BltOverride().

This inversion is specific to the blit implementation being used,
stretch_rect_fbo() doesn't need it.

---

 dlls/wined3d/surface.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d892031..4b91d1f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2680,6 +2680,8 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
     glBindTexture(This->glDescription.target, This->glDescription.textureName);
     checkGLcall("glBindTexture");
     if(!swapchain) {
+        TRACE("Reading from an offscreen target\n");
+        upsidedown = !upsidedown;
         glReadBuffer(myDevice->offscreenBuffer);
     } else {
         GLenum buffer = surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain);
@@ -2808,6 +2810,8 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
     if(swapchain) {
         glReadBuffer(surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain));
     } else {
+        TRACE("Reading from an offscreen target\n");
+        upsidedown = !upsidedown;
         glReadBuffer(myDevice->offscreenBuffer);
     }
 
@@ -3192,10 +3196,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
             rect.x1 = tmp;
             upsideDown = !upsideDown;
         }
-        if(!srcSwapchain) {
-            TRACE("Reading from an offscreen target\n");
-            upsideDown = !upsideDown;
-        }
 
         if(rect.x2 - rect.x1 != srect.x2 - srect.x1) {
             stretchx = TRUE;




More information about the wine-cvs mailing list