From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- tests/d3d12.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 70d7362e4670..259f0cafa443 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -966,6 +966,7 @@ static void test_check_feature_support(void) D3D12_FEATURE_DATA_FEATURE_LEVELS feature_levels; D3D_FEATURE_LEVEL max_supported_feature_level; D3D12_FEATURE_DATA_ARCHITECTURE architecture; + D3D12_FEATURE_DATA_FORMAT_INFO format_info; ID3D12Device *device; ULONG refcount; HRESULT hr; @@ -1079,6 +1080,30 @@ static void test_check_feature_support(void) ok(feature_levels.MaxSupportedFeatureLevel == 0x3000, "Got unexpected max feature level %#x.\n", feature_levels.MaxSupportedFeatureLevel);
+ /* Format info. */ + memset(&format_info, 0, sizeof(format_info)); + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FORMAT_INFO, + &format_info, sizeof(format_info)); + todo ok(hr == S_OK, "Failed to get format info, hr %#x.\n", hr); + ok(format_info.Format == DXGI_FORMAT_UNKNOWN, "Got unexpected format %#x.\n", format_info.Format); + todo ok(format_info.PlaneCount == 1, "Got unexpected plane count %u.\n", format_info.PlaneCount); + + memset(&format_info, 0, sizeof(format_info)); + format_info.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FORMAT_INFO, + &format_info, sizeof(format_info)); + todo ok(hr == S_OK, "Failed to get format info, hr %#x.\n", hr); + ok(format_info.Format == DXGI_FORMAT_R8G8B8A8_UNORM, "Got unexpected format %#x.\n", format_info.Format); + todo ok(format_info.PlaneCount == 1, "Got unexpected plane count %u.\n", format_info.PlaneCount); + + memset(&format_info, 0, sizeof(format_info)); + format_info.Format = DXGI_FORMAT_R24G8_TYPELESS; + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FORMAT_INFO, + &format_info, sizeof(format_info)); + todo ok(hr == S_OK, "Failed to get format info, hr %#x.\n", hr); + ok(format_info.Format == DXGI_FORMAT_R24G8_TYPELESS, "Got unexpected format %#x.\n", format_info.Format); + todo ok(format_info.PlaneCount == 2, "Got unexpected plane count %u.\n", format_info.PlaneCount); + /* GPU virtual address */ memset(&gpu_virtual_address, 0, sizeof(gpu_virtual_address)); hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT,