[PATCH] 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.

Roderick Colenbrander thunderbird2k at gmx.net
Tue Mar 18 03:38:55 CDT 2008


---
 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 1b8bf74..008959d 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2239,10 +2239,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)) {
@@ -2331,10 +2327,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)) {
-- 
1.5.3.4


--========GMX191021205829696346078--



More information about the wine-patches mailing list