vkd3d: Implement support for D3D12_FEATURE_ARCHITECTURE1.

Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2020-05-22 16:27:15 +04:30 committed by Alexandre Julliard
parent 1d46f25ea2
commit fad3b12703
2 changed files with 41 additions and 1 deletions

View File

@ -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,

View File

@ -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;