Henri Verbeet : wined3d: Move texture filter lookup table initialization to basetexture_init().

Alexandre Julliard julliard at winehq.org
Wed Aug 5 09:47:55 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Aug  5 09:01:00 2009 +0200

wined3d: Move texture filter lookup table initialization to basetexture_init().

---

 dlls/wined3d/basetexture.c   |   11 +++++++++++
 dlls/wined3d/cubetexture.c   |   11 -----------
 dlls/wined3d/texture.c       |   11 -----------
 dlls/wined3d/volumetexture.c |   11 -----------
 4 files changed, 11 insertions(+), 33 deletions(-)

diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c
index c306367..086315e 100644
--- a/dlls/wined3d/basetexture.c
+++ b/dlls/wined3d/basetexture.c
@@ -48,6 +48,17 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DR
     texture->baseTexture.is_srgb = FALSE;
     texture->baseTexture.pow2Matrix_identity = TRUE;
 
+    if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
+    {
+        texture->baseTexture.minMipLookup = minMipLookup;
+        texture->baseTexture.magLookup = magLookup;
+    }
+    else
+    {
+        texture->baseTexture.minMipLookup = minMipLookup_noFilter;
+        texture->baseTexture.magLookup = magLookup_noFilter;
+    }
+
     return WINED3D_OK;
 }
 
diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c
index afba1e8..4b6900a 100644
--- a/dlls/wined3d/cubetexture.c
+++ b/dlls/wined3d/cubetexture.c
@@ -192,17 +192,6 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
         return hr;
     }
 
-    if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
-    {
-        texture->baseTexture.minMipLookup = minMipLookup;
-        texture->baseTexture.magLookup = magLookup;
-    }
-    else
-    {
-        texture->baseTexture.minMipLookup = minMipLookup_noFilter;
-        texture->baseTexture.magLookup = magLookup_noFilter;
-    }
-
     /* Find the nearest pow2 match. */
     pow2_edge_length = 1;
     while (pow2_edge_length < edge_length) pow2_edge_length <<= 1;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index ab05449..d89b3b5 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -197,17 +197,6 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
         return hr;
     }
 
-    if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
-    {
-        texture->baseTexture.minMipLookup = minMipLookup;
-        texture->baseTexture.magLookup = magLookup;
-    }
-    else
-    {
-        texture->baseTexture.minMipLookup = minMipLookup_noFilter;
-        texture->baseTexture.magLookup = magLookup_noFilter;
-    }
-
     /* Precalculated scaling for 'faked' non power of two texture coords.
      * Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
      * is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c
index a847f87..134ff74 100644
--- a/dlls/wined3d/volumetexture.c
+++ b/dlls/wined3d/volumetexture.c
@@ -150,17 +150,6 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT
         return hr;
     }
 
-    if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
-    {
-        texture->baseTexture.minMipLookup = minMipLookup;
-        texture->baseTexture.magLookup = magLookup;
-    }
-    else
-    {
-        texture->baseTexture.minMipLookup = minMipLookup_noFilter;
-        texture->baseTexture.magLookup = magLookup_noFilter;
-    }
-
     /* Is NP2 support for volumes needed? */
     texture->baseTexture.pow2Matrix[0] = 1.0f;
     texture->baseTexture.pow2Matrix[5] = 1.0f;




More information about the wine-cvs mailing list