mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.
This commit is contained in:
		@@ -22,6 +22,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
 | 
			
		||||
    std::string name = "yuzu:GPU";
 | 
			
		||||
    MicroProfileOnThreadCreate(name.c_str());
 | 
			
		||||
    Common::SetCurrentThreadName(name.c_str());
 | 
			
		||||
    Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
 | 
			
		||||
    system.RegisterHostThread();
 | 
			
		||||
 | 
			
		||||
    // Wait for first GPU command before acquiring the window context
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,7 @@
 | 
			
		||||
#include <utility>
 | 
			
		||||
 | 
			
		||||
#include "common/microprofile.h"
 | 
			
		||||
#include "common/thread.h"
 | 
			
		||||
#include "video_core/renderer_vulkan/vk_device.h"
 | 
			
		||||
#include "video_core/renderer_vulkan/vk_query_cache.h"
 | 
			
		||||
#include "video_core/renderer_vulkan/vk_resource_manager.h"
 | 
			
		||||
@@ -133,6 +134,7 @@ void VKScheduler::BindGraphicsPipeline(VkPipeline pipeline) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VKScheduler::WorkerThread() {
 | 
			
		||||
    Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
 | 
			
		||||
    std::unique_lock lock{mutex};
 | 
			
		||||
    do {
 | 
			
		||||
        cv.wait(lock, [this] { return !chunk_queue.Empty() || quit; });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user