diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp index 7e6c45250..2fe5d87af 100644 --- a/src/dxvk/dxvk_adapter.cpp +++ b/src/dxvk/dxvk_adapter.cpp @@ -335,13 +335,14 @@ namespace dxvk { DxvkDeviceFeatures enabledFeatures) { DxvkDeviceExtensions devExtensions; - std::array devExtensionList = {{ + std::array devExtensionList = {{ &devExtensions.amdMemoryOverallocationBehaviour, &devExtensions.amdShaderFragmentMask, &devExtensions.extAttachmentFeedbackLoopLayout, &devExtensions.extConservativeRasterization, &devExtensions.extCustomBorderColor, &devExtensions.extDepthClipEnable, + &devExtensions.extFragmentShaderInterlock, &devExtensions.extFullScreenExclusive, &devExtensions.extGraphicsPipelineLibrary, &devExtensions.extMemoryBudget, @@ -482,6 +483,11 @@ namespace dxvk { enabledFeatures.extDepthClipEnable.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extDepthClipEnable); } + if (devExtensions.extFragmentShaderInterlock) { + enabledFeatures.extFragmentShaderInterlock.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; + enabledFeatures.extFragmentShaderInterlock.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extFragmentShaderInterlock); + } + if (devExtensions.extFullScreenExclusive) enabledFeatures.extFullScreenExclusive = VK_TRUE; @@ -805,6 +811,11 @@ namespace dxvk { m_deviceFeatures.extDepthClipEnable.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extDepthClipEnable); } + if (m_deviceExtensions.supports(VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME)) { + m_deviceFeatures.extFragmentShaderInterlock.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; + m_deviceFeatures.extFragmentShaderInterlock.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extFragmentShaderInterlock); + } + if (m_deviceExtensions.supports(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) m_deviceFeatures.extFullScreenExclusive = VK_TRUE; @@ -965,6 +976,9 @@ namespace dxvk { "\n customBorderColorWithoutFormat : ", features.extCustomBorderColor.customBorderColorWithoutFormat ? "1" : "0", "\n", VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, "\n depthClipEnable : ", features.extDepthClipEnable.depthClipEnable ? "1" : "0", + "\n", VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME, + "\n fragmentShaderSampleInterlock : ", features.extFragmentShaderInterlock.fragmentShaderSampleInterlock ? "1" : "0", + "\n fragmentShaderPixelInterlock : ", features.extFragmentShaderInterlock.fragmentShaderPixelInterlock ? "1" : "0", "\n", VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, "\n extension supported : ", features.extFullScreenExclusive ? "1" : "0", "\n", VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, diff --git a/src/dxvk/dxvk_device_info.h b/src/dxvk/dxvk_device_info.h index b5f8f587e..d8e23a084 100644 --- a/src/dxvk/dxvk_device_info.h +++ b/src/dxvk/dxvk_device_info.h @@ -43,6 +43,7 @@ namespace dxvk { VkBool32 extConservativeRasterization; VkPhysicalDeviceCustomBorderColorFeaturesEXT extCustomBorderColor; VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable; + VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT extFragmentShaderInterlock; VkBool32 extFullScreenExclusive; VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extGraphicsPipelineLibrary; VkBool32 extMemoryBudget; diff --git a/src/dxvk/dxvk_extensions.h b/src/dxvk/dxvk_extensions.h index c9d9030e8..7eb30e6b8 100644 --- a/src/dxvk/dxvk_extensions.h +++ b/src/dxvk/dxvk_extensions.h @@ -283,6 +283,7 @@ namespace dxvk { DxvkExt extCustomBorderColor = { VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extFullScreenExclusive = { VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, DxvkExtMode::Optional }; + DxvkExt extFragmentShaderInterlock = { VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extGraphicsPipelineLibrary = { VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive }; DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };