Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d11/texture.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index 12186dcf37..e8870d5d9a 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -942,6 +942,14 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi unsigned int levels; HRESULT hr;
+ 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 E_INVALIDARG; + } + texture->ID3D11Texture3D_iface.lpVtbl = &d3d11_texture3d_vtbl; texture->ID3D10Texture3D_iface.lpVtbl = &d3d10_texture3d_vtbl; texture->refcount = 1;