From 7c97b8019350bca4081d87bef61b9ad830f8596d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Fri, 2 Nov 2007 21:30:50 +0100 Subject: [PATCH] wined3d: Remove an unneeded check. --- dlls/wined3d/surface.c | 49 ++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 5b6e90805e..f970a74fce 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3614,41 +3614,34 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb); if (This->Flags & SFLAG_INDRAWABLE) { - if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8 || - This->resource.format == WINED3DFMT_DXT1 || This->resource.format == WINED3DFMT_DXT2 || - This->resource.format == WINED3DFMT_DXT3 || This->resource.format == WINED3DFMT_DXT4 || - This->resource.format == WINED3DFMT_DXT5) - FIXME("Format %d not supported\n", This->resource.format); - else { - GLint prevRead; + GLint prevRead; - ENTER_GL(); - glGetIntegerv(GL_READ_BUFFER, &prevRead); - vcheckGLcall("glGetIntegerv"); - glReadBuffer(This->resource.wineD3DDevice->offscreenBuffer); - vcheckGLcall("glReadBuffer"); + ENTER_GL(); + glGetIntegerv(GL_READ_BUFFER, &prevRead); + vcheckGLcall("glGetIntegerv"); + glReadBuffer(This->resource.wineD3DDevice->offscreenBuffer); + vcheckGLcall("glReadBuffer"); - if(!(This->Flags & SFLAG_ALLOCATED)) { - surface_allocate_surface(This, internal, This->pow2Width, - This->pow2Height, format, type); - } + if(!(This->Flags & SFLAG_ALLOCATED)) { + surface_allocate_surface(This, internal, This->pow2Width, + This->pow2Height, format, type); + } - clear_unused_channels(This); + clear_unused_channels(This); - glCopyTexSubImage2D(This->glDescription.target, - This->glDescription.level, - 0, 0, 0, 0, - This->currentDesc.Width, - This->currentDesc.Height); - checkGLcall("glCopyTexSubImage2D"); + glCopyTexSubImage2D(This->glDescription.target, + This->glDescription.level, + 0, 0, 0, 0, + This->currentDesc.Width, + This->currentDesc.Height); + checkGLcall("glCopyTexSubImage2D"); - glReadBuffer(prevRead); - vcheckGLcall("glReadBuffer"); + glReadBuffer(prevRead); + vcheckGLcall("glReadBuffer"); - LEAVE_GL(); + LEAVE_GL(); - TRACE("Updated target %d\n", This->glDescription.target); - } + TRACE("Updated target %d\n", This->glDescription.target); return WINED3D_OK; } else { /* The only place where LoadTexture() might get called when isInDraw=1 -- 2.32.0.93.g670b81a890