diff options
| author | 2023-11-26 21:08:53 -0500 | |
|---|---|---|
| committer | 2023-11-26 21:08:53 -0500 | |
| commit | 1d11fe00a3000efbf6a0a4bb690e0d544a1b7b4a (patch) | |
| tree | c219aacab776c0a1e3956614b60a01fa2f6164cb /src/video_core/vulkan_common | |
| parent | shader_recompiler: Align SSBO offsets in GlobalMemory functions (diff) | |
| parent | Merge pull request #11535 from GPUCode/upload_cmdbuf (diff) | |
| download | yuzu-1d11fe00a3000efbf6a0a4bb690e0d544a1b7b4a.tar.gz yuzu-1d11fe00a3000efbf6a0a4bb690e0d544a1b7b4a.tar.xz yuzu-1d11fe00a3000efbf6a0a4bb690e0d544a1b7b4a.zip | |
Merge branch 'master' into ssbo-align
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 11 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.h | 4 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index e518756d2..fde36a49c 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -635,6 +635,12 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 635 | has_broken_cube_compatibility = true; | 635 | has_broken_cube_compatibility = true; |
| 636 | } | 636 | } |
| 637 | } | 637 | } |
| 638 | if (is_qualcomm) { | ||
| 639 | const u32 version = (properties.properties.driverVersion << 3) >> 3; | ||
| 640 | if (version < VK_MAKE_API_VERSION(0, 255, 615, 512)) { | ||
| 641 | has_broken_parallel_compiling = true; | ||
| 642 | } | ||
| 643 | } | ||
| 638 | if (extensions.sampler_filter_minmax && is_amd) { | 644 | if (extensions.sampler_filter_minmax && is_amd) { |
| 639 | // Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken. | 645 | // Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken. |
| 640 | if (!features.shader_float16_int8.shaderFloat16) { | 646 | if (!features.shader_float16_int8.shaderFloat16) { |
| @@ -863,7 +869,8 @@ bool Device::ShouldBoostClocks() const { | |||
| 863 | driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA || | 869 | driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA || |
| 864 | driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY || driver_id == VK_DRIVER_ID_MESA_TURNIP; | 870 | driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY || driver_id == VK_DRIVER_ID_MESA_TURNIP; |
| 865 | 871 | ||
| 866 | const bool is_steam_deck = vendor_id == 0x1002 && device_id == 0x163F; | 872 | const bool is_steam_deck = (vendor_id == 0x1002 && device_id == 0x163F) || |
| 873 | (vendor_id == 0x1002 && device_id == 0x1435); | ||
| 867 | 874 | ||
| 868 | const bool is_debugging = this->HasDebuggingToolAttached(); | 875 | const bool is_debugging = this->HasDebuggingToolAttached(); |
| 869 | 876 | ||
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index b213ed7dd..4f3846345 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -102,6 +102,7 @@ VK_DEFINE_HANDLE(VmaAllocator) | |||
| 102 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME) \ | 102 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME) \ |
| 103 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME) \ | 103 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME) \ |
| 104 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME) \ | 104 | EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME) \ |
| 105 | EXTENSION_NAME(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME) \ | ||
| 105 | EXTENSION_NAME(VK_EXT_4444_FORMATS_EXTENSION_NAME) \ | 106 | EXTENSION_NAME(VK_EXT_4444_FORMATS_EXTENSION_NAME) \ |
| 106 | EXTENSION_NAME(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME) \ | 107 | EXTENSION_NAME(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME) \ |
| 107 | EXTENSION_NAME(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME) \ | 108 | EXTENSION_NAME(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME) \ |
| @@ -599,6 +600,11 @@ public: | |||
| 599 | return has_broken_cube_compatibility; | 600 | return has_broken_cube_compatibility; |
| 600 | } | 601 | } |
| 601 | 602 | ||
| 603 | /// Returns true if parallel shader compiling has issues with the current driver. | ||
| 604 | bool HasBrokenParallelShaderCompiling() const { | ||
| 605 | return has_broken_parallel_compiling; | ||
| 606 | } | ||
| 607 | |||
| 602 | /// Returns the vendor name reported from Vulkan. | 608 | /// Returns the vendor name reported from Vulkan. |
| 603 | std::string_view GetVendorName() const { | 609 | std::string_view GetVendorName() const { |
| 604 | return properties.driver.driverName; | 610 | return properties.driver.driverName; |
| @@ -663,6 +669,10 @@ public: | |||
| 663 | return supports_conditional_barriers; | 669 | return supports_conditional_barriers; |
| 664 | } | 670 | } |
| 665 | 671 | ||
| 672 | bool SupportsMultiViewport() const { | ||
| 673 | return features2.features.multiViewport; | ||
| 674 | } | ||
| 675 | |||
| 666 | [[nodiscard]] static constexpr bool CheckBrokenCompute(VkDriverId driver_id, | 676 | [[nodiscard]] static constexpr bool CheckBrokenCompute(VkDriverId driver_id, |
| 667 | u32 driver_version) { | 677 | u32 driver_version) { |
| 668 | if (driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { | 678 | if (driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { |
| @@ -794,6 +804,7 @@ private: | |||
| 794 | bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device. | 804 | bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device. |
| 795 | bool has_broken_compute{}; ///< Compute shaders can cause crashes | 805 | bool has_broken_compute{}; ///< Compute shaders can cause crashes |
| 796 | bool has_broken_cube_compatibility{}; ///< Has broken cube compatibility bit | 806 | bool has_broken_cube_compatibility{}; ///< Has broken cube compatibility bit |
| 807 | bool has_broken_parallel_compiling{}; ///< Has broken parallel shader compiling. | ||
| 797 | bool has_renderdoc{}; ///< Has RenderDoc attached | 808 | bool has_renderdoc{}; ///< Has RenderDoc attached |
| 798 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached | 809 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached |
| 799 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. | 810 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. |
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 0487cd3b6..a0c70797f 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h | |||
| @@ -1101,6 +1101,10 @@ public: | |||
| 1101 | return &handle; | 1101 | return &handle; |
| 1102 | } | 1102 | } |
| 1103 | 1103 | ||
| 1104 | VkCommandBuffer operator*() const noexcept { | ||
| 1105 | return handle; | ||
| 1106 | } | ||
| 1107 | |||
| 1104 | void Begin(const VkCommandBufferBeginInfo& begin_info) const { | 1108 | void Begin(const VkCommandBufferBeginInfo& begin_info) const { |
| 1105 | Check(dld->vkBeginCommandBuffer(handle, &begin_info)); | 1109 | Check(dld->vkBeginCommandBuffer(handle, &begin_info)); |
| 1106 | } | 1110 | } |