diff options
| author | 2023-06-10 11:40:58 -0400 | |
|---|---|---|
| committer | 2023-06-10 12:30:39 -0400 | |
| commit | 2bb7ea436dc74f812a8092201dc597ed58ff3c7a (patch) | |
| tree | 27b6426a646112e163ae39b733ce60ca6d6aa748 /src/video_core/vulkan_common | |
| parent | Merge pull request #10685 from liamwhite/serialization-is-hard (diff) | |
| download | yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.tar.gz yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.tar.xz yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.zip | |
shader_recompiler: remove barriers in conditional control flow when device lacks support
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 0158b6b0d..a46f9beed 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -386,6 +386,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 386 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, | 386 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, |
| 387 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal); | 387 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal); |
| 388 | 388 | ||
| 389 | supports_conditional_barriers = !(is_intel_anv || is_intel_windows); | ||
| 390 | |||
| 389 | CollectPhysicalMemoryInfo(); | 391 | CollectPhysicalMemoryInfo(); |
| 390 | CollectToolingInfo(); | 392 | CollectToolingInfo(); |
| 391 | 393 | ||
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index d62a103a1..ccce9429a 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -580,6 +580,10 @@ public: | |||
| 580 | return properties.properties.limits.maxVertexInputBindings; | 580 | return properties.properties.limits.maxVertexInputBindings; |
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | bool SupportsConditionalBarriers() const { | ||
| 584 | return supports_conditional_barriers; | ||
| 585 | } | ||
| 586 | |||
| 583 | private: | 587 | private: |
| 584 | /// Checks if the physical device is suitable and configures the object state | 588 | /// Checks if the physical device is suitable and configures the object state |
| 585 | /// with all necessary info about its properties. | 589 | /// with all necessary info about its properties. |
| @@ -683,6 +687,7 @@ private: | |||
| 683 | bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format. | 687 | bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format. |
| 684 | bool dynamic_state3_blending{}; ///< Has all blending features of dynamic_state3. | 688 | bool dynamic_state3_blending{}; ///< Has all blending features of dynamic_state3. |
| 685 | bool dynamic_state3_enables{}; ///< Has all enables features of dynamic_state3. | 689 | bool dynamic_state3_enables{}; ///< Has all enables features of dynamic_state3. |
| 690 | bool supports_conditional_barriers{}; ///< Allows barriers in conditional control flow. | ||
| 686 | u64 device_access_memory{}; ///< Total size of device local memory in bytes. | 691 | u64 device_access_memory{}; ///< Total size of device local memory in bytes. |
| 687 | u32 sets_per_pool{}; ///< Sets per Description Pool | 692 | u32 sets_per_pool{}; ///< Sets per Description Pool |
| 688 | 693 | ||