[dxvk] Enable depthClipEnable feature if available

This commit is contained in:
Philip Rebohle 2019-02-19 13:57:34 +01:00
parent cc5ac885f5
commit 49965fd79e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 15 additions and 0 deletions

View File

@ -1370,6 +1370,7 @@ namespace dxvk {
enabled.core.features.shaderClipDistance = VK_TRUE;
enabled.core.features.shaderCullDistance = VK_TRUE;
enabled.core.features.textureCompressionBC = VK_TRUE;
enabled.extDepthClipEnable.depthClipEnable = supported.extDepthClipEnable.depthClipEnable;
}
if (featureLevel >= D3D_FEATURE_LEVEL_9_2) {

View File

@ -215,6 +215,8 @@ namespace dxvk {
|| !required.core.features.variableMultisampleRate)
&& (m_deviceFeatures.core.features.inheritedQueries
|| !required.core.features.inheritedQueries)
&& (m_deviceFeatures.extDepthClipEnable.depthClipEnable
|| !required.extDepthClipEnable.depthClipEnable)
&& (m_deviceFeatures.extMemoryPriority.memoryPriority
|| !required.extMemoryPriority.memoryPriority)
&& (m_deviceFeatures.extTransformFeedback.transformFeedback
@ -272,6 +274,12 @@ namespace dxvk {
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
enabledFeatures.core.pNext = nullptr;
if (devExtensions.extDepthClipEnable) {
enabledFeatures.extDepthClipEnable.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
enabledFeatures.extDepthClipEnable.pNext = enabledFeatures.core.pNext;
enabledFeatures.core.pNext = &enabledFeatures.extDepthClipEnable;
}
if (devExtensions.extMemoryPriority) {
enabledFeatures.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
enabledFeatures.extMemoryPriority.pNext = enabledFeatures.core.pNext;
@ -470,6 +478,11 @@ namespace dxvk {
m_deviceFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
m_deviceFeatures.core.pNext = nullptr;
if (m_deviceExtensions.supports(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME)) {
m_deviceFeatures.extDepthClipEnable.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
m_deviceFeatures.extDepthClipEnable.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extDepthClipEnable);
}
if (m_deviceExtensions.supports(VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME)) {
m_deviceFeatures.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
m_deviceFeatures.extMemoryPriority.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extMemoryPriority);

View File

@ -31,6 +31,7 @@ namespace dxvk {
*/
struct DxvkDeviceFeatures {
VkPhysicalDeviceFeatures2KHR core;
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback;
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor;