Give the Vulkan allocator one owning thread

Readback buffers are allocated when the readback is recorded rather than on the render thread,
so only the thread that records frames touches VMA. The allocator is created externally
synchronized, and VMA is built with no-op mutexes and plain counters instead of std::mutex and
std::atomic.

Headless runs Vulkan offscreen in builds without SDL too, and CI runs the headless tests on
lavapipe, skipping the pixel tests a hardware backend doesn't match the software references on.
sleep_ms and sleep_us go, with the thread manager test waiting on an event instead, and so does
the unused portable-file-dialogs header.
This commit is contained in:
libretroadmin committed 2026-10-09 07:37:57 +02:00
1 parent f1208a7a5a
commit b570567b88
18 files changed
+173 -2003

No files matched your search

-48
View File
@@ -6,20 +6,11 @@
#include "Common/TimeUtil.h"
#include "Common/Log.h"
#ifdef HAVE_LIBNX
#include <switch.h>
#endif // HAVE_LIBNX
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
#endif // __EMSCRIPTEN__
#ifdef _WIN32
#include "CommonWindows.h"
#include <sys/timeb.h>
#else
#include <sys/time.h>
#include <unistd.h>
#endif
#include <ctime>
@@ -257,45 +248,6 @@ double Instant::ElapsedSeconds() const {
#endif
#ifndef __LIBRETRO__
// The headless tools and tests only; see TimeUtil.h.
void sleep_ms(int ms, const char *reason) {
if (ms <= 0) {
return;
}
#if SLEEP_LOG_ENABLED
INFO_LOG(Log::System, "Sleep %d ms: %s", ms, reason);
#endif
#ifdef _WIN32
Sleep(ms);
#elif defined(HAVE_LIBNX)
svcSleepThread(ms * 1000000);
#elif defined(__EMSCRIPTEN__)
emscripten_sleep(ms);
#else
usleep(ms * 1000);
#endif
}
void sleep_us(int us, const char *reason) {
if (us <= 0) {
return;
}
#if SLEEP_LOG_ENABLED
INFO_LOG(Log::System, "Sleep %d us: %s", us, reason);
#endif
#ifdef _WIN32
Sleep(us / 1000);
#elif defined(HAVE_LIBNX)
svcSleepThread(us * 1000);
#elif defined(__EMSCRIPTEN__)
emscripten_sleep(us / 1000);
#else
usleep(us);
#endif
}
#endif
// Return the current time formatted as Minutes:Seconds:Milliseconds
// in the form 00:00:000.
void GetCurrentTimeFormatted(char formattedTime[13]) {