mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxvk] Enable VK_EXT_extended_dynamic_state if available.
This commit is contained in:
parent
93f7735814
commit
9f3fb028b0
@ -230,6 +230,8 @@ namespace dxvk {
|
||||
|| !required.extCustomBorderColor.customBorderColorWithoutFormat)
|
||||
&& (m_deviceFeatures.extDepthClipEnable.depthClipEnable
|
||||
|| !required.extDepthClipEnable.depthClipEnable)
|
||||
&& (m_deviceFeatures.extExtendedDynamicState.extendedDynamicState
|
||||
|| !required.extExtendedDynamicState.extendedDynamicState)
|
||||
&& (m_deviceFeatures.extHostQueryReset.hostQueryReset
|
||||
|| !required.extHostQueryReset.hostQueryReset)
|
||||
&& (m_deviceFeatures.extMemoryPriority.memoryPriority
|
||||
@ -259,12 +261,13 @@ namespace dxvk {
|
||||
DxvkDeviceFeatures enabledFeatures) {
|
||||
DxvkDeviceExtensions devExtensions;
|
||||
|
||||
std::array<DxvkExt*, 22> devExtensionList = {{
|
||||
std::array<DxvkExt*, 23> devExtensionList = {{
|
||||
&devExtensions.amdMemoryOverallocationBehaviour,
|
||||
&devExtensions.amdShaderFragmentMask,
|
||||
&devExtensions.extConditionalRendering,
|
||||
&devExtensions.extCustomBorderColor,
|
||||
&devExtensions.extDepthClipEnable,
|
||||
&devExtensions.extExtendedDynamicState,
|
||||
&devExtensions.extFullScreenExclusive,
|
||||
&devExtensions.extHostQueryReset,
|
||||
&devExtensions.extMemoryBudget,
|
||||
@ -329,6 +332,11 @@ namespace dxvk {
|
||||
enabledFeatures.extDepthClipEnable.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extDepthClipEnable);
|
||||
}
|
||||
|
||||
if (devExtensions.extExtendedDynamicState) {
|
||||
enabledFeatures.extExtendedDynamicState.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT;
|
||||
enabledFeatures.extExtendedDynamicState.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extExtendedDynamicState);
|
||||
}
|
||||
|
||||
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);
|
||||
@ -570,6 +578,11 @@ namespace dxvk {
|
||||
m_deviceFeatures.extDepthClipEnable.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extDepthClipEnable);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME)) {
|
||||
m_deviceFeatures.extExtendedDynamicState.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT;
|
||||
m_deviceFeatures.extExtendedDynamicState.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extExtendedDynamicState);
|
||||
}
|
||||
|
||||
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);
|
||||
@ -673,6 +686,8 @@ 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_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
|
||||
"\n extendedDynamicState : ", features.extExtendedDynamicState.extendedDynamicState ? "1" : "0",
|
||||
"\n", VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
|
||||
"\n hostQueryReset : ", features.extHostQueryReset.hostQueryReset ? "1" : "0",
|
||||
"\n", VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME,
|
||||
|
@ -38,6 +38,7 @@ namespace dxvk {
|
||||
VkPhysicalDeviceConditionalRenderingFeaturesEXT extConditionalRendering;
|
||||
VkPhysicalDeviceCustomBorderColorFeaturesEXT extCustomBorderColor;
|
||||
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extExtendedDynamicState;
|
||||
VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset;
|
||||
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
||||
VkPhysicalDeviceRobustness2FeaturesEXT extRobustness2;
|
||||
|
@ -263,6 +263,7 @@ namespace dxvk {
|
||||
DxvkExt extConditionalRendering = { VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, DxvkExtMode::Disabled };
|
||||
DxvkExt extCustomBorderColor = { VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extExtendedDynamicState = { VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt extFullScreenExclusive = { VK_EXT_FULL_SCREEN_EXCLUSIVE_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 };
|
||||
|
@ -308,6 +308,21 @@ namespace dxvk::vk {
|
||||
VULKAN_FN(vkCmdEndConditionalRenderingEXT);
|
||||
#endif
|
||||
|
||||
#ifdef VK_EXT_extended_dynamic_state
|
||||
VULKAN_FN(vkCmdBindVertexBuffers2EXT);
|
||||
VULKAN_FN(vkCmdSetCullModeEXT);
|
||||
VULKAN_FN(vkCmdSetDepthBoundsTestEnableEXT);
|
||||
VULKAN_FN(vkCmdSetDepthCompareOpEXT);
|
||||
VULKAN_FN(vkCmdSetDepthTestEnableEXT);
|
||||
VULKAN_FN(vkCmdSetDepthWriteEnableEXT);
|
||||
VULKAN_FN(vkCmdSetFrontFaceEXT);
|
||||
VULKAN_FN(vkCmdSetPrimitiveTopologyEXT);
|
||||
VULKAN_FN(vkCmdSetScissorWithCountEXT);
|
||||
VULKAN_FN(vkCmdSetStencilOpEXT);
|
||||
VULKAN_FN(vkCmdSetStencilTestEnableEXT);
|
||||
VULKAN_FN(vkCmdSetViewportWithCountEXT);
|
||||
#endif
|
||||
|
||||
#ifdef VK_EXT_full_screen_exclusive
|
||||
VULKAN_FN(vkAcquireFullScreenExclusiveModeEXT);
|
||||
VULKAN_FN(vkReleaseFullScreenExclusiveModeEXT);
|
||||
|
Loading…
Reference in New Issue
Block a user