DuckStation Preview Adds Multi-threaded Shader Compilation for Android

DuckStation Preview builds now compile shaders and graphics pipelines across multiple CPU threads, targeting stuttering during uncached content loads on Android.

DuckStation DuckStation
DuckStation DuckStation

DuckStation Preview builds now compile shaders and graphics pipelines across multiple CPU threads. This update targets the stuttering players experience when loading uncached content on Android devices. The emulator shifts from a single-threaded model to a multi-threaded worker system that distributes tasks based on available CPU resources. We see this change matter because it removes the freeze frames that interrupt gameplay during initial loads.

Multi-threaded shader compilation reduces loading stalls on Android

The PlayStation emulator applies this multi-threaded approach to both shader compilation and graphics pipeline creation. DuckStation now sends shader cache misses to its asynchronous task system instead of compiling everything sequentially. The main thread assists with queued tasks when worker threads are busy. This architecture ensures that graphics processing does not block the main emulation loop.

Support for this multi-threading is enabled for Direct3D 11, Direct3D 12, Vulkan, and Metal backends. OpenGL is currently excluded because DuckStation does not mark shader compilation through this backend as thread-safe. The emulator also updated its shader cache format to use UID-based keys derived from graphics settings. This change ensures that cache entries match the specific configuration used to generate them.

These changes are not directly aimed at increasing emulation frame rates. Instead, they should reduce the time spent compiling shaders and pipelines when DuckStation encounters something that is not already cached. Users may see shaders rebuilt once due to the cache format changes. There are no public before-and-after benchmarks yet, so there is no measured improvement to report.

We looked at earlier DuckStation releases while tracking Android emulation progress. The developer confirmed that the new system adjusts worker threads based on available CPU resources. This technical update stabilizes the loading process for users who frequently switch graphics settings. The emulator continues to prioritize smooth loading over raw frame rate gains.

Discussion

0 comments

Log in to join the thread with a thoughtful take, question, or correction.

Add to the discussion