CLI/shader+translate: slice raw DXBC sources to container total_size and stop warm-up walk early #748
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!748
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-748"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@AscilCH on GitHub · 2026-11-25 06:09 UTC · original
AscilCH:fix/cli-shader-raw-slice-and-warm-early-stop→main· +72 −10 · 2 files · 1 commits · openSummary
Fixes two bugs in the CLI shader scanner and offline shader cache warm-up tool:
apps/victory/src/shader.rs):sources()previously constructedSource::Raw { offset, data: &data[offset..] }without slicing to the DXBC container's validatedtotal_sizefield at offset0x18..0x1c.translate --warm <file>failed to match hashes logged at runtime for uncompressed containers;translate --warm allcached raw containers underblake3(build || container || rest_of_file)(guaranteed cache miss at runtime) and performed O(N × file size) hashing;VICTORY_TRANSLATE_ONLY,VICTORY_DUMP_MATCH, andVICTORY_FAIL_DUMPhashed/dumped trailing binary bytes.sources()now slices each raw container to&tail[..total].translate::warm(apps/victory/src/translate.rs):VICTORY_WARM_SECONDSexpired, only the inner per-file worker loop broke while the outerWalkDirloop continued reading every remaining file into memory and spawning threads.warm()now breaks out of the outer walk immediately on timeout or once all hashes requested by--warm <file>have been processed (and checks timeout before unpacking each record).Verification
cargo test -p victory --locked—2 passed, 0 failed(including newshader::tests::raw_sources_slice_to_container_total_size)cargo clippy -p victory --all-targets --all-features --locked --no-deps -- -D warnings— 0 warningscargo xtask policy—asset policy: 171 files ok(AI-assisted; synthetic unit tests only, no game data.)
@yualk on GitHub · 2026-11-25 06:52 UTC · original
Independent Windows x64 locked
diagcheck onfecaa1e9681cf8da8a19eb105fc25df73038a6d4: the focused source test passes. With two authored DXBCs concatenated in one file, targeting the first key publishes an actual runtime cache hit; the unrequested second key and changed wave setting stay cold.--warm allthen hits both in separate actual runtime lookups, each matching a fresh translation's bytes and metadata. This covers the failure reported in #736; no duplicate fix needed.Separate early-stop control: two explicit CLI input paths, a standalone authored DXBC already matching on both builds followed by 64 MiB of authored non-DXBC padding. Fresh cache per arm, one selected key and one worker. ABBA
GetProcessIoCounters.ReadTransferCountwas 67,111,542 / 2,678 / 2,678 / 67,111,542 bytes (8dd30ab/ PR / PR /8dd30ab). Putting padding first on the PR restored exactly 67,111,542 bytes. Every arm publishes the same valid runtime hit. That is process read volume on an owned fixture, not disk IOPS, a hard timeout guarantee, PSO warming, or gameplay performance. No title material used or attached. AI-assisted.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.