Commit 469e791f authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Invert "upsidedown" in fb_copy_to_texture_direct() and…

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.
parent 60bb8bd8
...@@ -2680,6 +2680,8 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D ...@@ -2680,6 +2680,8 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
glBindTexture(This->glDescription.target, This->glDescription.textureName); glBindTexture(This->glDescription.target, This->glDescription.textureName);
checkGLcall("glBindTexture"); checkGLcall("glBindTexture");
if(!swapchain) { if(!swapchain) {
TRACE("Reading from an offscreen target\n");
upsidedown = !upsidedown;
glReadBuffer(myDevice->offscreenBuffer); glReadBuffer(myDevice->offscreenBuffer);
} else { } else {
GLenum buffer = surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain); GLenum buffer = surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain);
...@@ -2808,6 +2810,8 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine ...@@ -2808,6 +2810,8 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
if(swapchain) { if(swapchain) {
glReadBuffer(surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain)); glReadBuffer(surface_get_gl_buffer(SrcSurface, (IWineD3DSwapChain *)swapchain));
} else { } else {
TRACE("Reading from an offscreen target\n");
upsidedown = !upsidedown;
glReadBuffer(myDevice->offscreenBuffer); glReadBuffer(myDevice->offscreenBuffer);
} }
...@@ -3192,10 +3196,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * ...@@ -3192,10 +3196,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
rect.x1 = tmp; rect.x1 = tmp;
upsideDown = !upsideDown; upsideDown = !upsideDown;
} }
if(!srcSwapchain) {
TRACE("Reading from an offscreen target\n");
upsideDown = !upsideDown;
}
if(rect.x2 - rect.x1 != srect.x2 - srect.x1) { if(rect.x2 - rect.x1 != srect.x2 - srect.x1) {
stretchx = TRUE; stretchx = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment