[dxvk] Replace VK_EXT_pipeline_creation_cache_control with core feature

This commit is contained in:
Philip Rebohle 2022-07-14 21:01:29 +02:00
parent 7677db3371
commit 13425eb39b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
5 changed files with 5 additions and 25 deletions

View File

@ -264,8 +264,6 @@ 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
@ -293,7 +291,7 @@ namespace dxvk {
DxvkDeviceFeatures enabledFeatures) {
DxvkDeviceExtensions devExtensions;
std::array<DxvkExt*, 23> devExtensionList = {{
std::array<DxvkExt*, 22> devExtensionList = {{
&devExtensions.amdMemoryOverallocationBehaviour,
&devExtensions.amdShaderFragmentMask,
&devExtensions.ext4444Formats,
@ -305,7 +303,6 @@ namespace dxvk {
&devExtensions.extMemoryBudget,
&devExtensions.extMemoryPriority,
&devExtensions.extNonSeamlessCubeMap,
&devExtensions.extPipelineCreationCacheControl,
&devExtensions.extRobustness2,
&devExtensions.extShaderDemoteToHelperInvocation,
&devExtensions.extShaderModuleIdentifier,
@ -360,9 +357,6 @@ namespace dxvk {
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;
@ -427,11 +421,6 @@ 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);
@ -727,11 +716,6 @@ 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);
@ -854,8 +838,6 @@ 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",

View File

@ -62,7 +62,7 @@ namespace dxvk {
// Don't bother with this unless the device also supports shader module
// identifiers, since decoding and hashing the shaders is slow otherwise
// and likely provides no benefit over linking pipeline libraries.
return m_features.extPipelineCreationCacheControl.pipelineCreationCacheControl
return m_features.vk13.pipelineCreationCacheControl
&& m_features.extShaderModuleIdentifier.shaderModuleIdentifier
&& m_options.enableGraphicsPipelineLibrary != Tristate::True;
}

View File

@ -44,7 +44,6 @@ namespace dxvk {
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extGraphicsPipelineLibrary;
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extNonSeamlessCubeMap;
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT extPipelineCreationCacheControl;
VkPhysicalDeviceRobustness2FeaturesEXT extRobustness2;
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation;
VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT extShaderModuleIdentifier;

View File

@ -287,7 +287,6 @@ 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 extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional };

View File

@ -622,7 +622,7 @@ namespace dxvk {
// first, since this is expected to be the fastest path.
if (m_device->canUsePipelineCacheControl()) {
fastHandle = this->createOptimizedPipeline(state,
VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT);
VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT);
}
if (!fastHandle) {
@ -808,7 +808,7 @@ namespace dxvk {
// Build stage infos for all provided shaders
DxvkShaderStageInfo stageInfo(m_device);
if (flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT) {
if (flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT) {
stageInfo.addStage(VK_SHADER_STAGE_VERTEX_BIT, m_vsLibrary->getModuleIdentifier(), &specInfo);
if (m_shaders.fs != nullptr)
@ -860,7 +860,7 @@ namespace dxvk {
if (vr != VK_SUCCESS) {
// Ignore any error if we're trying to create a cached pipeline. If linking or
// compiling an optimized pipeline fail later, we'll still be printing errors.
if (!(flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT))
if (!(flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
Logger::err(str::format("DxvkGraphicsPipeline: Failed to compile pipeline: ", vr));
return VK_NULL_HANDLE;