summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorGPUCode <geoster3d@gmail.com>2023-06-05 18:27:36 +0200
committerbunnei <bunneidev@gmail.com>2023-06-28 03:00:09 +0200
commitb8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44 (patch)
tree2d3a0f346a361f14d46af1b9e16ca284056876e0 /src/video_core/vulkan_common
parentrenderer_vulkan: Don't assume debug tool with debug renderer (diff)
downloadyuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar.gz
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar.bz2
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar.lz
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar.xz
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.tar.zst
yuzu-b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44.zip
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp4
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h16
2 files changed, 20 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 9743a82f5..70436cf1c 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -905,6 +905,10 @@ bool Device::GetSuitability(bool requires_swapchain) {
properties.driver.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES;
SetNext(next, properties.driver);
+ // Retrieve subgroup properties.
+ properties.subgroup_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
+ SetNext(next, properties.subgroup_properties);
+
// Retrieve relevant extension properties.
if (extensions.shader_float_controls) {
properties.float_controls.sType =
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 7be631122..e05d04db3 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -323,6 +323,11 @@ public:
return properties.subgroup_size_control.requiredSubgroupSizeStages & stage;
}
+ /// Returns true if the device supports the provided subgroup feature.
+ bool IsSubgroupFeatureSupported(VkSubgroupFeatureFlagBits feature) const {
+ return properties.subgroup_properties.supportedOperations & feature;
+ }
+
/// Returns the maximum number of push descriptors.
u32 MaxPushDescriptors() const {
return properties.push_descriptor.maxPushDescriptors;
@@ -388,6 +393,11 @@ public:
return extensions.swapchain_mutable_format;
}
+ /// Returns true if VK_KHR_shader_float_controls is enabled.
+ bool IsKhrShaderFloatControlsSupported() const {
+ return extensions.shader_float_controls;
+ }
+
/// Returns true if the device supports VK_KHR_workgroup_memory_explicit_layout.
bool IsKhrWorkgroupMemoryExplicitLayoutSupported() const {
return extensions.workgroup_memory_explicit_layout;
@@ -487,6 +497,11 @@ public:
return extensions.shader_stencil_export;
}
+ /// Returns true if the device supports VK_EXT_shader_demote_to_helper_invocation
+ bool IsExtShaderDemoteToHelperInvocationSupported() const {
+ return extensions.shader_demote_to_helper_invocation;
+ }
+
/// Returns true if the device supports VK_EXT_conservative_rasterization.
bool IsExtConservativeRasterizationSupported() const {
return extensions.conservative_rasterization;
@@ -684,6 +699,7 @@ private:
struct Properties {
VkPhysicalDeviceDriverProperties driver{};
+ VkPhysicalDeviceSubgroupProperties subgroup_properties{};
VkPhysicalDeviceFloatControlsProperties float_controls{};
VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{};
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{};