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:
parent
8f7e606583
commit
70520e30aa
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user