=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: tests: Add test for D3D12_FEATURE_FORMAT_INFO.
Alexandre Julliard
julliard at winehq.org
Thu Feb 14 16:02:20 CST 2019
Module: vkd3d
Branch: master
Commit: 7829461d6d475bbac11dd291bec8922f59bcc82c
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=7829461d6d475bbac11dd291bec8922f59bcc82c
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu Feb 14 12:22:29 2019 +0100
tests: Add test for D3D12_FEATURE_FORMAT_INFO.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tests/d3d12.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 70d7362..259f0ca 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,
More information about the wine-cvs
mailing list