wined3d: Explicitly check for WINED3DUSAGE_TEXTURE when validating surface dimensions in surface_private_setup().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
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 @@
}
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