Roderick Colenbrander : wined3d: There is no need for the !Usage checks at the start of the resource type checks .

Alexandre Julliard julliard at winehq.org
Thu Mar 20 09:48:08 CDT 2008


Module: wine
Branch: master
Commit: 7fd87f10cdf0d9345d909a4b5cc6130855e7ee0a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7fd87f10cdf0d9345d909a4b5cc6130855e7ee0a

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Tue Mar 18 09:38:55 2008 +0100

wined3d: There is no need for the !Usage checks at the start of the resource type checks.

The return-path of the code will handle this properly and this also
ensures that the R8G8B8 dxVersion test is reached.

---

 dlls/wined3d/directx.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 5cbb082..aa2c537 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2235,10 +2235,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
         if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
             /* Check if the texture format is around */
             if(CheckTextureCapability(Adapter, CheckFormat)) {
-                /* No usage checks were requested, so return because we know that the format is supported */
-                if(!Usage)
-                    return WINED3D_OK;
-
                 if(Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
                     /* Check for automatic mipmap generation support */
                     if(GL_SUPPORT(SGIS_GENERATE_MIPMAP)) {
@@ -2327,10 +2323,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
 
         /* Check if the texture format is around */
         if(CheckTextureCapability(Adapter, CheckFormat)) {
-            /* No usage checks were requested, so return because we know that the format is supported */
-            if(!Usage)
-                return WINED3D_OK;
-
             if(Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
                 /* Check for automatic mipmap generation support */
                 if(GL_SUPPORT(SGIS_GENERATE_MIPMAP)) {




More information about the wine-cvs mailing list