vkd3d: Enable prototype extension VK_EXT_shader_module_identifier.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2022-03-21 14:26:47 +01:00
parent d9dc4b862a
commit 4d708bd7fe
5 changed files with 29 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#ifndef __VULKAN_PRIVATE_EXTENSIONS_H__
#define __VULKAN_PRIVATE_EXTENSIONS_H__
/* Nothing here at the moment. Add hacks here! */
/* Add hacks here! */
#endif

View File

@ -115,6 +115,8 @@ static const struct vkd3d_optional_extension_info optional_device_extensions[] =
VK_EXTENSION(EXT_SHADER_IMAGE_ATOMIC_INT64, EXT_shader_image_atomic_int64),
VK_EXTENSION(EXT_SCALAR_BLOCK_LAYOUT, EXT_scalar_block_layout),
VK_EXTENSION(EXT_PIPELINE_CREATION_FEEDBACK, EXT_pipeline_creation_feedback),
VK_EXTENSION(EXT_PIPELINE_CREATION_CACHE_CONTROL, EXT_pipeline_creation_cache_control),
VK_EXTENSION(EXT_SHADER_MODULE_IDENTIFIER, EXT_shader_module_identifier),
/* AMD extensions */
VK_EXTENSION(AMD_BUFFER_MARKER, AMD_buffer_marker),
VK_EXTENSION(AMD_DEVICE_COHERENT_MEMORY, AMD_device_coherent_memory),
@ -1490,6 +1492,23 @@ static void vkd3d_physical_device_info_init(struct vkd3d_physical_device_info *i
vk_prepend_struct(&info->features2, &info->device_coherent_memory_features_amd);
}
if (vulkan_info->EXT_pipeline_creation_cache_control)
{
info->pipeline_creation_cache_control_features.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES;
vk_prepend_struct(&info->features2, &info->pipeline_creation_cache_control_features);
}
if (vulkan_info->EXT_shader_module_identifier)
{
info->shader_module_identifier_features.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT;
info->shader_module_identifier_properties.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT;
vk_prepend_struct(&info->features2, &info->shader_module_identifier_features);
vk_prepend_struct(&info->properties2, &info->shader_module_identifier_properties);
}
/* Core in Vulkan 1.1. */
info->shader_draw_parameters_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES;
vk_prepend_struct(&info->features2, &info->shader_draw_parameters_features);

View File

@ -160,6 +160,8 @@ struct vkd3d_vulkan_info
bool EXT_shader_image_atomic_int64;
bool EXT_scalar_block_layout;
bool EXT_pipeline_creation_feedback;
bool EXT_pipeline_creation_cache_control;
bool EXT_shader_module_identifier;
/* AMD device extensions */
bool AMD_buffer_marker;
bool AMD_device_coherent_memory;
@ -3167,6 +3169,7 @@ struct vkd3d_physical_device_info
VkPhysicalDeviceDriverPropertiesKHR driver_properties;
VkPhysicalDeviceMaintenance4PropertiesKHR maintenance4_properties;
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV device_generated_commands_properties_nv;
VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT shader_module_identifier_properties;
VkPhysicalDeviceProperties2KHR properties2;
@ -3212,6 +3215,8 @@ struct vkd3d_physical_device_info
VkPhysicalDeviceMaintenance4FeaturesKHR maintenance4_features;
VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR ray_tracing_maintenance1_features;
VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV device_generated_commands_features_nv;
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT pipeline_creation_cache_control_features;
VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT shader_module_identifier_features;
VkPhysicalDeviceFeatures2 features2;

View File

@ -311,6 +311,9 @@ VK_DEVICE_EXT_PFN(vkDestroyIndirectCommandsLayoutNV)
VK_DEVICE_EXT_PFN(vkGetGeneratedCommandsMemoryRequirementsNV)
VK_DEVICE_EXT_PFN(vkCmdExecuteGeneratedCommandsNV)
/* VK_EXT_shader_module_identifier */
VK_DEVICE_EXT_PFN(vkGetShaderModuleIdentifierEXT)
#undef VK_INSTANCE_PFN
#undef VK_INSTANCE_EXT_PFN
#undef VK_DEVICE_PFN

@ -1 +1 @@
Subproject commit 245d25ce8c3337919dc7916d0e62e31a0d8748ab
Subproject commit 2c823b7f27590ec0a489f7fbe14b154e13fa5cfb