1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00

[dxvk] Enable VK_EXT_conservative_rasterization if available

This commit is contained in:
Philip Rebohle 2021-03-13 19:29:30 +01:00
parent 68e6676d68
commit a77c80f08a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 19 additions and 11 deletions

View File

@ -263,10 +263,11 @@ namespace dxvk {
DxvkDeviceFeatures enabledFeatures) { DxvkDeviceFeatures enabledFeatures) {
DxvkDeviceExtensions devExtensions; DxvkDeviceExtensions devExtensions;
std::array<DxvkExt*, 24> devExtensionList = {{ std::array<DxvkExt*, 25> devExtensionList = {{
&devExtensions.amdMemoryOverallocationBehaviour, &devExtensions.amdMemoryOverallocationBehaviour,
&devExtensions.amdShaderFragmentMask, &devExtensions.amdShaderFragmentMask,
&devExtensions.ext4444Formats, &devExtensions.ext4444Formats,
&devExtensions.extConservativeRasterization,
&devExtensions.extCustomBorderColor, &devExtensions.extCustomBorderColor,
&devExtensions.extDepthClipEnable, &devExtensions.extDepthClipEnable,
&devExtensions.extExtendedDynamicState, &devExtensions.extExtendedDynamicState,
@ -521,6 +522,11 @@ namespace dxvk {
m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
m_deviceInfo.coreSubgroup.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreSubgroup); m_deviceInfo.coreSubgroup.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreSubgroup);
if (m_deviceExtensions.supports(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME)) {
m_deviceInfo.extConservativeRasterization.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT;
m_deviceInfo.extConservativeRasterization.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extConservativeRasterization);
}
if (m_deviceExtensions.supports(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME)) { if (m_deviceExtensions.supports(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME)) {
m_deviceInfo.extCustomBorderColor.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; m_deviceInfo.extCustomBorderColor.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT;
m_deviceInfo.extCustomBorderColor.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extCustomBorderColor); m_deviceInfo.extCustomBorderColor.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.extCustomBorderColor);

View File

@ -13,16 +13,17 @@ namespace dxvk {
* so before using them, check whether they are supported. * so before using them, check whether they are supported.
*/ */
struct DxvkDeviceInfo { struct DxvkDeviceInfo {
VkPhysicalDeviceProperties2 core; VkPhysicalDeviceProperties2 core;
VkPhysicalDeviceIDProperties coreDeviceId; VkPhysicalDeviceIDProperties coreDeviceId;
VkPhysicalDeviceSubgroupProperties coreSubgroup; VkPhysicalDeviceSubgroupProperties coreSubgroup;
VkPhysicalDeviceCustomBorderColorPropertiesEXT extCustomBorderColor; VkPhysicalDeviceConservativeRasterizationPropertiesEXT extConservativeRasterization;
VkPhysicalDeviceRobustness2PropertiesEXT extRobustness2; VkPhysicalDeviceCustomBorderColorPropertiesEXT extCustomBorderColor;
VkPhysicalDeviceTransformFeedbackPropertiesEXT extTransformFeedback; VkPhysicalDeviceRobustness2PropertiesEXT extRobustness2;
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT extVertexAttributeDivisor; VkPhysicalDeviceTransformFeedbackPropertiesEXT extTransformFeedback;
VkPhysicalDeviceDepthStencilResolvePropertiesKHR khrDepthStencilResolve; VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT extVertexAttributeDivisor;
VkPhysicalDeviceDriverPropertiesKHR khrDeviceDriverProperties; VkPhysicalDeviceDepthStencilResolvePropertiesKHR khrDepthStencilResolve;
VkPhysicalDeviceFloatControlsPropertiesKHR khrShaderFloatControls; VkPhysicalDeviceDriverPropertiesKHR khrDeviceDriverProperties;
VkPhysicalDeviceFloatControlsPropertiesKHR khrShaderFloatControls;
}; };

View File

@ -261,6 +261,7 @@ namespace dxvk {
DxvkExt amdMemoryOverallocationBehaviour = { VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt amdMemoryOverallocationBehaviour = { VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt amdShaderFragmentMask = { VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt amdShaderFragmentMask = { VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt ext4444Formats = { VK_EXT_4444_FORMATS_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt ext4444Formats = { VK_EXT_4444_FORMATS_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extConservativeRasterization = { VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extCustomBorderColor = { VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extCustomBorderColor = { VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_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 extExtendedDynamicState = { VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, DxvkExtMode::Optional };