diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp index 1182829b..320111ac 100644 --- a/src/dxvk/dxvk_adapter.cpp +++ b/src/dxvk/dxvk_adapter.cpp @@ -242,6 +242,8 @@ namespace dxvk { || !required.extMemoryPriority.memoryPriority) && (m_deviceFeatures.extNonSeamlessCubeMap.nonSeamlessCubeMap || !required.extNonSeamlessCubeMap.nonSeamlessCubeMap) + && (m_deviceFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl + || !required.extPipelineCreationCacheControl.pipelineCreationCacheControl) && (m_deviceFeatures.extRobustness2.robustBufferAccess2 || !required.extRobustness2.robustBufferAccess2) && (m_deviceFeatures.extRobustness2.robustImageAccess2 @@ -267,7 +269,7 @@ namespace dxvk { DxvkDeviceFeatures enabledFeatures) { DxvkDeviceExtensions devExtensions; - std::array devExtensionList = {{ + std::array devExtensionList = {{ &devExtensions.amdMemoryOverallocationBehaviour, &devExtensions.amdShaderFragmentMask, &devExtensions.ext4444Formats, @@ -281,6 +283,7 @@ namespace dxvk { &devExtensions.extMemoryBudget, &devExtensions.extMemoryPriority, &devExtensions.extNonSeamlessCubeMap, + &devExtensions.extPipelineCreationCacheControl, &devExtensions.extRobustness2, &devExtensions.extShaderDemoteToHelperInvocation, &devExtensions.extShaderStencilExport, @@ -334,7 +337,11 @@ namespace dxvk { // Enable additional device features if supported enabledFeatures.extExtendedDynamicState.extendedDynamicState = VK_TRUE; - enabledFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary = m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary; + enabledFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary = + m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary; + + enabledFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl = + m_deviceFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl; enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4; enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4; @@ -401,6 +408,11 @@ namespace dxvk { enabledFeatures.extNonSeamlessCubeMap.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extNonSeamlessCubeMap); } + if (devExtensions.extPipelineCreationCacheControl) { + enabledFeatures.extPipelineCreationCacheControl.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT; + enabledFeatures.extPipelineCreationCacheControl.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extPipelineCreationCacheControl); + } + if (devExtensions.extShaderDemoteToHelperInvocation) { enabledFeatures.extShaderDemoteToHelperInvocation.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT; enabledFeatures.extShaderDemoteToHelperInvocation.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extShaderDemoteToHelperInvocation); @@ -726,6 +738,11 @@ namespace dxvk { m_deviceFeatures.extNonSeamlessCubeMap.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extNonSeamlessCubeMap); } + if (m_deviceExtensions.supports(VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME)) { + m_deviceFeatures.extPipelineCreationCacheControl.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT; + m_deviceFeatures.extPipelineCreationCacheControl.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extPipelineCreationCacheControl); + } + if (m_deviceExtensions.supports(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME)) { m_deviceFeatures.extRobustness2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; m_deviceFeatures.extRobustness2.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extRobustness2); @@ -840,6 +857,8 @@ namespace dxvk { "\n memoryPriority : ", features.extMemoryPriority.memoryPriority ? "1" : "0", "\n", VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME, "\n nonSeamlessCubeMap : ", features.extNonSeamlessCubeMap.nonSeamlessCubeMap ? "1" : "0", + "\n", VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME, + "\n pipelineCreationCacheControl : ", features.extPipelineCreationCacheControl.pipelineCreationCacheControl ? "1" : "0", "\n", VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, "\n robustBufferAccess2 : ", features.extRobustness2.robustBufferAccess2 ? "1" : "0", "\n robustImageAccess2 : ", features.extRobustness2.robustImageAccess2 ? "1" : "0", diff --git a/src/dxvk/dxvk_device_info.h b/src/dxvk/dxvk_device_info.h index 9cea566f..f92470f5 100644 --- a/src/dxvk/dxvk_device_info.h +++ b/src/dxvk/dxvk_device_info.h @@ -46,6 +46,7 @@ namespace dxvk { VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset; VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority; VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extNonSeamlessCubeMap; + VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT extPipelineCreationCacheControl; VkPhysicalDeviceRobustness2FeaturesEXT extRobustness2; VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation; VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback; diff --git a/src/dxvk/dxvk_extensions.h b/src/dxvk/dxvk_extensions.h index c4c15de2..6398db3c 100644 --- a/src/dxvk/dxvk_extensions.h +++ b/src/dxvk/dxvk_extensions.h @@ -289,6 +289,7 @@ namespace dxvk { DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive }; DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extNonSeamlessCubeMap = { VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME, DxvkExtMode::Optional }; + DxvkExt extPipelineCreationCacheControl = { VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extRobustness2 = { VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, DxvkExtMode::Required }; DxvkExt extShaderDemoteToHelperInvocation = { VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extShaderStencilExport = { VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, DxvkExtMode::Optional };