From 4d708bd7fe22586b3936dcc15d3f49e063c35fd0 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Mon, 21 Mar 2022 14:26:47 +0100 Subject: [PATCH] vkd3d: Enable prototype extension VK_EXT_shader_module_identifier. Signed-off-by: Hans-Kristian Arntzen --- include/private/vulkan_private_extensions.h | 2 +- libs/vkd3d/device.c | 19 +++++++++++++++++++ libs/vkd3d/vkd3d_private.h | 5 +++++ libs/vkd3d/vulkan_procs.h | 3 +++ subprojects/Vulkan-Headers | 2 +- 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/private/vulkan_private_extensions.h b/include/private/vulkan_private_extensions.h index 03746346..86158187 100644 --- a/include/private/vulkan_private_extensions.h +++ b/include/private/vulkan_private_extensions.h @@ -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 diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 19090951..3011f9e3 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -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); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index e54d0063..93fcc6c7 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -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; diff --git a/libs/vkd3d/vulkan_procs.h b/libs/vkd3d/vulkan_procs.h index e7a1b2e4..71b9dc51 100644 --- a/libs/vkd3d/vulkan_procs.h +++ b/libs/vkd3d/vulkan_procs.h @@ -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 diff --git a/subprojects/Vulkan-Headers b/subprojects/Vulkan-Headers index 245d25ce..2c823b7f 160000 --- a/subprojects/Vulkan-Headers +++ b/subprojects/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 245d25ce8c3337919dc7916d0e62e31a0d8748ab +Subproject commit 2c823b7f27590ec0a489f7fbe14b154e13fa5cfb