mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Return hardcoded GPU virtual address support.
The hardcoded value makes a real app happy and it is close to values returned by various Windows drivers (AMD, Intel, Nvidia). In the long term, we might try to derive the values from maxResourceSize and/or sparseAddressSpaceSize. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bcd91910e4
commit
766361f9c3
@ -1535,6 +1535,12 @@ typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
|
||||
D3D_ROOT_SIGNATURE_VERSION HighestVersion;
|
||||
} D3D12_FEATURE_DATA_ROOT_SIGNATURE;
|
||||
|
||||
typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
|
||||
{
|
||||
UINT MaxGPUVirtualAddressBitsPerResource;
|
||||
UINT MaxGPUVirtualAddressBitsPerProcess;
|
||||
} D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT;
|
||||
|
||||
typedef enum D3D_SHADER_MODEL
|
||||
{
|
||||
D3D_SHADER_MODEL_5_1 = 0x51,
|
||||
|
@ -1840,6 +1840,22 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device *
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT:
|
||||
{
|
||||
D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT *data = feature_data;
|
||||
|
||||
if (feature_data_size != sizeof(*data))
|
||||
{
|
||||
WARN("Invalid size %u.\n", feature_data_size);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
FIXME("Returning 40 GPU virtual address bits.\n");
|
||||
data->MaxGPUVirtualAddressBitsPerResource = 40;
|
||||
data->MaxGPUVirtualAddressBitsPerProcess = 40;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case D3D12_FEATURE_SHADER_MODEL:
|
||||
{
|
||||
D3D12_FEATURE_DATA_SHADER_MODEL *data = feature_data;
|
||||
|
@ -962,6 +962,7 @@ static void test_node_count(void)
|
||||
|
||||
static void test_check_feature_support(void)
|
||||
{
|
||||
D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT gpu_virtual_address;
|
||||
D3D12_FEATURE_DATA_FEATURE_LEVELS feature_levels;
|
||||
D3D_FEATURE_LEVEL max_supported_feature_level;
|
||||
D3D12_FEATURE_DATA_ARCHITECTURE architecture;
|
||||
@ -1038,7 +1039,7 @@ static void test_check_feature_support(void)
|
||||
feature_levels.MaxSupportedFeatureLevel = 0;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FEATURE_LEVELS,
|
||||
&feature_levels, sizeof(feature_levels));
|
||||
ok(SUCCEEDED(hr), "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to check feature support, hr %#x.\n", hr);
|
||||
trace("Max supported feature level %#x.\n", feature_levels.MaxSupportedFeatureLevel);
|
||||
max_supported_feature_level = feature_levels.MaxSupportedFeatureLevel;
|
||||
|
||||
@ -1047,7 +1048,7 @@ static void test_check_feature_support(void)
|
||||
feature_levels.MaxSupportedFeatureLevel = 0;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FEATURE_LEVELS,
|
||||
&feature_levels, sizeof(feature_levels));
|
||||
ok(SUCCEEDED(hr), "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(feature_levels.MaxSupportedFeatureLevel == max_supported_feature_level,
|
||||
"Got unexpected feature level %#x, expected %#x.\n",
|
||||
feature_levels.MaxSupportedFeatureLevel, max_supported_feature_level);
|
||||
@ -1065,7 +1066,7 @@ static void test_check_feature_support(void)
|
||||
feature_levels.MaxSupportedFeatureLevel = 0;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FEATURE_LEVELS,
|
||||
&feature_levels, sizeof(feature_levels));
|
||||
ok(SUCCEEDED(hr), "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(feature_levels.MaxSupportedFeatureLevel == D3D_FEATURE_LEVEL_9_3,
|
||||
"Got unexpected max feature level %#x.\n", feature_levels.MaxSupportedFeatureLevel);
|
||||
|
||||
@ -1074,10 +1075,20 @@ static void test_check_feature_support(void)
|
||||
feature_levels.MaxSupportedFeatureLevel = 0;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FEATURE_LEVELS,
|
||||
&feature_levels, sizeof(feature_levels));
|
||||
ok(SUCCEEDED(hr), "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to check feature support, hr %#x.\n", hr);
|
||||
ok(feature_levels.MaxSupportedFeatureLevel == 0x3000,
|
||||
"Got unexpected max feature level %#x.\n", feature_levels.MaxSupportedFeatureLevel);
|
||||
|
||||
/* GPU virtual address */
|
||||
memset(&gpu_virtual_address, 0, sizeof(gpu_virtual_address));
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT,
|
||||
&gpu_virtual_address, sizeof(gpu_virtual_address));
|
||||
ok(hr == S_OK, "Failed to check GPU virtual address support, hr %#x.\n", hr);
|
||||
trace("GPU virtual address bits per resource: %u.\n",
|
||||
gpu_virtual_address.MaxGPUVirtualAddressBitsPerResource);
|
||||
trace("GPU virtual address bits per process: %u.\n",
|
||||
gpu_virtual_address.MaxGPUVirtualAddressBitsPerProcess);
|
||||
|
||||
refcount = ID3D12Device_Release(device);
|
||||
ok(!refcount, "ID3D12Device has %u references left.\n", (unsigned int)refcount);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user