Note that native also reports support for DXGI_FORMAT_UNKNOWN; this patch does not implement that behaviour.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 4 ++++ dlls/d3d11/tests/d3d11.c | 3 +++ 2 files changed, 7 insertions(+)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a7e1999c07a..8e5beb8893b 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3541,6 +3541,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * } flag_mapping[] = { + {WINED3D_RTYPE_BUFFER, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_BUFFER}, {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}, @@ -3587,6 +3588,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * } wined3d_mutex_unlock();
+ if (feature_level < D3D_FEATURE_LEVEL_10_0) + *format_support &= ~D3D11_FORMAT_SUPPORT_BUFFER; + if (*format_support & (D3D11_FORMAT_SUPPORT_TEXTURE1D | D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_TEXTURE3D)) { diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index fddb7bfd218..044c1ce5a17 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -19950,6 +19950,9 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) ok(!(format_support[format] & D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON), "Unexpected SHADER_SAMPLE_COMPARISON for format %#x, feature level %#x.\n", format, feature_level); + ok(!(format_support[format] & D3D11_FORMAT_SUPPORT_BUFFER), + "Unexpected BUFFER for format %#x, feature level %#x.\n", + format, feature_level); } if (feature_level < D3D_FEATURE_LEVEL_10_1) {