vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS1.

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:14 +04:30 committed by Alexandre Julliard
parent f3bf1612c1
commit 1d46f25ea2
3 changed files with 40 additions and 0 deletions

View File

@ -1615,6 +1615,16 @@ typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
D3D_SHADER_MODEL HighestShaderModel;
} D3D12_FEATURE_DATA_SHADER_MODEL;
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
{
BOOL WaveOps;
UINT WaveLaneCountMin;
UINT WaveLaneCountMax;
UINT TotalLaneCount;
BOOL ExpandedComputeResourceStates;
BOOL Int64ShaderOps;
} D3D12_FEATURE_DATA_D3D12_OPTIONS1;
typedef enum D3D12_FEATURE
{
D3D12_FEATURE_D3D12_OPTIONS = 0,

View File

@ -1336,6 +1336,14 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
device->feature_options.VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation = FALSE;
device->feature_options.ResourceHeapTier = D3D12_RESOURCE_HEAP_TIER_2;
/* Shader Model 6 support. */
device->feature_options1.WaveOps = FALSE;
device->feature_options1.WaveLaneCountMin = 0;
device->feature_options1.WaveLaneCountMax = 0;
device->feature_options1.TotalLaneCount = 0;
device->feature_options1.ExpandedComputeResourceStates = TRUE;
device->feature_options1.Int64ShaderOps = features->shaderInt64;
if ((vr = VK_CALL(vkEnumerateDeviceExtensionProperties(physical_device, NULL, &count, NULL))) < 0)
{
ERR("Failed to enumerate device extensions, vr %d.\n", vr);
@ -2668,6 +2676,27 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device *
return S_OK;
}
case D3D12_FEATURE_D3D12_OPTIONS1:
{
D3D12_FEATURE_DATA_D3D12_OPTIONS1 *data = feature_data;
if (feature_data_size != sizeof(*data))
{
WARN("Invalid size %u.\n", feature_data_size);
return E_INVALIDARG;
}
*data = device->feature_options1;
TRACE("Wave ops %#x.\n", data->WaveOps);
TRACE("Min wave lane count %#x.\n", data->WaveLaneCountMin);
TRACE("Max wave lane count %#x.\n", data->WaveLaneCountMax);
TRACE("Total lane count %#x.\n", data->TotalLaneCount);
TRACE("Expanded compute resource states %#x.\n", data->ExpandedComputeResourceStates);
TRACE("Int64 shader ops %#x.\n", data->Int64ShaderOps);
return S_OK;
}
case D3D12_FEATURE_ROOT_SIGNATURE:
{
D3D12_FEATURE_DATA_ROOT_SIGNATURE *data = feature_data;

View File

@ -1131,6 +1131,7 @@ struct d3d12_device
VkPhysicalDeviceMemoryProperties memory_properties;
D3D12_FEATURE_DATA_D3D12_OPTIONS feature_options;
D3D12_FEATURE_DATA_D3D12_OPTIONS1 feature_options1;
struct vkd3d_vulkan_info vk_info;