[PATCH 4/5] wined3d: Properly set WINED3DFMT_FLAG_FILTERING in init_format_texture_info().

Henri Verbeet hverbeet at codeweavers.com
Wed Jan 23 01:50:12 CST 2013


Note that this isn't strictly a nop, WINED3DFMT_FLAG_FILTERING is also used in
e.g. wined3d_texture_init().
---
 dlls/wined3d/directx.c | 3 +--
 dlls/wined3d/utils.c   | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 18e8f31..b49e897 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3485,8 +3485,7 @@ static BOOL CheckDepthStencilCapability(const struct wined3d_adapter *adapter,
 static BOOL CheckFilterCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format)
 {
     /* The flags entry of a format contains the filtering capability */
-    if ((format->flags & WINED3DFMT_FLAG_FILTERING)
-            || !(adapter->gl_info.quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING))
+    if (format->flags & WINED3DFMT_FLAG_FILTERING)
         return TRUE;
 
     return FALSE;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 5c71c55..39309ae 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1287,6 +1287,9 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
         format->height_scale.numerator = 1;
         format->height_scale.denominator = 1;
 
+        if (!(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING))
+            format->flags |= WINED3DFMT_FLAG_FILTERING;
+
         if (format->glGammaInternal != format->glInternal)
         {
             /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */
-- 
1.7.12.4




More information about the wine-patches mailing list