Repository navigation
shader: VICTORY_SHADER_LOOP_LIMIT to find what makes world frames slow - #46
Conversation
Translated loops stop after 2^20 iterations per lane so that a loop over not yet mirrored data (zeros) cannot run four billion times. A pass where every lane reaches that limit still takes seconds, though: 2^20 iterations times a 4K screen's 8 million pixels is about 10^13 loop bodies. The world's frames now take 1.5-3 s, and loops spinning to the limit on data that reads as zeros are one candidate. A diagnostics build now reads VICTORY_SHADER_LOOP_LIMIT (decimal or 0x hex, at least 1). If a low value such as 4096 makes world frames much faster, loops hitting the limit are what makes them slow. If not, they are ruled out. The limit is part of the translation, so the shader cache keys on it, and a run that overrides it logs a warning. Release builds always use 2^20.
|
Tested on NVIDIA: RTX 5070 Ti, driver 621.01, Windows 11. Diag build of Result: with a limit of 4096, loops are ruled out for this card's world hang, and world frames are not faster.
Side note: four of the six hung submissions on this card since AI-assisted (Claude Code); no game files attached. |
|
Tested
AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
Tested with
So on this GPU, loops running to the limit don't explain the hang or the slow frames, at least not with a limit of 4096. I can run DRED ( AI-assisted (Claude Code) |
shader: VICTORY_SHADER_LOOP_LIMIT to find what makes world frames slow
…mmit trim, and lock-free list state (DexNom Marvisak#43/Marvisak#46/Marvisak#48/Marvisak#49, Belobug Marvisak#145)
Translated loops stop after 2^20 iterations per lane so that a loop over not yet mirrored data (zeros) cannot run four billion times. A pass where every lane reaches that limit still takes seconds, though: 2^20 iterations times a 4K screen's 8 million pixels is about 10^13 loop bodies. The world's frames now take 1.5-3 s, and loops spinning to the limit on data that reads as zeros are one candidate.
A diagnostics build now reads VICTORY_SHADER_LOOP_LIMIT (decimal or 0x hex, at least 1). If a low value such as 4096 makes world frames much faster, loops hitting the limit are what makes them slow. If not, they are ruled out. The limit is part of the translation, so the shader cache keys on it, and a run that overrides it logs a warning. Release builds always use 2^20.