From b95f30134b8df9f9b8683ce0e3913c3c5521fa92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 18 Dec 2007 13:52:48 +0100 Subject: [PATCH] wined3d: Implement texture -> swapchain blits with stretch_rect_fbo. --- dlls/wined3d/surface.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index e45dd4ce90b..7ba51257c3a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3095,6 +3095,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * SourceRectangle.top = 0; SourceRectangle.bottom = Src->currentDesc.Height; } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && GL_SUPPORT(EXT_FRAMEBUFFER_BLIT) && + (Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) == 0) { + TRACE("Using stretch_rect_fbo\n"); + /* The source is always a texture, but never the currently active render target, and the texture + * contents are never upside down + */ + stretch_rect_fbo((IWineD3DDevice *)myDevice, SrcSurface, (WINED3DRECT *) &SourceRectangle, + (IWineD3DSurface *)This, &rect, Filter, FALSE); + return WINED3D_OK; + } if(!CalculateTexRect(Src, &SourceRectangle, glTexCoord)) { /* Fall back to software */