summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-07-04 04:17:40 +0200
committerbunnei <bunneidev@gmail.com>2023-07-04 04:25:06 +0200
commit1462db46946f7829c28a7cba0bdd9e2417c04b6a (patch)
tree2d3b0a10a59f3894f1ab181a6a52d4d282604cbe /src/video_core
parentMerge pull request #10964 from bunnei/gpu-remove-qcom-check (diff)
downloadyuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar.gz
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar.bz2
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar.lz
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar.xz
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.tar.zst
yuzu-1462db46946f7829c28a7cba0bdd9e2417c04b6a.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp17
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h8
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
}
if (extensions.extended_dynamic_state2 && is_qualcomm) {
const u32 version = (properties.properties.driverVersion << 3) >> 3;
- if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0)) {
+ if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0) &&
+ version < VK_MAKE_API_VERSION(0, 0, 680, 0)) {
// Qualcomm Adreno 7xx drivers do not properly support extended_dynamic_state2.
LOG_WARNING(Render_Vulkan,
"Qualcomm Adreno 7xx drivers have broken VK_EXT_extended_dynamic_state2");
@@ -540,7 +541,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
}
if (extensions.vertex_input_dynamic_state && is_qualcomm) {
const u32 version = (properties.properties.driverVersion << 3) >> 3;
- if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0)) {
+ if (version >= VK_MAKE_API_VERSION(0, 0, 676, 0) &&
+ version < VK_MAKE_API_VERSION(0, 0, 680, 0)) {
// Qualcomm Adreno 7xx drivers do not properly support vertex_input_dynamic_state.
LOG_WARNING(
Render_Vulkan,
@@ -798,6 +800,17 @@ bool Device::ShouldBoostClocks() const {
return validated_driver && !is_steam_deck && !is_debugging;
}
+bool Device::HasTimelineSemaphore() const {
+ if (GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY ||
+ GetDriverID() == VK_DRIVER_ID_MESA_TURNIP) {
+ // Timeline semaphores do not work properly on all Qualcomm drivers.
+ // They generally work properly with Turnip drivers, but are problematic on some devices
+ // (e.g. ZTE handsets with Snapdragon 870).
+ return false;
+ }
+ return features.timeline_semaphore.timelineSemaphore;
+}
+
bool Device::GetSuitability(bool requires_swapchain) {
// Assume we will be suitable.
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:
return extensions.shader_atomic_int64;
}
- bool HasTimelineSemaphore() const {
- if (GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY) {
- // Timeline semaphores do not work properly on all Qualcomm drivers.
- return false;
- }
- return features.timeline_semaphore.timelineSemaphore;
- }
+ bool HasTimelineSemaphore() const;
/// Returns the minimum supported version of SPIR-V.
u32 SupportedSpirvVersion() const {