Formats: keep deep 3D mips out of the thick mip tail (VIC-BT-014) #1499
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!1499
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1499/head"
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?
@tdogghockey on GitHub · 2026-11-24 18:32 UTC · original
tdogghockey:fix/thick-3d-mip-tail-depth→main· +27 −1 · 1 files · 2 commits · closed without mergingWhat
Fixes backlog item VIC-BT-014: thick 3D layouts' mip-tail predicate checked width and height, but not depth. A deep 3D mip (e.g. 16x16x64,
Sw64KbS) could therefore wrongly enter the one-block mip tail: its first mip hadtail: Some(...)andfirst_tail_mip == 0.The condition now also requires
mip_depth(i) <= fixed[2]for thick layouts, matching the block's depth limit. This is a one-line behavioral change; no game data, assets or generated data are added.TDD evidence
cargo test -p victory-formats --locked deep_3d_mips_do_not_enter_the_mip_tailfailed before the fix withmip 0 has 64 slices and cannot fit one tail block: Mip { ... tail: Some(Tail { offset: 8192, x: 16, y: 0 }) }.cargo test -p victory-formats --locked-> 24 passed, 0 failed, 4 ignored (4 pre-existing ignored benchmark/reference tests).cargo clippy -p victory-formats --all-targets --locked -- -D warningsclean.cargo xtask policy-> 154 files ok.git diff --checkclean.Duplicate check
Checked all open upstream PR titles and changed-file lists (820 open PRs at time of writing). No open PR contains this fix; among the newest PRs touching
victory-formats/src/texture.rs, only #1330 appears, and its diff has no mip-tail changes. This fix is also independent of the XMA/SGD5 and Linux-build patches posted on forks.Limitations
This machine is aarch64 Linux, and the full workspace does not compile here because of the pre-existing non-Windows
host_resourcecfg issue also covered by #1241;victory-pe'scurrent_exe()tests have the same known host assumption. I verified this crate locally; upstream CI onwindows-latestwill check the workspace. Windows MSVC cross-check was attempted but cannot run here becauseml64.exeis unavailable.AI use: Claude Code wrote the fix and tests and ran the checks at my request.
RED: cargo test -p victory-formats --locked deep_3d_mips_do_not_enter_the_mip_tail failed: mip 0 (16x16x64, Sw64KbS) wrongly has tail: Some(Tail { offset: 8192, ... }) and first_tail_mip == 0. Test exercises Layout::new's mip-tail predicate with a deep 3D mip whose depth exceeds the block's depth.@tdogghockey on GitHub · 2026-11-24 18:40 UTC · original
Closing in favour of the earlier PRs #1450 and #1494, which fix the same VIC-BT-014 defect with overlapping tests. My duplicate-check scan was run before those PRs appeared; thanks to the maintainers/reporters.
Pull request closed