d3d11: Implement d3d10_device_CheckFormatSupport().
The d3d11_device_CheckFormatSupport() function should filter the format support based on the device feature level. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0ccc7c09bb
commit
c371b46c4a
|
@ -11006,6 +11006,7 @@ static void check_format_support(const unsigned int *format_support,
|
|||
continue;
|
||||
}
|
||||
|
||||
todo_wine
|
||||
ok(supported, "Format %#x - %s supported, format support %#x.\n",
|
||||
format, feature_name, format_support[format]);
|
||||
}
|
||||
|
@ -11015,6 +11016,7 @@ static void test_required_format_support(void)
|
|||
{
|
||||
unsigned int format_support[DXGI_FORMAT_B4G4R4A4_UNORM + 1];
|
||||
ID3D10Device *device;
|
||||
unsigned int support;
|
||||
DXGI_FORMAT format;
|
||||
ULONG refcount;
|
||||
HRESULT hr;
|
||||
|
@ -11031,20 +11033,19 @@ static void test_required_format_support(void)
|
|||
return;
|
||||
}
|
||||
|
||||
support = 0xdeadbeef;
|
||||
hr = ID3D10Device_CheckFormatSupport(device, ~0u, &support);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!support, "Got unexpected format support %#x.\n", support);
|
||||
|
||||
memset(format_support, 0, sizeof(format_support));
|
||||
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
|
||||
{
|
||||
hr = ID3D10Device_CheckFormatSupport(device, format, &format_support[format]);
|
||||
todo_wine ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
|
||||
ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
|
||||
"Got unexpected result for format %#x: hr %#x, format_support %#x.\n",
|
||||
format, hr, format_support[format]);
|
||||
}
|
||||
if (hr == E_NOTIMPL)
|
||||
{
|
||||
skip("CheckFormatSupport not implemented.\n");
|
||||
ID3D10Device_Release(device);
|
||||
return;
|
||||
}
|
||||
|
||||
check_format_support(format_support, index_buffers, ARRAY_SIZE(index_buffers),
|
||||
D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER, "index buffer");
|
||||
|
|
|
@ -5417,10 +5417,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device1 *iface
|
|||
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 *iface,
|
||||
DXGI_FORMAT format, UINT *format_support)
|
||||
{
|
||||
FIXME("iface %p, format %s, format_support %p stub!\n",
|
||||
struct d3d_device *device = impl_from_ID3D10Device(iface);
|
||||
|
||||
TRACE("iface %p, format %s, format_support %p.\n",
|
||||
iface, debug_dxgi_format(format), format_support);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return d3d11_device_CheckFormatSupport(&device->ID3D11Device_iface, format, format_support);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface,
|
||||
|
|
Loading…
Reference in New Issue