Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d11/device.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a6f4e6badbca..880c8b6595e6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3332,15 +3332,17 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * { enum wined3d_resource_type rtype; unsigned int bind_flags; + unsigned int usage; D3D11_FORMAT_SUPPORT flag; } flag_mapping[] = { - {WINED3D_RTYPE_TEXTURE_1D, WINED3D_BIND_SHADER_RESOURCE, D3D11_FORMAT_SUPPORT_TEXTURE1D}, - {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, D3D11_FORMAT_SUPPORT_TEXTURE2D}, - {WINED3D_RTYPE_TEXTURE_3D, WINED3D_BIND_SHADER_RESOURCE, D3D11_FORMAT_SUPPORT_TEXTURE3D}, - {WINED3D_RTYPE_NONE, WINED3D_BIND_RENDER_TARGET, D3D11_FORMAT_SUPPORT_RENDER_TARGET}, - {WINED3D_RTYPE_NONE, WINED3D_BIND_DEPTH_STENCIL, D3D11_FORMAT_SUPPORT_DEPTH_STENCIL}, + {WINED3D_RTYPE_TEXTURE_1D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE1D}, + {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE2D}, + {WINED3D_RTYPE_TEXTURE_3D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE3D}, + {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, WINED3DUSAGE_LEGACY_CUBEMAP, D3D11_FORMAT_SUPPORT_TEXTURECUBE}, + {WINED3D_RTYPE_NONE, WINED3D_BIND_RENDER_TARGET, 0, D3D11_FORMAT_SUPPORT_RENDER_TARGET}, + {WINED3D_RTYPE_NONE, WINED3D_BIND_DEPTH_STENCIL, 0, D3D11_FORMAT_SUPPORT_DEPTH_STENCIL}, }; HRESULT hr;
@@ -3364,7 +3366,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * for (i = 0; i < ARRAY_SIZE(flag_mapping); ++i) { hr = wined3d_check_device_format(wined3d, wined3d_adapter, params.device_type, - WINED3DFMT_UNKNOWN, 0, flag_mapping[i].bind_flags, flag_mapping[i].rtype, wined3d_format); + WINED3DFMT_UNKNOWN, flag_mapping[i].usage, flag_mapping[i].bind_flags, flag_mapping[i].rtype, wined3d_format); if (hr == WINED3DERR_NOTAVAILABLE || hr == WINED3DOK_NOMIPGEN) continue; if (hr != WINED3D_OK)