From 4469fbd43d959cfa306c32c87339c03355135664 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 25 Mar 2009 10:12:27 +0100 Subject: [PATCH] wined3d: Don't use rtInternal for surfaces that are on a swapchain. These surfaces won't be attached to an FBO anyway, so avoid the cost of a potential format conversion when blitting from a non-RT surface. This is mostly an issue for ddraw applications with 16 bit render targets. --- dlls/wined3d/surface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index b0c6511b6f..35ba9a417e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1621,7 +1621,10 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ if(srgb_mode) { *internal = glDesc->glGammaInternal; - } else if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) { + } + else if (This->resource.usage & WINED3DUSAGE_RENDERTARGET + && !(This->Flags & SFLAG_SWAPCHAIN)) + { *internal = glDesc->rtInternal; } else { *internal = glDesc->glInternal; -- 2.32.0.93.g670b81a890