Commit 4469fbd4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent 899df56e
...@@ -1621,7 +1621,10 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ ...@@ -1621,7 +1621,10 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
if(srgb_mode) { if(srgb_mode) {
*internal = glDesc->glGammaInternal; *internal = glDesc->glGammaInternal;
} else if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) { }
else if (This->resource.usage & WINED3DUSAGE_RENDERTARGET
&& !(This->Flags & SFLAG_SWAPCHAIN))
{
*internal = glDesc->rtInternal; *internal = glDesc->rtInternal;
} else { } else {
*internal = glDesc->glInternal; *internal = glDesc->glInternal;
......
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