mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Enable VK_EXT_graphics_pipeline_library if supported
This commit is contained in:
parent
97f2d81b25
commit
d6afe36592
@ -234,6 +234,8 @@ namespace dxvk {
|
||||
|| !required.extDepthClipEnable.depthClipEnable)
|
||||
&& (m_deviceFeatures.extExtendedDynamicState.extendedDynamicState
|
||||
|| !required.extExtendedDynamicState.extendedDynamicState)
|
||||
&& (m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary
|
||||
|| !required.extGraphicsPipelineLibrary.graphicsPipelineLibrary)
|
||||
&& (m_deviceFeatures.extHostQueryReset.hostQueryReset
|
||||
|| !required.extHostQueryReset.hostQueryReset)
|
||||
&& (m_deviceFeatures.extMemoryPriority.memoryPriority
|
||||
@ -265,7 +267,7 @@ namespace dxvk {
|
||||
DxvkDeviceFeatures enabledFeatures) {
|
||||
DxvkDeviceExtensions devExtensions;
|
||||
|
||||
std::array<DxvkExt*, 31> devExtensionList = {{
|
||||
std::array<DxvkExt*, 33> devExtensionList = {{
|
||||
&devExtensions.amdMemoryOverallocationBehaviour,
|
||||
&devExtensions.amdShaderFragmentMask,
|
||||
&devExtensions.ext4444Formats,
|
||||
@ -274,6 +276,7 @@ namespace dxvk {
|
||||
&devExtensions.extDepthClipEnable,
|
||||
&devExtensions.extExtendedDynamicState,
|
||||
&devExtensions.extFullScreenExclusive,
|
||||
&devExtensions.extGraphicsPipelineLibrary,
|
||||
&devExtensions.extHostQueryReset,
|
||||
&devExtensions.extMemoryBudget,
|
||||
&devExtensions.extMemoryPriority,
|
||||
@ -292,6 +295,7 @@ namespace dxvk {
|
||||
&devExtensions.khrDynamicRendering,
|
||||
&devExtensions.khrExternalMemoryWin32,
|
||||
&devExtensions.khrImageFormatList,
|
||||
&devExtensions.khrPipelineLibrary,
|
||||
&devExtensions.khrSamplerMirrorClampToEdge,
|
||||
&devExtensions.khrShaderFloatControls,
|
||||
&devExtensions.khrSwapchain,
|
||||
@ -330,6 +334,8 @@ namespace dxvk {
|
||||
// Enable additional device features if supported
|
||||
enabledFeatures.extExtendedDynamicState.extendedDynamicState = VK_TRUE;
|
||||
|
||||
enabledFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary = m_deviceFeatures.extGraphicsPipelineLibrary.graphicsPipelineLibrary;
|
||||
|
||||
enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
|
||||
enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;
|
||||
|
||||
@ -375,6 +381,11 @@ namespace dxvk {
|
||||
enabledFeatures.extExtendedDynamicState.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extExtendedDynamicState);
|
||||
}
|
||||
|
||||
if (devExtensions.extGraphicsPipelineLibrary) {
|
||||
enabledFeatures.extGraphicsPipelineLibrary.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT;
|
||||
enabledFeatures.extGraphicsPipelineLibrary.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extGraphicsPipelineLibrary);
|
||||
}
|
||||
|
||||
if (devExtensions.extHostQueryReset) {
|
||||
enabledFeatures.extHostQueryReset.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT;
|
||||
enabledFeatures.extHostQueryReset.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extHostQueryReset);
|
||||
@ -609,6 +620,11 @@ namespace dxvk {
|
||||
m_deviceInfo.extCustomBorderColor.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extCustomBorderColor);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) {
|
||||
m_deviceInfo.extGraphicsPipelineLibrary.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT;
|
||||
m_deviceInfo.extGraphicsPipelineLibrary.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extGraphicsPipelineLibrary);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME)) {
|
||||
m_deviceInfo.extRobustness2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT;
|
||||
m_deviceInfo.extRobustness2.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extRobustness2);
|
||||
@ -690,6 +706,11 @@ namespace dxvk {
|
||||
m_deviceFeatures.extExtendedDynamicState.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extExtendedDynamicState);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) {
|
||||
m_deviceFeatures.extGraphicsPipelineLibrary.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT;
|
||||
m_deviceFeatures.extGraphicsPipelineLibrary.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extGraphicsPipelineLibrary);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME)) {
|
||||
m_deviceFeatures.extHostQueryReset.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT;
|
||||
m_deviceFeatures.extHostQueryReset.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extHostQueryReset);
|
||||
@ -811,6 +832,8 @@ namespace dxvk {
|
||||
"\n depthClipEnable : ", features.extDepthClipEnable.depthClipEnable ? "1" : "0",
|
||||
"\n", VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
|
||||
"\n extendedDynamicState : ", features.extExtendedDynamicState.extendedDynamicState ? "1" : "0",
|
||||
"\n", VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME,
|
||||
"\n graphicsPipelineLibrary : ", features.extGraphicsPipelineLibrary.graphicsPipelineLibrary ? "1" : "0",
|
||||
"\n", VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
|
||||
"\n hostQueryReset : ", features.extHostQueryReset.hostQueryReset ? "1" : "0",
|
||||
"\n", VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME,
|
||||
|
@ -18,6 +18,7 @@ namespace dxvk {
|
||||
VkPhysicalDeviceSubgroupProperties coreSubgroup;
|
||||
VkPhysicalDeviceConservativeRasterizationPropertiesEXT extConservativeRasterization;
|
||||
VkPhysicalDeviceCustomBorderColorPropertiesEXT extCustomBorderColor;
|
||||
VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT extGraphicsPipelineLibrary;
|
||||
VkPhysicalDeviceRobustness2PropertiesEXT extRobustness2;
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT extTransformFeedback;
|
||||
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT extVertexAttributeDivisor;
|
||||
@ -41,6 +42,7 @@ namespace dxvk {
|
||||
VkPhysicalDeviceCustomBorderColorFeaturesEXT extCustomBorderColor;
|
||||
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extExtendedDynamicState;
|
||||
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extGraphicsPipelineLibrary;
|
||||
VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset;
|
||||
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
||||
VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extNonSeamlessCubeMap;
|
||||
|
@ -284,6 +284,7 @@ namespace dxvk {
|
||||
DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extExtendedDynamicState = { VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt extFullScreenExclusive = { VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extGraphicsPipelineLibrary = { VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extHostQueryReset = { VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
|
||||
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
@ -302,6 +303,7 @@ namespace dxvk {
|
||||
DxvkExt khrDynamicRendering = { VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt khrExternalMemoryWin32 = { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrImageFormatList = { VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt khrPipelineLibrary = { VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrSamplerMirrorClampToEdge = { VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrShaderFloatControls = { VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrSwapchain = { VK_KHR_SWAPCHAIN_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
|
Loading…
x
Reference in New Issue
Block a user