Browse Source

[vk] Declaring features from Maintenance5

true-eds
CamilleLaVey 4 weeks ago
committed by Caio Oliveira
parent
commit
17ddbb2240
No known key found for this signature in database GPG Key ID: AAAE6C7FD4186B0C
  1. 16
      src/video_core/vulkan_common/vulkan_device.cpp
  2. 18
      src/video_core/vulkan_common/vulkan_device.h

16
src/video_core/vulkan_common/vulkan_device.cpp

@ -1121,6 +1121,11 @@ bool Device::GetSuitability(bool requires_swapchain) {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT; VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT;
SetNext(next, properties.transform_feedback); SetNext(next, properties.transform_feedback);
} }
if (extensions.maintenance5) {
properties.maintenance5.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR;
SetNext(next, properties.maintenance5);
}
// Perform the property fetch. // Perform the property fetch.
physical.GetProperties2(properties2); physical.GetProperties2(properties2);
@ -1409,6 +1414,17 @@ void Device::RemoveUnsuitableExtensions() {
// VK_KHR_maintenance5 // VK_KHR_maintenance5
extensions.maintenance5 = features.maintenance5.maintenance5; extensions.maintenance5 = features.maintenance5.maintenance5;
if (extensions.maintenance5) {
LOG_INFO(Render_Vulkan, "VK_KHR_maintenance5 properties: polygonModePointSize={} "
"depthStencilSwizzleOne={} earlyFragmentTests={} nonStrictWideLines={}",
properties.maintenance5.polygonModePointSize,
properties.maintenance5.depthStencilSwizzleOneSupport,
properties.maintenance5.earlyFragmentMultisampleCoverageAfterSampleCounting &&
properties.maintenance5.earlyFragmentSampleMaskTestBeforeSampleCounting,
properties.maintenance5.nonStrictWideLinesUseParallelogram);
}
RemoveExtensionFeatureIfUnsuitable(extensions.maintenance5, features.maintenance5, RemoveExtensionFeatureIfUnsuitable(extensions.maintenance5, features.maintenance5,
VK_KHR_MAINTENANCE_5_EXTENSION_NAME); VK_KHR_MAINTENANCE_5_EXTENSION_NAME);

18
src/video_core/vulkan_common/vulkan_device.h

@ -796,6 +796,23 @@ public:
return extensions.maintenance5; return extensions.maintenance5;
} }
/// Returns true if polygon mode POINT supports gl_PointSize.
bool SupportsPolygonModePointSize() const {
return extensions.maintenance5 && properties.maintenance5.polygonModePointSize;
}
/// Returns true if depth/stencil swizzle ONE is supported.
bool SupportsDepthStencilSwizzleOne() const {
return extensions.maintenance5 && properties.maintenance5.depthStencilSwizzleOneSupport;
}
/// Returns true if early fragment tests optimizations are available.
bool SupportsEarlyFragmentTests() const {
return extensions.maintenance5 &&
properties.maintenance5.earlyFragmentMultisampleCoverageAfterSampleCounting &&
properties.maintenance5.earlyFragmentSampleMaskTestBeforeSampleCounting;
}
/// Returns true if the device supports VK_KHR_maintenance6. /// Returns true if the device supports VK_KHR_maintenance6.
bool IsKhrMaintenance6Supported() const { bool IsKhrMaintenance6Supported() const {
return extensions.maintenance6; return extensions.maintenance6;
@ -932,6 +949,7 @@ private:
VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{}; VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{};
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{}; VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{};
VkPhysicalDeviceTransformFeedbackPropertiesEXT transform_feedback{}; VkPhysicalDeviceTransformFeedbackPropertiesEXT transform_feedback{};
VkPhysicalDeviceMaintenance5PropertiesKHR maintenance5{};
VkPhysicalDeviceProperties properties{}; VkPhysicalDeviceProperties properties{};
}; };

Loading…
Cancel
Save