d3d11: Validate D3D11_RESOURCE_MISC_GENERATE_MIPS flag for 2D textures.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
22eabf1db7
commit
3561645aa3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue