From 37e872e9013cf875803cc04bd3dbad7da4c49bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 16 Dec 2007 23:00:39 +0100 Subject: [PATCH] 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 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 76b8a1d89b3..e45dd4ce90b 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;