|
@@ -769,6 +769,7 @@ Error VulkanContext::_check_capabilities() {
|
|
VkPhysicalDeviceFragmentShadingRateFeaturesKHR vrs_features = {};
|
|
VkPhysicalDeviceFragmentShadingRateFeaturesKHR vrs_features = {};
|
|
VkPhysicalDevice16BitStorageFeaturesKHR storage_feature = {};
|
|
VkPhysicalDevice16BitStorageFeaturesKHR storage_feature = {};
|
|
VkPhysicalDeviceMultiviewFeatures multiview_features = {};
|
|
VkPhysicalDeviceMultiviewFeatures multiview_features = {};
|
|
|
|
+ VkPhysicalDevicePipelineCreationCacheControlFeatures pipeline_cache_control_features = {};
|
|
|
|
|
|
if (device_api_version >= VK_API_VERSION_1_2) {
|
|
if (device_api_version >= VK_API_VERSION_1_2) {
|
|
device_features_vk12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
|
|
device_features_vk12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
|
|
@@ -820,6 +821,15 @@ Error VulkanContext::_check_capabilities() {
|
|
next = &multiview_features;
|
|
next = &multiview_features;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (is_device_extension_enabled(VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME)) {
|
|
|
|
+ pipeline_cache_control_features = {
|
|
|
|
+ /*sType*/ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES,
|
|
|
|
+ /*pNext*/ next,
|
|
|
|
+ /*pipelineCreationCacheControl*/ false,
|
|
|
|
+ };
|
|
|
|
+ next = &pipeline_cache_control_features;
|
|
|
|
+ }
|
|
|
|
+
|
|
VkPhysicalDeviceFeatures2 device_features;
|
|
VkPhysicalDeviceFeatures2 device_features;
|
|
device_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
|
|
device_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
|
|
device_features.pNext = next;
|
|
device_features.pNext = next;
|
|
@@ -860,6 +870,10 @@ Error VulkanContext::_check_capabilities() {
|
|
storage_buffer_capabilities.storage_push_constant_16_is_supported = storage_feature.storagePushConstant16;
|
|
storage_buffer_capabilities.storage_push_constant_16_is_supported = storage_feature.storagePushConstant16;
|
|
storage_buffer_capabilities.storage_input_output_16 = storage_feature.storageInputOutput16;
|
|
storage_buffer_capabilities.storage_input_output_16 = storage_feature.storageInputOutput16;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (is_device_extension_enabled(VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME)) {
|
|
|
|
+ pipeline_cache_control_support = pipeline_cache_control_features.pipelineCreationCacheControl;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// Check extended properties.
|
|
// Check extended properties.
|
|
@@ -1422,6 +1436,16 @@ Error VulkanContext::_create_device() {
|
|
nextptr = &vrs_features;
|
|
nextptr = &vrs_features;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ VkPhysicalDevicePipelineCreationCacheControlFeatures pipeline_cache_control_features = {};
|
|
|
|
+ if (pipeline_cache_control_support) {
|
|
|
|
+ pipeline_cache_control_features.sType =
|
|
|
|
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES;
|
|
|
|
+ pipeline_cache_control_features.pNext = nextptr;
|
|
|
|
+ pipeline_cache_control_features.pipelineCreationCacheControl = pipeline_cache_control_support;
|
|
|
|
+
|
|
|
|
+ nextptr = &pipeline_cache_control_features;
|
|
|
|
+ }
|
|
|
|
+
|
|
VkPhysicalDeviceVulkan11Features vulkan11features = {};
|
|
VkPhysicalDeviceVulkan11Features vulkan11features = {};
|
|
VkPhysicalDevice16BitStorageFeaturesKHR storage_feature = {};
|
|
VkPhysicalDevice16BitStorageFeaturesKHR storage_feature = {};
|
|
VkPhysicalDeviceMultiviewFeatures multiview_features = {};
|
|
VkPhysicalDeviceMultiviewFeatures multiview_features = {};
|