diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-06-20 15:55:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 15:55:14 +0200 |
commit | 93061d1ea1889d79455820ff55ad7d4e402ff01e (patch) | |
tree | 136149ad79e7d0970b7cbc46158b6d772db3726b /src/video_core/vulkan_common/vulkan_device.h | |
parent | Merge pull request #10840 from Kelebek1/unbug_blinks_brain (diff) | |
parent | vulkan_device: Remove brace initializer (diff) | |
download | yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar.gz yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar.bz2 yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar.lz yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar.xz yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.tar.zst yuzu-93061d1ea1889d79455820ff55ad7d4e402ff01e.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.h')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 8c7e44fcb..0b634a876 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -10,6 +10,7 @@ #include <vector> #include "common/common_types.h" +#include "common/logging/log.h" #include "common/settings.h" #include "video_core/vulkan_common/vulkan_wrapper.h" @@ -518,6 +519,11 @@ public: return has_renderdoc || has_nsight_graphics || Settings::values.renderer_debug.GetValue(); } + /// @returns True if compute pipelines can cause crashing. + bool HasBrokenCompute() const { + return has_broken_compute; + } + /// Returns true when the device does not properly support cube compatibility. bool HasBrokenCubeImageCompability() const { return has_broken_cube_compatibility; @@ -579,6 +585,22 @@ public: return supports_conditional_barriers; } + [[nodiscard]] static constexpr bool CheckBrokenCompute(VkDriverId driver_id, + u32 driver_version) { + if (driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { + const u32 major = VK_API_VERSION_MAJOR(driver_version); + const u32 minor = VK_API_VERSION_MINOR(driver_version); + const u32 patch = VK_API_VERSION_PATCH(driver_version); + if (major == 0 && minor == 405 && patch < 286) { + LOG_WARNING( + Render_Vulkan, + "Intel proprietary drivers 0.405.0 until 0.405.286 have broken compute"); + return true; + } + } + return false; + } + private: /// Checks if the physical device is suitable and configures the object state /// with all necessary info about its properties. @@ -672,6 +694,7 @@ private: bool is_integrated{}; ///< Is GPU an iGPU. bool is_virtual{}; ///< Is GPU a virtual GPU. bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device. + bool has_broken_compute{}; ///< Compute shaders can cause crashes bool has_broken_cube_compatibility{}; ///< Has broken cube compatibility bit bool has_renderdoc{}; ///< Has RenderDoc attached bool has_nsight_graphics{}; ///< Has Nsight Graphics attached |