Commit 3561645a authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d11: Validate D3D11_RESOURCE_MISC_GENERATE_MIPS flag for 2D textures.

parent 22eabf1d
......@@ -472,6 +472,14 @@ static BOOL validate_texture2d_desc(const D3D11_TEXTURE2D_DESC *desc)
return FALSE;
}
if (desc->MiscFlags & D3D11_RESOURCE_MISC_GENERATE_MIPS
&& (~desc->BindFlags & (D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE)))
{
WARN("D3D11_RESOURCE_MISC_GENERATE_MIPS used without D3D11_BIND_RENDER_TARGET and "
"D3D11_BIND_SHADER_RESOURCE.\n");
return FALSE;
}
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment