aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgivethesourceplox <272928635+givethesourceplox@users.noreply.github.com>2026-10-30 09:58:10 -0300
committergivethesourceplox <272928635+givethesourceplox@users.noreply.github.com>2026-10-30 09:58:10 -0300
commit9ad01b60c8cefe0bb2d91eabf67cf54a1eeeb92c (patch)
tree4247cabf4448fc2d08df21f2fd6316840bc06b03 /src
parent6e7edd7462325ee18a0db6fdc29ff7698ac108cc (diff)
video_core: arm64 spin hint in the GPU split
Pause() fell back to a sched_yield system call on arm64; use the yield instruction like the x86 PAUSE. Mark the Windows-only back thread id unused for clang. Assisted-by: Claude (Anthropic)
Diffstat (limited to 'src')
-rw-r--r--src/video_core/gpu_split.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/gpu_split.cpp b/src/video_core/gpu_split.cpp
index f913ca82ce..2bc8e29470 100644
--- a/src/video_core/gpu_split.cpp
+++ b/src/video_core/gpu_split.cpp
@@ -34,12 +34,14 @@ void Pause() {
_mm_pause();
#elif defined(__x86_64__) || defined(__i386__)
__builtin_ia32_pause();
+#elif defined(__aarch64__)
+ asm volatile("yield");
#else
std::this_thread::yield();
#endif
}
-std::atomic<u32> g_back_thread_id{};
+[[maybe_unused]] std::atomic<u32> g_back_thread_id{};
std::atomic<bool> g_back_busy{};
} // Anonymous namespace