summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-16 16:56:51 +0100
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:43 +0200
commit616cf70a801ccf7c2312118d163185a8d341e517 (patch)
tree063170927625dfda9151bf20a5f2d44da6fc51b7 /src/video_core
parentandroid: Use Skyline's document provider (diff)
downloadyuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.gz
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.bz2
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.lz
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.xz
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.zst
yuzu-616cf70a801ccf7c2312118d163185a8d341e517.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/CMakeLists.txt2
-rw-r--r--src/video_core/renderer_vulkan/vk_turbo_mode.cpp6
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp4
-rw-r--r--src/video_core/vulkan_common/vulkan_library.cpp2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index 05aa5cfe2..94e3000ba 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -346,6 +346,6 @@ if (YUZU_ENABLE_LTO)
set_property(TARGET video_core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
-if (ANDROID)
+if (ANDROID AND ARCHITECTURE_arm64)
target_link_libraries(video_core PRIVATE adrenotools)
endif()
diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
index 29751e6b4..22dbf272e 100644
--- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
+++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#ifdef ANDROID
+#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
#include <adrenotools/driver.h>
#endif
@@ -148,7 +148,7 @@ void TurboMode::Run(std::stop_token stop_token) {
auto cmdbuf = vk::CommandBuffer{cmdbufs[0], m_device.GetDispatchLoader()};
while (!stop_token.stop_requested()) {
-#ifdef ANDROID
+#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
adrenotools_set_turbo(true);
#else
// Reset the fence.
@@ -224,7 +224,7 @@ void TurboMode::Run(std::stop_token stop_token) {
std::chrono::milliseconds{100};
});
}
-#ifdef ANDROID
+#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
adrenotools_set_turbo(false);
#endif
}
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 06efa1a6c..9e2dee097 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -18,7 +18,7 @@
#include "video_core/vulkan_common/vulkan_device.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-#ifdef ANDROID
+#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
#include <adrenotools/bcenabler.h>
#endif
@@ -374,6 +374,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
extensions.push_descriptor = false;
loaded_extensions.erase(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
+#ifdef ARCHITECTURE_arm64
// Patch the driver to enable BCn textures.
const auto major = (properties.properties.driverVersion >> 24) << 2;
const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU;
@@ -391,6 +392,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
} else {
LOG_WARNING(Render_Vulkan, "Adreno driver can't be patched to enable BCn textures");
}
+#endif // ARCHITECTURE_arm64
}
const bool is_arm = driver_id == VK_DRIVER_ID_ARM_PROPRIETARY;
diff --git a/src/video_core/vulkan_common/vulkan_library.cpp b/src/video_core/vulkan_common/vulkan_library.cpp
index 9a7d369f3..47f6f2a03 100644
--- a/src/video_core/vulkan_common/vulkan_library.cpp
+++ b/src/video_core/vulkan_common/vulkan_library.cpp
@@ -13,7 +13,7 @@ namespace Vulkan {
std::shared_ptr<Common::DynamicLibrary> OpenLibrary(
[[maybe_unused]] Core::Frontend::GraphicsContext* context) {
LOG_DEBUG(Render_Vulkan, "Looking for a Vulkan library");
-#ifdef ANDROID
+#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
// Android manages its Vulkan driver from the frontend.
return context->GetDriverLibrary();
#else