[android] Rework of frame pacing mode + Surface mode detection per API level. #3735

Merged
Lizzie merged 7 commits from 3555 into master 2026-03-24 01:25:44 +01:00
Member

This Pr is a reply to certain issues found on Android due to the new artificial waits inside Vulkan (Frame Pacing Mode); which caused GPU/CPU desync's even if TimelineSemaphore (Adreno's drivers) does a constant check to retain synchronization with each frame-data, removes the yield() for all platforms (remains the same on PC) and aligns a new way to handle the output of video by using native Android tools, such as AGP, which makes a bridge inside Vulkan to Android's Surface (screen) and reduces not only the latency, but also improves the smoothness of each frame processed; currently we quantize the amount of frame processed by hinting the surface on Android space and adjust the heuristics of the old handling (yuzu) and we link it to screen refresh rate; this way we ensure that even if the game moves below the screen's HZ, we can always pick up the cadence by clamping the duration of each frame and using a chrono function to work as internal fernce if performance goes below the game speed requirment or game's frame rate requirements.

This Pr is a reply to certain issues found on Android due to the new artificial waits inside Vulkan (Frame Pacing Mode); which caused GPU/CPU desync's even if TimelineSemaphore (Adreno's drivers) does a constant check to retain synchronization with each frame-data, removes the yield() for all platforms (remains the same on PC) and aligns a new way to handle the output of video by using native Android tools, such as AGP, which makes a bridge inside Vulkan to Android's Surface (screen) and reduces not only the latency, but also improves the smoothness of each frame processed; currently we quantize the amount of frame processed by hinting the surface on Android space and adjust the heuristics of the old handling (yuzu) and we link it to screen refresh rate; this way we ensure that even if the game moves below the screen's HZ, we can always pick up the cadence by clamping the duration of each frame and using a chrono function to work as internal fernce if performance goes below the game speed requirment or game's frame rate requirements.
CamilleLaVey changed title from 3555 to [android] Rework of frame pacing mode + Surface mode detection per API level. 2026-03-24 00:54:09 +01:00
Owner

@eden-emu/Triage This is ready to be merged.

@eden-emu/Triage This is ready to be merged.
Lizzie approved these changes 2026-03-24 01:20:55 +01:00
Lizzie merged commit 8f770618d2 into master 2026-03-24 01:25:44 +01:00
Lizzie deleted branch 3555 2026-03-24 01:25:45 +01:00
Sign in to join this conversation.
No description provided.