[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) {
DxvkDeviceExtensions devExtensions;
std::array<DxvkExt*, 24> devExtensionList = {{
std::array<DxvkExt*, 25> devExtensionList = {{
&devExtensions.amdMemoryOverallocationBehaviour,
&devExtensions.amdShaderFragmentMask,
&devExtensions.ext4444Formats,
&devExtensions.extConservativeRasterization,
&devExtensions.extCustomBorderColor,
&devExtensions.extDepthClipEnable,
&devExtensions.extExtendedDynamicState,
@ -521,6 +522,11 @@ namespace dxvk {
m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
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)) {
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);

View File

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

View File

@ -261,6 +261,7 @@ namespace dxvk {
DxvkExt amdMemoryOverallocationBehaviour = { VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_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 extConservativeRasterization = { VK_EXT_CONSERVATIVE_RASTERIZATION_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 extExtendedDynamicState = { VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, DxvkExtMode::Optional };