aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common/vulkan_device.cpp
diff options
context:
space:
mode:
authorCamilleLaVey <camillelavey99@gmail.com>2026-01-19 04:10:54 +0100
committercrueter <crueter@eden-emu.dev>2026-01-19 04:10:54 +0100
commit1fbace438c375ca1e33f3cb09d7d85249cb51293 (patch)
tree650c5d099023a09fdeb304bb8e1c221da3ebc0ce /src/video_core/vulkan_common/vulkan_device.cpp
parent1ae084e87b75e05f7c595f5e503ad129bbbc80e3 (diff)
[vulkan, qcom] Another set of fixes for QCOM stock driver (#3334)
This pr is another set of fixes for the system driver (stock) on Qualcomm devices, mostly taking into consideration drivers from series 512.800.0 and on, reduces unwanted loads in the GPU by allocating properly features that were forced available, when they weren't, generating wrong commands between shader recompiler and Adreno's compiler; also this pr has a bunch of small fixes on games that some textures were displayed wrongly due to double swizzling during the creation of shaders, which allows serveral games to be fixed: - Zelda: Link's Awakening (no blur, hearts properly displayed, flickering highly reduced on NCE) - Zelda: Echoes Of Wisdom (no blur, hearts properly displayed, reduced highly flickering, rift properly rendered) - Mario Kart 8 Deluxe (no longer wrong blue texture on icons of the cups or countdown marker, no longer freezes when compilling shaders on game versions below NCE update to bring more compatibility with CTGP MOD) - Naruto's Ninja Storm series (no longer blue texturing on Naruto or main character on the screeen) - Pokemon Scarlet/ Violet (no longer missing characters or npc) - And many more games that are missing from our scope of testing. But not only that, but also improved GPU - CPU synchornization for better performance (by 15% compared to previous builds) more stable shader compilations and removed unneeded emulation paths; making games as Breath Of The Wild less stuttery than it was used to; along some cleaning from dead code, allowing mobile devices to go brrrr, always long live to the Snapdragon Master Race, it's needed to explain that devices from A7XX need to use the driver 819.2, meanwhile A8XX can use 842.9 to obtain all the benefits from VK 1.4 allowed in Eden. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3334 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 2ae5052640..92ef997849 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -432,7 +432,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK;
const bool is_qualcomm = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY;
const bool is_turnip = driver_id == VK_DRIVER_ID_MESA_TURNIP;
- const bool is_arm = driver_id == VK_DRIVER_ID_ARM_PROPRIETARY;
if (!is_suitable)
LOG_WARNING(Render_Vulkan, "Unsuitable driver - continuing anyways");
@@ -601,10 +600,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
}
if (is_qualcomm) {
- const u32 version = (properties.properties.driverVersion << 3) >> 3;
- if (version < VK_MAKE_API_VERSION(0, 255, 615, 512)) {
- has_broken_parallel_compiling = true;
- }
const size_t sampler_limit = properties.properties.limits.maxSamplerAllocationCount;
if (sampler_limit > 0) {
constexpr size_t MIN_SAMPLER_BUDGET = 1024U;
@@ -645,20 +640,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
has_broken_compute =
CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion) &&
!Settings::values.enable_compute_pipelines.GetValue();
- must_emulate_bgr565 = false; // Default: assume emulation isn't required
-
- if (is_intel_anv) {
- LOG_WARNING(Render_Vulkan, "Intel ANV driver does not support native BGR format");
- must_emulate_bgr565 = true;
- } else if (is_qualcomm) {
- LOG_WARNING(Render_Vulkan,
- "Qualcomm driver mishandles BGR5 formats even with VK_KHR_maintenance5, forcing emulation");
- must_emulate_bgr565 = true;
- } else if (is_arm) {
- LOG_WARNING(Render_Vulkan,
- "ARM Mali driver mishandles BGR5 formats even with VK_KHR_maintenance5, forcing emulation");
- must_emulate_bgr565 = true;
- }
if (is_mvk) {
LOG_WARNING(Render_Vulkan,
@@ -936,11 +917,7 @@ bool Device::ShouldBoostClocks() const {
}
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).
+ if (GetDriverID() == VK_DRIVER_ID_MESA_TURNIP) {
return false;
}
return features.timeline_semaphore.timelineSemaphore;
@@ -1092,9 +1069,14 @@ bool Device::GetSuitability(bool requires_swapchain) {
LOG_INFO(Render_Vulkan, "Device doesn't support feature {}", #name); \
}
+// Optional features are enabled silently without any logging
+#define OPTIONAL_FEATURE(feature, name) (void)features.feature.name;
+
+ FOR_EACH_VK_OPTIONAL_FEATURE(OPTIONAL_FEATURE);
FOR_EACH_VK_RECOMMENDED_FEATURE(LOG_FEATURE);
FOR_EACH_VK_MANDATORY_FEATURE(CHECK_FEATURE);
+#undef OPTIONAL_FEATURE
#undef LOG_FEATURE
#undef CHECK_FEATURE