Commit 06264436 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d11: Report D3D11_FORMAT_SUPPORT_BUFFER in CheckFormatSupport().

Note that native also reports support for DXGI_FORMAT_UNKNOWN; this patch does not implement that behaviour. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent da9726a1
......@@ -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))
{
......
......@@ -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)
{
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment