diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5c2d700f754..2ad92dab009 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5485,8 +5485,8 @@ void apply_fbo_state(IWineD3DDevice *iface) { check_fbo_status(iface); } -void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const WINED3DRECT *src_rect, - IWineD3DSurface *dst_surface, const WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip) { +void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect, + IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; GLbitfield mask = GL_COLOR_BUFFER_BIT; /* TODO: Support blitting depth/stencil surfaces */ IWineD3DSwapChain *src_swapchain, *dst_swapchain; @@ -5525,7 +5525,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const glReadBuffer(buffer); checkGLcall("glReadBuffer()"); - flip = !flip; + src_rect->y1 = ((IWineD3DSurfaceImpl *)src_surface)->currentDesc.Height - src_rect->y1; + src_rect->y2 = ((IWineD3DSurfaceImpl *)src_surface)->currentDesc.Height - src_rect->y2; } else { TRACE("Source surface %p is offscreen\n", src_surface); bind_fbo(iface, GL_READ_FRAMEBUFFER_EXT, &This->src_fbo); @@ -5546,7 +5547,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const glDrawBuffer(buffer); checkGLcall("glDrawBuffer()"); - flip = !flip; + dst_rect->y1 = ((IWineD3DSurfaceImpl *)dst_surface)->currentDesc.Height - dst_rect->y1; + dst_rect->y2 = ((IWineD3DSurfaceImpl *)dst_surface)->currentDesc.Height - dst_rect->y2; } else { TRACE("Destination surface %p is offscreen\n", dst_surface); bind_fbo(iface, GL_DRAW_FRAMEBUFFER_EXT, &This->dst_fbo); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d6e5e221d75..80f17511c5a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1998,7 +1998,7 @@ static inline BOOL use_ps(IWineD3DDeviceImpl *device) { && ((IWineD3DPixelShaderImpl *)device->stateBlock->pixelShader)->baseShader.function); } -void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const WINED3DRECT *src_rect, - IWineD3DSurface *dst_surface, const WINED3DRECT *dst_rect, WINED3DTEXTUREFILTERTYPE filter, BOOL flip); +void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect, + IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, WINED3DTEXTUREFILTERTYPE filter, BOOL flip); #endif