Module: wine Branch: master Commit: 37e872e9013cf875803cc04bd3dbad7da4c49bf6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=37e872e9013cf875803cc04bd3...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Dec 16 23:00:39 2007 +0100
wined3d: Some improvements for SFLAG_CONVERTED checking.
We can check this flag before setting up the gl lock, and add the surface format to the FIXME.
---
dlls/wined3d/surface.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 76b8a1d..e45dd4c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -47,6 +47,10 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { if(myDevice->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED) { ActivateContext(myDevice, myDevice->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); } + if(This->Flags & SFLAG_CONVERTED) { + FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(This->resource.format)); + return; + }
ENTER_GL(); /* Make sure that a proper texture unit is selected, bind the texture @@ -86,12 +90,6 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { int src_pitch = 0; int dst_pitch = 0;
- if(This->Flags & SFLAG_CONVERTED) { - FIXME("Read back converted textures unsupported\n"); - LEAVE_GL(); - return; - } - if (This->Flags & SFLAG_NONPOW2) { unsigned char alignment = This->resource.wineD3DDevice->surface_alignment; src_pitch = This->bytesPerPixel * This->pow2Width;