mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Enable depthClipEnable feature if available
This commit is contained in:
parent
cc5ac885f5
commit
49965fd79e
@ -1370,6 +1370,7 @@ namespace dxvk {
|
|||||||
enabled.core.features.shaderClipDistance = VK_TRUE;
|
enabled.core.features.shaderClipDistance = VK_TRUE;
|
||||||
enabled.core.features.shaderCullDistance = VK_TRUE;
|
enabled.core.features.shaderCullDistance = VK_TRUE;
|
||||||
enabled.core.features.textureCompressionBC = VK_TRUE;
|
enabled.core.features.textureCompressionBC = VK_TRUE;
|
||||||
|
enabled.extDepthClipEnable.depthClipEnable = supported.extDepthClipEnable.depthClipEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (featureLevel >= D3D_FEATURE_LEVEL_9_2) {
|
if (featureLevel >= D3D_FEATURE_LEVEL_9_2) {
|
||||||
|
@ -215,6 +215,8 @@ namespace dxvk {
|
|||||||
|| !required.core.features.variableMultisampleRate)
|
|| !required.core.features.variableMultisampleRate)
|
||||||
&& (m_deviceFeatures.core.features.inheritedQueries
|
&& (m_deviceFeatures.core.features.inheritedQueries
|
||||||
|| !required.core.features.inheritedQueries)
|
|| !required.core.features.inheritedQueries)
|
||||||
|
&& (m_deviceFeatures.extDepthClipEnable.depthClipEnable
|
||||||
|
|| !required.extDepthClipEnable.depthClipEnable)
|
||||||
&& (m_deviceFeatures.extMemoryPriority.memoryPriority
|
&& (m_deviceFeatures.extMemoryPriority.memoryPriority
|
||||||
|| !required.extMemoryPriority.memoryPriority)
|
|| !required.extMemoryPriority.memoryPriority)
|
||||||
&& (m_deviceFeatures.extTransformFeedback.transformFeedback
|
&& (m_deviceFeatures.extTransformFeedback.transformFeedback
|
||||||
@ -272,6 +274,12 @@ namespace dxvk {
|
|||||||
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
|
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
|
||||||
enabledFeatures.core.pNext = nullptr;
|
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) {
|
if (devExtensions.extMemoryPriority) {
|
||||||
enabledFeatures.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
|
enabledFeatures.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
|
||||||
enabledFeatures.extMemoryPriority.pNext = enabledFeatures.core.pNext;
|
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.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
|
||||||
m_deviceFeatures.core.pNext = nullptr;
|
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)) {
|
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.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
|
||||||
m_deviceFeatures.extMemoryPriority.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extMemoryPriority);
|
m_deviceFeatures.extMemoryPriority.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extMemoryPriority);
|
||||||
|
@ -31,6 +31,7 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
struct DxvkDeviceFeatures {
|
struct DxvkDeviceFeatures {
|
||||||
VkPhysicalDeviceFeatures2KHR core;
|
VkPhysicalDeviceFeatures2KHR core;
|
||||||
|
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
|
||||||
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;
|
||||||
VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback;
|
VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback;
|
||||||
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor;
|
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user