[PATCH 5/7] wined3d: Explicitly check for WINED3DUSAGE_TEXTURE when validating surface dimensions in surface_private_setup().

Henri Verbeet hverbeet at codeweavers.com
Thu Mar 17 10:30:05 CDT 2016


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d61034a..846b78f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -558,7 +558,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
     }
 
     if ((surface->pow2Width > gl_info->limits.texture_size || surface->pow2Height > gl_info->limits.texture_size)
-            && !(texture->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL)))
+            && (texture->resource.usage & WINED3DUSAGE_TEXTURE))
     {
         /* One of three options:
          * 1: Do the same as we do with NPOT and scale the texture, (any
-- 
2.1.4




More information about the wine-patches mailing list