Repository navigation
Conversation
…RY_BARRIER_AFTER_CAP A group barrier that a lane may have left the program before, at a capped back edge's iteration limit, refuses the whole program, since that lane would leave the rest of the group waiting. Real loops stay far below the limit, and the refusal drops programs such as Series 1.0.2.1's TAA resolve (CS_TAA2_Resolve), the screen probes' inject and spatial filter and the raster classification passes: 15 programs on an M1 Max. VICTORY_BARRIER_AFTER_CAP=1 keeps the barrier instead. Off by default; the shader cache keys on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks Zeyphers. This refusal is the one #408 added and #506 already made opt-in: the loop-cap barrier refusal is now off by default ( |
This was referenced Nov 27, 2026
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.
What changed
VICTORY_BARRIER_AFTER_CAP=1keeps a group barrier that a lane may have left the program before, at a capped back edge's iteration limit (LOOP_LIMIT), instead of refusing the whole program with "an s_barrier where a lane may have left the program early at a loop's iteration limit". It is off by default, and the shader cache key now includes it, likethread_ticket.Why
That refusal drops 15 compute programs in Series 1.0.2.1's world on an M1 Max. Among them are
CS_TAA2_Resolve,CS_ScreenProbes_Inject,CS_ScreenProbes_RadianceSpatialFilter, the raster classification passes andCS_CollectTriangles_Meshlets. Without the TAA resolve, the gameplay frame stays exactly black (0,0,0) even though about 4,900 draws a frame run. Cutscenes show only a flat fog colour.With the switch on, all 15 translate. On the next run the prologue cell drew: the character, the cell, the window and the yard outside. The player is in control ("Move around / Move the camera") at about 1 s per frame, with 35 programs still untranslated instead of 46. No hang, GPU recovery or Metal error was logged.
The risk is the one the refusal guards against. If a lane really reaches the cap (2^14 iterations), its group waits at the barrier. Real loops in these programs stay far below that. That is why this is opt-in for now, rather than changing the cap's exit, which would be the fuller fix: break out of the loop instead of leaving the program.
Testing
VICTORY_AMBIENT=1and 1920x1080 output. Before the change: black gameplay frame. After: the world draws (screenshots on Urgent: screenshots of the black screen and the menu on current main #50, none committed).the_key_covers_translator_encoding_and_settingswas extended for the new key part. It is Windows-only, so it was not run here. The nativevictory-shaderlib tests don't compile on main (48 errors inhalves_tests.rs, unchanged by this PR). The library builds.🤖 Generated with Claude Code