Formats: reject texture mip counts beyond the full chain #1792
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1792
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1792"
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?
@VlREX on GitHub · 2026-11-24 22:40 UTC · original
VlREX:fix/texture-mip-count→main· +79 −2 · 1 files · 2 commits · openNo description provided.
@dcastell1 on GitHub · 2026-11-24 22:41 UTC · original
Verified on native Windows (no Wine): NVIDIA GeForce RTX 5090 (driver 621.24), Windows 11 10.0.26300, Rust 1.98.1, MSVC 14.44.35207, debug build.
main@ffe310ebaseline on this box: 342 passed, 0 failed, 6 ignored.One more passing test than the baseline; rejecting mip counts beyond the full pyramid is exercised and green.
Tree restored afterwards; no game data. AI-assisted (opencode).
@Marvisak on GitHub · 2026-11-25 06:23 UTC · original · edited 2026-11-25 16:46 UTC
Automated triage for the maintainers.
Needs work: evidence needed.
Texture::newincrates/victory-formats/src/texture.rsreturnsError::Invalidwhenmipsis larger than the full chain. Onmainit lays out the extra 1×1 levels instead. This is shared layout code:victory-hle'sxg.rs(the layout the title asks the console library for) andvictory-gpu'sresource.rsboth call it. So for such a description the XG call would now fail where it used to return a layout.Since the last review, a second commit (
ea9ada0) adds a test for a 7×5 BC7 chain and for oversized counts up tou32::MAX. The test is correct: it gives 3 levels, and the cap uses the texel extent, not the block extent. But a test does not answer the two open points:MipLevelsbeyond the chain is a hint, not the console's library.CI: passing.
Generated by 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.