diff options
| author | 2023-07-03 23:48:41 -0700 | |
|---|---|---|
| committer | 2023-07-03 23:48:41 -0700 | |
| commit | 4467fd9993549e96f96ecae433bea214fb175bd9 (patch) | |
| tree | 2d3b0a10a59f3894f1ab181a6a52d4d282604cbe | |
| parent | Merge pull request #10964 from bunnei/gpu-remove-qcom-check (diff) | |
| parent | video_core: vulkan_device: Disable timeline semaphore on Turnip, fix qcom ver... (diff) | |
| download | yuzu-4467fd9993549e96f96ecae433bea214fb175bd9.tar.gz yuzu-4467fd9993549e96f96ecae433bea214fb175bd9.tar.xz yuzu-4467fd9993549e96f96ecae433bea214fb175bd9.zip | |
Merge pull request #11017 from bunnei/fix-turnip-sd870
video_core: vulkan_device: Disable timeline semaphore on Turnip, fix qcom version check.
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 17 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 8 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 99ca7dbda..e04852e01 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -500,7 +500,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 500 | } | 500 | } |
| 501 | if (extensions.extended_dynamic_state2 && is_qualcomm) { | 501 | if (extensions.extended_dynamic_state2 && is_qualcomm) { |
| 502 | const u32 version = (properties.properties.driverVersion << 3) >> 3; | 502 | const u32 version = (properties.properties.driverVersion << 3) >> 3; |
| 503 | if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0)) { | 503 | if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0) && |
| 504 | version < VK_MAKE_API_VERSION(0, 0, 680, 0)) { | ||
| 504 | // Qualcomm Adreno 7xx drivers do not properly support extended_dynamic_state2. | 505 | // Qualcomm Adreno 7xx drivers do not properly support extended_dynamic_state2. |
| 505 | LOG_WARNING(Render_Vulkan, | 506 | LOG_WARNING(Render_Vulkan, |
| 506 | "Qualcomm Adreno 7xx drivers have broken VK_EXT_extended_dynamic_state2"); | 507 | "Qualcomm Adreno 7xx drivers have broken VK_EXT_extended_dynamic_state2"); |
| @@ -540,7 +541,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 540 | } | 541 | } |
| 541 | if (extensions.vertex_input_dynamic_state && is_qualcomm) { | 542 | if (extensions.vertex_input_dynamic_state && is_qualcomm) { |
| 542 | const u32 version = (properties.properties.driverVersion << 3) >> 3; | 543 | const u32 version = (properties.properties.driverVersion << 3) >> 3; |
| 543 | if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0)) { | 544 | if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0) && |
| 545 | version < VK_MAKE_API_VERSION(0, 0, 680, 0)) { | ||
| 544 | // Qualcomm Adreno 7xx drivers do not properly support vertex_input_dynamic_state. | 546 | // Qualcomm Adreno 7xx drivers do not properly support vertex_input_dynamic_state. |
| 545 | LOG_WARNING( | 547 | LOG_WARNING( |
| 546 | Render_Vulkan, | 548 | Render_Vulkan, |
| @@ -798,6 +800,17 @@ bool Device::ShouldBoostClocks() const { | |||
| 798 | return validated_driver && !is_steam_deck && !is_debugging; | 800 | return validated_driver && !is_steam_deck && !is_debugging; |
| 799 | } | 801 | } |
| 800 | 802 | ||
| 803 | bool Device::HasTimelineSemaphore() const { | ||
| 804 | if (GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY || | ||
| 805 | GetDriverID() == VK_DRIVER_ID_MESA_TURNIP) { | ||
| 806 | // Timeline semaphores do not work properly on all Qualcomm drivers. | ||
| 807 | // They generally work properly with Turnip drivers, but are problematic on some devices | ||
| 808 | // (e.g. ZTE handsets with Snapdragon 870). | ||
| 809 | return false; | ||
| 810 | } | ||
| 811 | return features.timeline_semaphore.timelineSemaphore; | ||
| 812 | } | ||
| 813 | |||
| 801 | bool Device::GetSuitability(bool requires_swapchain) { | 814 | bool Device::GetSuitability(bool requires_swapchain) { |
| 802 | // Assume we will be suitable. | 815 | // Assume we will be suitable. |
| 803 | bool suitable = true; | 816 | bool suitable = true; |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 3ace1fb03..be3ed45ff 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -528,13 +528,7 @@ public: | |||
| 528 | return extensions.shader_atomic_int64; | 528 | return extensions.shader_atomic_int64; |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | bool HasTimelineSemaphore() const { | 531 | bool HasTimelineSemaphore() const; |
| 532 | if (GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY) { | ||
| 533 | // Timeline semaphores do not work properly on all Qualcomm drivers. | ||
| 534 | return false; | ||
| 535 | } | ||
| 536 | return features.timeline_semaphore.timelineSemaphore; | ||
| 537 | } | ||
| 538 | 532 | ||
| 539 | /// Returns the minimum supported version of SPIR-V. | 533 | /// Returns the minimum supported version of SPIR-V. |
| 540 | u32 SupportedSpirvVersion() const { | 534 | u32 SupportedSpirvVersion() const { |