tests: Add test for D3D12_FEATURE_ARCHITECTURE.

This commit is contained in:
Józef Kucia 2016-10-19 13:10:12 +02:00
parent e0ba2fd2d3
commit 6904282702
2 changed files with 30 additions and 0 deletions

View File

@ -1266,6 +1266,14 @@ typedef struct D3D12_COMMAND_QUEUE_DESC
UINT NodeMask;
} D3D12_COMMAND_QUEUE_DESC;
typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
{
UINT NodeIndex;
BOOL TileBasedRenderer;
BOOL UMA;
BOOL CacheCoherentUMA;
} D3D12_FEATURE_DATA_ARCHITECTURE;
typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
{
DXGI_FORMAT Format;

View File

@ -500,6 +500,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;
ID3D12Device *device;
ULONG refcount;
HRESULT hr;
@ -541,6 +542,27 @@ static void test_check_feature_support(void)
return;
}
/* Architecture. */
memset(&architecture, 0, sizeof(architecture));
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_ARCHITECTURE,
&architecture, sizeof(architecture));
todo(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!architecture.NodeIndex, "Got unexpected node %u.\n", architecture.NodeIndex);
ok(!architecture.CacheCoherentUMA || architecture.UMA,
"Got unexpected cache coherent UMA %#x (UMA %#x).\n",
architecture.CacheCoherentUMA, architecture.UMA);
trace("UMA %#x, cache coherent UMA %#x, tile based renderer %#x.\n",
architecture.UMA, architecture.CacheCoherentUMA, architecture.TileBasedRenderer);
if (ID3D12Device_GetNodeCount(device) == 1)
{
memset(&architecture, 0, sizeof(architecture));
architecture.NodeIndex = 1;
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_ARCHITECTURE,
&architecture, sizeof(architecture));
todo(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
}
/* Feature levels */
memset(&feature_levels, 0, sizeof(feature_levels));
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FEATURE_LEVELS,