Shaders found as is end where their header says, not at the end of the file (their hashes matched no run) #263
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!263
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-263"
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?
@sharan104 on GitHub · 2026-11-26 13:35 UTC · original
sharan104:fix/raw-container-size→main· +45 −5 · 1 files · 1 commits · openapps/victory/src/shader.rssources()finds uncompressed containers by theirDXBCmagic. But it handed each one on as everything from its offset to the end of the file.Container::parsetolerates the trailing bytes, so nothing failed. Every caller that hashes or stores the bytes, though, took the whole tail:#hashthatshader-infoandtranslateprintVICTORY_TRANSLATE_ONLYtranslate --warm's matching against a run's logvictory shadersreplay --retranslate.cdxildumpsA run hashes only the container the title passes (
victory-gpupipeline.rs,shader()). So for raw containers no hash matched, andvictory shaderscached them under keys no run looks up. Each one also hashed the rest of the file, which is quadratic over a file with many containers.Fix: a raw container is cut to the total size in its header (offset
0x18), the same way SGD5 records already are. Containers whose header size runs past the file are dropped.Test:
shader::tests::raw_containers_end_where_their_header_saysuses synthetic containers with bytes before, between and after them. It checks each source is exactly its container, and that the same container hashes the same wherever it sits. It fails before the change and passes after it (10 runs out of 10).Results:
cargo test -p victory --lockedpasses.cargo clippy -p victory --all-targets --locked --no-deps -- -D warningsis clean, with and without--all-features.🤖 Generated with Claude Code
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.