summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-05 09:48:53 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:36:09 -0400
commit528b19a84287167d7699465e495b196d216b99db (patch)
treec3ac61644c1a11fd1cf5ceeb70d1c9f5d4a00aa3 /src/video_core
parentDynarmic Interface: don't clear cache if JIT has not been created. (diff)
downloadyuzu-528b19a84287167d7699465e495b196d216b99db.tar.gz
yuzu-528b19a84287167d7699465e495b196d216b99db.tar.xz
yuzu-528b19a84287167d7699465e495b196d216b99db.zip
General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu_thread.cpp1
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 323185bfc..738c6f0c1 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -22,6 +22,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
22 std::string name = "yuzu:GPU"; 22 std::string name = "yuzu:GPU";
23 MicroProfileOnThreadCreate(name.c_str()); 23 MicroProfileOnThreadCreate(name.c_str());
24 Common::SetCurrentThreadName(name.c_str()); 24 Common::SetCurrentThreadName(name.c_str());
25 Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
25 system.RegisterHostThread(); 26 system.RegisterHostThread();
26 27
27 // Wait for first GPU command before acquiring the window context 28 // Wait for first GPU command before acquiring the window context
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp
index 82ec9180e..56524e6f3 100644
--- a/src/video_core/renderer_vulkan/vk_scheduler.cpp
+++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp
@@ -9,6 +9,7 @@
9#include <utility> 9#include <utility>
10 10
11#include "common/microprofile.h" 11#include "common/microprofile.h"
12#include "common/thread.h"
12#include "video_core/renderer_vulkan/vk_device.h" 13#include "video_core/renderer_vulkan/vk_device.h"
13#include "video_core/renderer_vulkan/vk_query_cache.h" 14#include "video_core/renderer_vulkan/vk_query_cache.h"
14#include "video_core/renderer_vulkan/vk_resource_manager.h" 15#include "video_core/renderer_vulkan/vk_resource_manager.h"
@@ -133,6 +134,7 @@ void VKScheduler::BindGraphicsPipeline(VkPipeline pipeline) {
133} 134}
134 135
135void VKScheduler::WorkerThread() { 136void VKScheduler::WorkerThread() {
137 Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
136 std::unique_lock lock{mutex}; 138 std::unique_lock lock{mutex};
137 do { 139 do {
138 cv.wait(lock, [this] { return !chunk_queue.Empty() || quit; }); 140 cv.wait(lock, [this] { return !chunk_queue.Empty() || quit; });