Repository navigation
Take the shader dispatch loops out on Samsung Xclipse (#224) - #227
Merged
Merged
Conversation
On a Galaxy A55 (Xclipse 530, driver 24.0.539/545) the game stayed at "PREPARING PIPELINES 0 OF 455": the driver's compiler spent 209 s and over 550 MB on the first pipeline's vertex shader, which has XenosRecomp's while/switch(pc) dispatch loop, then asserted in SCGenerateLongBranch; the player's phone killed the game for low memory first. Firebase Test Lab's a55xzh reproduces it. With spirv_dispatch_loop.h's rewrite (on for Apple since #192) all 455 pipelines prepare in 14-18 s and the self test draws with each; no descriptor indexing, no device address and no clip distance all still hang at recipe 0. So the rewrite is now on for vendor 0x144d too; SFR_TEST_DISPATCH_LOOP=0 still keeps the loops. Pipeline preparation now names a recipe that takes over 5 s (index, step, shader hashes, resident memory, again at 10, 20, 40 s...), logs the count every 10 s and the slowest recipe at the end, also to logcat on Android. SFR_PIPELINE_PREWARM_TRACE=1 logs every recipe and SFR_PIPELINE_PREWARM_TIMEOUT=<s> ends the process on a stuck one; the self test's scenarios 9-14 use them to try each shader rewrite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YuutaTsubasa
force-pushed
the
claude/issue-224-xclipse
branch
from
October 20, 2026 19:59
a0e7d18 to
20f340d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #224: Galaxy A55 (SM-A556E, Exynos 1480, Xclipse 530, driver 24.0.539) stays at "PREPARING PIPELINES 0 OF 455" and Android eventually kills the game for low memory (exit reason 3).
Cause
Firebase Test Lab's
a55xzh(Galaxy A55, Android 16, Xclipse 530, driver 24.0.545) reproduces it with the 0.10.14 APK's graphics self test. The driver's shader compiler (logcat tagGSC) spends 209 s on the first recipe's vertex shader (eaf61b182ad92401, which has XenosRecomp'swhile(true) switch(pc)dispatch loop). Resident memory grows past 550 MB, then the compiler asserts inSCAssembler.cpp SCGenerateLongBranchandCompiler.cpp Compile. On the player's phone the low-memory killer ends the game before that.Bisection on the A55 (self-test scenarios 9-13, 60 s limit per recipe):
SFR_TEST_DISPATCH_LOOP=1SFR_TEST_NO_DESCRIPTOR_INDEXING=1SFR_TEST_NO_DEVICE_ADDRESS=1SFR_TEST_NO_CLIP_DISTANCE=1Fix
spirv_dispatch_loop.h, already on for Apple since Take XenosRecomp's dispatch loops out of the shaders on Apple (M1 race 6.5 to 60 fps) #192) is now also on for Vulkan vendor0x144d(Samsung Xclipse).SFR_TEST_DISPATCH_LOOP=0still keeps the loops (launcher Test options: "Rewrite shader dispatch loops: Off"). Other GPUs are unchanged.PIPELINE_PREWARM slow recipe=<n> of=<total> step=shaders|pipeline vs= ps= seconds= resident_mb=, and logged again at 10, 20, 40 s and so on.progress=line is written every 10 s.complete=line now names the slowest recipe.SFR_PIPELINE_PREWARM_TRACE=1logs every recipe.SFR_PIPELINE_PREWARM_TIMEOUT=<s>ends the process when one recipe takes longer than that; it is for the self test.GraphicsTestActivity) only prepare the pipelines, with tracing and the timeout on. Each scenario tries one shader rewrite.Verification
Firebase Test Lab, APK from this branch, scenarios 9 (as the device says), 3 (draw with every pipeline) and 14 (loops forced back on):
a55xzh, Xclipse 530)SC-51E, Adreno 750)stallion, Mali-G715)Local checks:
native_shader_abiandnative_resolutionare not built by build_tools, and CI excludes them too.Not tested
🤖 Generated with Claude Code