1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 19:24:11 +01:00

[dxvk] Enable conditionalRendering feature if present

This commit is contained in:
Philip Rebohle 2019-03-23 22:57:57 +01:00
parent 8f7e606583
commit 70520e30aa
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 13 additions and 0 deletions

View File

@ -1399,6 +1399,7 @@ namespace dxvk {
enabled.core.features.logicOp = supported.core.features.logicOp; enabled.core.features.logicOp = supported.core.features.logicOp;
enabled.core.features.shaderImageGatherExtended = VK_TRUE; enabled.core.features.shaderImageGatherExtended = VK_TRUE;
enabled.core.features.variableMultisampleRate = supported.core.features.variableMultisampleRate; enabled.core.features.variableMultisampleRate = supported.core.features.variableMultisampleRate;
enabled.extConditionalRendering.conditionalRendering = supported.extConditionalRendering.conditionalRendering;
enabled.extTransformFeedback.transformFeedback = supported.extTransformFeedback.transformFeedback; enabled.extTransformFeedback.transformFeedback = supported.extTransformFeedback.transformFeedback;
enabled.extTransformFeedback.geometryStreams = supported.extTransformFeedback.geometryStreams; enabled.extTransformFeedback.geometryStreams = supported.extTransformFeedback.geometryStreams;
} }

View File

@ -278,6 +278,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.extConditionalRendering) {
enabledFeatures.extConditionalRendering.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT;
enabledFeatures.extConditionalRendering.pNext = enabledFeatures.core.pNext;
enabledFeatures.core.pNext = &enabledFeatures.extConditionalRendering;
}
if (devExtensions.extDepthClipEnable) { if (devExtensions.extDepthClipEnable) {
enabledFeatures.extDepthClipEnable.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; enabledFeatures.extDepthClipEnable.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
enabledFeatures.extDepthClipEnable.pNext = enabledFeatures.core.pNext; enabledFeatures.extDepthClipEnable.pNext = enabledFeatures.core.pNext;
@ -488,6 +494,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_CONDITIONAL_RENDERING_EXTENSION_NAME)) {
m_deviceFeatures.extConditionalRendering.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT;
m_deviceFeatures.extConditionalRendering.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extConditionalRendering);
}
if (m_deviceExtensions.supports(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME)) { 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.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
m_deviceFeatures.extDepthClipEnable.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extDepthClipEnable); m_deviceFeatures.extDepthClipEnable.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extDepthClipEnable);

View File

@ -31,6 +31,7 @@ namespace dxvk {
*/ */
struct DxvkDeviceFeatures { struct DxvkDeviceFeatures {
VkPhysicalDeviceFeatures2KHR core; VkPhysicalDeviceFeatures2KHR core;
VkPhysicalDeviceConditionalRenderingFeaturesEXT extConditionalRendering;
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable; VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset; VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset;
VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority; VkPhysicalDeviceMemoryPriorityFeaturesEXT extMemoryPriority;