From 7e3f33623d4ddf7a8fb0bab30b5c9ce18344e0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 25 Aug 2016 21:23:52 +0200 Subject: d3d11: Add a hack to prevent creation of 1d cube textures There is already a check in wined3d to prevent this, but it is not triggered as the request to create a cube texture is currently not forwarded to wined3d. The correct solution would be to change wined3d_usage_from_d3d11 to translate the D3D11_RESOURCE_MISC_TEXTURECUBE flag into WINED3DUSAGE_LEGACY_CUBEMAP. This would also prevent the creation of 2d cube map arrays which are not supported yet, but some d3d11 tests are based on the fact that wine pretends to support them by simply using 2d array textues and ignoring the cube map flags. --- dlls/d3d11/texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index eb39ef8..541ed45 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -444,6 +444,9 @@ static HRESULT d3d_texture1d_init(struct d3d_texture1d *texture, struct d3d_devi unsigned int levels; HRESULT hr; + if (desc->MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE) + return E_INVALIDARG; + texture->ID3D11Texture1D_iface.lpVtbl = &d3d11_texture1d_vtbl; texture->ID3D10Texture1D_iface.lpVtbl = &d3d10_texture1d_vtbl; texture->refcount = 1; -- 2.8.1