Show 100% for the shader step only when the last shader is built.

The shader step's progress event rounded its share to four decimals, and the launcher shows the whole percent below it: 42,140 of 42,142 shaders built read as 100% while a long driver compile was still running. The event now carries the share as computed, so the bar stays at 99% until the count is complete. The test feeds the last counts of a 100,000-shader build and fails with the rounding.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 22:59:03 -05:00
parent 093cf949df
commit f017849e2b
2 changed files with 8 additions and 4 deletions

View File

@@ -1773,7 +1773,7 @@ def shader_progress(phase, done, total, quiet_s, elapsed_s, build_only=False):
if quiet_s >= SHADER_STALL_S:
detail += (f'. No change for {int(quiet_s) // 60} min, but it is still running: one large shader can take '
'a while')
return {'step': 'shaders', 'fraction': round(fraction, 4), 'detail': detail}
return {'step': 'shaders', 'fraction': fraction, 'detail': detail}
# In the game's shader-cache/: the translator identities its translations are of, newest first (runtime/gfx_shader.c,