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>
This commit is contained in:
Henri Verbeet 2016-03-17 16:30:05 +01:00 committed by Alexandre Julliard
parent a2e5881de1
commit 7fb0ff9e89
1 changed files with 1 additions and 1 deletions

View File

@ -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