diff --git a/include/d3d12.idl b/include/d3d12.idl index f70b58ba..0c39f160 100644 --- a/include/d3d12.idl +++ b/include/d3d12.idl @@ -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; diff --git a/tests/d3d12.c b/tests/d3d12.c index 31119bf3..69a8a14f 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -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,