From 65eed4e48141b4bd2cc5280789f1f332fa353d83 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 2 Aug 2009 15:12:26 +0200
Subject: [PATCH 2/9] WineD3D: Only use WINE_normalized_texrect if ARB_texture_np2 is supported

---
 dlls/wined3d/directx.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 81f81db..1230f08 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -700,9 +700,12 @@ static void quirk_ati_dx9(struct wined3d_gl_info *gl_info)
      * fglrx doesn't advertise GL_ARB_texture_non_power_of_two, but it advertises opengl 2.0 which
      * has this extension promoted to core. The extension loading code sets this extension supported
      * due to that, so this code works on fglrx as well. */
-    TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing.\n");
-    gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
-    gl_info->supported[WINE_NORMALIZED_TEXRECT] = TRUE;
+    if(gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO])
+    {
+        TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing.\n");
+        gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
+        gl_info->supported[WINE_NORMALIZED_TEXRECT] = TRUE;
+    }
 
     /* fglrx has the same structural issues as the one described in quirk_apple_glsl_constants, although
      * it is generally more efficient. Reserve just 8 constants. */
-- 
1.6.3.3


