summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-02 05:08:38 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:06:08 +0200
commitdf70fdc95b1f1aea81517398c28e6be38e585747 (patch)
tree4ba14ff4af7a144fc18dbd6ab9a21e38ed23a831 /src
parentandroid: EmulationFragment: Remove unnecessary surface destroy on pause. (diff)
downloadyuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar.gz
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar.bz2
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar.lz
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar.xz
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.tar.zst
yuzu-df70fdc95b1f1aea81517398c28e6be38e585747.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/vk_turbo_mode.cpp11
-rw-r--r--src/video_core/renderer_vulkan/vk_turbo_mode.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
index 22dbf272e..a802d3c49 100644
--- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
+++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp
@@ -17,7 +17,10 @@ namespace Vulkan {
using namespace Common::Literals;
TurboMode::TurboMode(const vk::Instance& instance, const vk::InstanceDispatch& dld)
- : m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device, false} {
+#ifndef ANDROID
+ : m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device, false}
+#endif
+{
{
std::scoped_lock lk{m_submission_lock};
m_submission_time = std::chrono::steady_clock::now();
@@ -34,6 +37,7 @@ void TurboMode::QueueSubmitted() {
}
void TurboMode::Run(std::stop_token stop_token) {
+#ifndef ANDROID
auto& dld = m_device.GetLogical();
// Allocate buffer. 2MiB should be sufficient.
@@ -146,10 +150,13 @@ void TurboMode::Run(std::stop_token stop_token) {
// Create a single command buffer.
auto cmdbufs = command_pool.Allocate(1, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
auto cmdbuf = vk::CommandBuffer{cmdbufs[0], m_device.GetDispatchLoader()};
+#endif
while (!stop_token.stop_requested()) {
-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
+#ifdef ANDROID
+#ifdef ARCHITECTURE_arm64
adrenotools_set_turbo(true);
+#endif
#else
// Reset the fence.
fence.Reset();
diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.h b/src/video_core/renderer_vulkan/vk_turbo_mode.h
index 99b5ac50b..9341c9867 100644
--- a/src/video_core/renderer_vulkan/vk_turbo_mode.h
+++ b/src/video_core/renderer_vulkan/vk_turbo_mode.h
@@ -23,8 +23,10 @@ public:
private:
void Run(std::stop_token stop_token);
+#ifndef ANDROID
Device m_device;
MemoryAllocator m_allocator;
+#endif
std::mutex m_submission_lock;
std::condition_variable_any m_submission_cv;
std::chrono::time_point<std::chrono::steady_clock> m_submission_time{};