mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[dxvk] Replace VK_EXT_pipeline_creation_cache_control with core feature
This commit is contained in:
parent
7677db3371
commit
13425eb39b
@ -264,8 +264,6 @@ namespace dxvk {
|
|||||||
|| !required.extMemoryPriority.memoryPriority)
|
|| !required.extMemoryPriority.memoryPriority)
|
||||||
&& (m_deviceFeatures.extNonSeamlessCubeMap.nonSeamlessCubeMap
|
&& (m_deviceFeatures.extNonSeamlessCubeMap.nonSeamlessCubeMap
|
||||||
|| !required.extNonSeamlessCubeMap.nonSeamlessCubeMap)
|
|| !required.extNonSeamlessCubeMap.nonSeamlessCubeMap)
|
||||||
&& (m_deviceFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl
|
|
||||||
|| !required.extPipelineCreationCacheControl.pipelineCreationCacheControl)
|
|
||||||
&& (m_deviceFeatures.extRobustness2.robustBufferAccess2
|
&& (m_deviceFeatures.extRobustness2.robustBufferAccess2
|
||||||
|| !required.extRobustness2.robustBufferAccess2)
|
|| !required.extRobustness2.robustBufferAccess2)
|
||||||
&& (m_deviceFeatures.extRobustness2.robustImageAccess2
|
&& (m_deviceFeatures.extRobustness2.robustImageAccess2
|
||||||
@ -293,7 +291,7 @@ namespace dxvk {
|
|||||||
DxvkDeviceFeatures enabledFeatures) {
|
DxvkDeviceFeatures enabledFeatures) {
|
||||||
DxvkDeviceExtensions devExtensions;
|
DxvkDeviceExtensions devExtensions;
|
||||||
|
|
||||||
std::array<DxvkExt*, 23> devExtensionList = {{
|
std::array<DxvkExt*, 22> devExtensionList = {{
|
||||||
&devExtensions.amdMemoryOverallocationBehaviour,
|
&devExtensions.amdMemoryOverallocationBehaviour,
|
||||||
&devExtensions.amdShaderFragmentMask,
|
&devExtensions.amdShaderFragmentMask,
|
||||||
&devExtensions.ext4444Formats,
|
&devExtensions.ext4444Formats,
|
||||||
@ -305,7 +303,6 @@ namespace dxvk {
|
|||||||
&devExtensions.extMemoryBudget,
|
&devExtensions.extMemoryBudget,
|
||||||
&devExtensions.extMemoryPriority,
|
&devExtensions.extMemoryPriority,
|
||||||
&devExtensions.extNonSeamlessCubeMap,
|
&devExtensions.extNonSeamlessCubeMap,
|
||||||
&devExtensions.extPipelineCreationCacheControl,
|
|
||||||
&devExtensions.extRobustness2,
|
&devExtensions.extRobustness2,
|
||||||
&devExtensions.extShaderDemoteToHelperInvocation,
|
&devExtensions.extShaderDemoteToHelperInvocation,
|
||||||
&devExtensions.extShaderModuleIdentifier,
|
&devExtensions.extShaderModuleIdentifier,
|
||||||
@ -360,9 +357,6 @@ namespace dxvk {
|
|||||||
enabledFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary =
|
enabledFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary =
|
||||||
m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary;
|
m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary;
|
||||||
|
|
||||||
enabledFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl =
|
|
||||||
m_deviceFeatures.extPipelineCreationCacheControl.pipelineCreationCacheControl;
|
|
||||||
|
|
||||||
enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
|
enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
|
||||||
enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;
|
enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;
|
||||||
|
|
||||||
@ -427,11 +421,6 @@ namespace dxvk {
|
|||||||
enabledFeatures.extNonSeamlessCubeMap.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extNonSeamlessCubeMap);
|
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) {
|
if (devExtensions.extShaderDemoteToHelperInvocation) {
|
||||||
enabledFeatures.extShaderDemoteToHelperInvocation.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT;
|
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);
|
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);
|
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)) {
|
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.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT;
|
||||||
m_deviceFeatures.extRobustness2.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extRobustness2);
|
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 memoryPriority : ", features.extMemoryPriority.memoryPriority ? "1" : "0",
|
||||||
"\n", VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME,
|
"\n", VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME,
|
||||||
"\n nonSeamlessCubeMap : ", features.extNonSeamlessCubeMap.nonSeamlessCubeMap ? "1" : "0",
|
"\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", VK_EXT_ROBUSTNESS_2_EXTENSION_NAME,
|
||||||
"\n robustBufferAccess2 : ", features.extRobustness2.robustBufferAccess2 ? "1" : "0",
|
"\n robustBufferAccess2 : ", features.extRobustness2.robustBufferAccess2 ? "1" : "0",
|
||||||
"\n robustImageAccess2 : ", features.extRobustness2.robustImageAccess2 ? "1" : "0",
|
"\n robustImageAccess2 : ", features.extRobustness2.robustImageAccess2 ? "1" : "0",
|
||||||
|
@ -62,7 +62,7 @@ namespace dxvk {
|
|||||||
// Don't bother with this unless the device also supports shader module
|
// Don't bother with this unless the device also supports shader module
|
||||||
// identifiers, since decoding and hashing the shaders is slow otherwise
|
// identifiers, since decoding and hashing the shaders is slow otherwise
|
||||||
// and likely provides no benefit over linking pipeline libraries.
|
// and likely provides no benefit over linking pipeline libraries.
|
||||||
return m_features.extPipelineCreationCacheControl.pipelineCreationCacheControl
|
return m_features.vk13.pipelineCreationCacheControl
|
||||||
&& m_features.extShaderModuleIdentifier.shaderModuleIdentifier
|
&& m_features.extShaderModuleIdentifier.shaderModuleIdentifier
|
||||||
&& m_options.enableGraphicsPipelineLibrary != Tristate::True;
|
&& m_options.enableGraphicsPipelineLibrary != Tristate::True;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@ namespace dxvk {
|
|||||||
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extGraphicsPipelineLibrary;
|
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extGraphicsPipelineLibrary;
|
||||||
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
||||||
VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extNonSeamlessCubeMap;
|
VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extNonSeamlessCubeMap;
|
||||||
VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT extPipelineCreationCacheControl;
|
|
||||||
VkPhysicalDeviceRobustness2FeaturesEXT extRobustness2;
|
VkPhysicalDeviceRobustness2FeaturesEXT extRobustness2;
|
||||||
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation;
|
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation;
|
||||||
VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT extShaderModuleIdentifier;
|
VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT extShaderModuleIdentifier;
|
||||||
|
@ -287,7 +287,6 @@ namespace dxvk {
|
|||||||
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
|
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
|
||||||
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt extNonSeamlessCubeMap = { VK_EXT_NON_SEAMLESS_CUBE_MAP_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 extRobustness2 = { VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, DxvkExtMode::Required };
|
||||||
DxvkExt extShaderDemoteToHelperInvocation = { VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extShaderDemoteToHelperInvocation = { VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
|
@ -622,7 +622,7 @@ namespace dxvk {
|
|||||||
// first, since this is expected to be the fastest path.
|
// first, since this is expected to be the fastest path.
|
||||||
if (m_device->canUsePipelineCacheControl()) {
|
if (m_device->canUsePipelineCacheControl()) {
|
||||||
fastHandle = this->createOptimizedPipeline(state,
|
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) {
|
if (!fastHandle) {
|
||||||
@ -808,7 +808,7 @@ namespace dxvk {
|
|||||||
// Build stage infos for all provided shaders
|
// Build stage infos for all provided shaders
|
||||||
DxvkShaderStageInfo stageInfo(m_device);
|
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);
|
stageInfo.addStage(VK_SHADER_STAGE_VERTEX_BIT, m_vsLibrary->getModuleIdentifier(), &specInfo);
|
||||||
|
|
||||||
if (m_shaders.fs != nullptr)
|
if (m_shaders.fs != nullptr)
|
||||||
@ -860,7 +860,7 @@ namespace dxvk {
|
|||||||
if (vr != VK_SUCCESS) {
|
if (vr != VK_SUCCESS) {
|
||||||
// Ignore any error if we're trying to create a cached pipeline. If linking or
|
// 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.
|
// 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));
|
Logger::err(str::format("DxvkGraphicsPipeline: Failed to compile pipeline: ", vr));
|
||||||
|
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user