vkd3d: Enable VK_EXT_shader_viewport_index_layer if available.

And expose the following feature cap on capable GPUs:
VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
Philip Rebohle 2020-04-03 15:10:43 +02:00 committed by Hans-Kristian Arntzen
parent 3ee4ab56d7
commit 4c1cc5732c
2 changed files with 4 additions and 2 deletions

View File

@ -158,6 +158,7 @@ static const struct vkd3d_optional_extension_info optional_device_extensions[] =
VK_EXTENSION(EXT_DESCRIPTOR_INDEXING, EXT_descriptor_indexing),
VK_EXTENSION(EXT_INLINE_UNIFORM_BLOCK, EXT_inline_uniform_block),
VK_EXTENSION(EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION, EXT_shader_demote_to_helper_invocation),
VK_EXTENSION(EXT_SHADER_VIEWPORT_INDEX_LAYER, EXT_shader_viewport_index_layer),
VK_EXTENSION(EXT_SUBGROUP_SIZE_CONTROL, EXT_subgroup_size_control),
VK_EXTENSION(EXT_TEXEL_BUFFER_ALIGNMENT, EXT_texel_buffer_alignment),
VK_EXTENSION(EXT_TRANSFORM_FEEDBACK, EXT_transform_feedback),
@ -3848,6 +3849,7 @@ static void d3d12_device_caps_init_feature_options(struct d3d12_device *device)
{
const VkPhysicalDeviceFeatures *features = &device->device_info.features2.features;
D3D12_FEATURE_DATA_D3D12_OPTIONS *options = &device->d3d12_caps.options;
const struct vkd3d_vulkan_info *vk_info = &device->vk_info;
options->DoublePrecisionFloatShaderOps = features->shaderFloat64;
options->OutputMergerLogicOp = features->logicOp;
@ -3867,8 +3869,7 @@ static void d3d12_device_caps_init_feature_options(struct d3d12_device *device)
options->StandardSwizzle64KBSupported = FALSE;
options->CrossNodeSharingTier = D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED;
options->CrossAdapterRowMajorTextureSupported = FALSE;
/* Requires VK_EXT_shader_viewport_index_layer */
options->VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation = FALSE;
options->VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation = vk_info->EXT_shader_viewport_index_layer;
options->ResourceHeapTier = D3D12_RESOURCE_HEAP_TIER_2;
}

View File

@ -120,6 +120,7 @@ struct vkd3d_vulkan_info
bool EXT_descriptor_indexing;
bool EXT_inline_uniform_block;
bool EXT_shader_demote_to_helper_invocation;
bool EXT_shader_viewport_index_layer;
bool EXT_subgroup_size_control;
bool EXT_texel_buffer_alignment;
bool EXT_transform_feedback;