diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl index 73a10125..ab7ab8a5 100644 --- a/include/vkd3d_d3d12.idl +++ b/include/vkd3d_d3d12.idl @@ -1625,6 +1625,15 @@ typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 BOOL Int64ShaderOps; } D3D12_FEATURE_DATA_D3D12_OPTIONS1; +typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1 +{ + UINT NodeIndex; + BOOL TileBasedRenderer; + BOOL UMA; + BOOL CacheCoherentUMA; + BOOL IsolatedMMU; +} D3D12_FEATURE_DATA_ARCHITECTURE1; + typedef enum D3D12_FEATURE { D3D12_FEATURE_D3D12_OPTIONS = 0, diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 9193fc3c..9ed112e1 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2488,7 +2488,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device * data->TileBasedRenderer = FALSE; data->UMA = d3d12_device_is_uma(device, &coherent); - data->CacheCoherentUMA = data->UMA ? coherent : FALSE; + data->CacheCoherentUMA = data->UMA && coherent; TRACE("Tile based renderer %#x, UMA %#x, cache coherent UMA %#x.\n", data->TileBasedRenderer, data->UMA, data->CacheCoherentUMA); @@ -2714,6 +2714,37 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device * return S_OK; } + case D3D12_FEATURE_ARCHITECTURE1: + { + D3D12_FEATURE_DATA_ARCHITECTURE1 *data = feature_data; + bool coherent; + + if (feature_data_size != sizeof(*data)) + { + WARN("Invalid size %u.\n", feature_data_size); + return E_INVALIDARG; + } + + if (data->NodeIndex) + { + FIXME("Multi-adapter not supported.\n"); + return E_INVALIDARG; + } + + WARN("Assuming device does not support tile based rendering.\n"); + data->TileBasedRenderer = FALSE; + + data->UMA = d3d12_device_is_uma(device, &coherent); + data->CacheCoherentUMA = data->UMA && coherent; + + WARN("Assuming device does not have an isolated memory management unit.\n"); + data->IsolatedMMU = FALSE; + + TRACE("Tile based renderer %#x, UMA %#x, cache coherent UMA %#x, isolated MMU %#x.\n", + data->TileBasedRenderer, data->UMA, data->CacheCoherentUMA, data->IsolatedMMU); + return S_OK; + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL;