[TEST] Rework Android CPU affinity/ threading

This commit is contained in:
CamilleLaVey
2026-07-28 23:42:46 -04:00
parent b6959029ca
commit 71b9d8d3df
6 changed files with 103 additions and 30 deletions
+1
View File
@@ -30,6 +30,7 @@ void ThreadManager::StartThread(VideoCore::RendererBase& renderer, Core::Fronten
thread = std::jthread([&](std::stop_token stop_token) {
Common::SetCurrentThreadName("GPU");
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
Common::SetCurrentThreadToPerformanceCores();
system.RegisterHostThread();
auto current_context = context.Acquire();
@@ -305,7 +305,7 @@ size_t GetTotalPipelineWorkers() {
std::max<size_t>(static_cast<size_t>(std::thread::hardware_concurrency()), 2ULL) - 1ULL;
#ifdef __ANDROID__
const int configured = AndroidSettings::values.pipeline_worker_count.GetValue();
const int clamped = std::clamp(configured, 4, 8);
const int clamped = std::clamp(configured, 2, 8);
const size_t desired = static_cast<size_t>(clamped);
if (desired == 0) {
return 1ULL;