Formats: keep deep 3D mips out of the thick mip tail (VIC-BT-014) #1498
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1499"
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?
Imported from Marvisak/VIctory. Originally posted by tdogghockey on 2026-11-24T18:32:46Z.
What
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.
Imported from Marvisak/VIctory. Originally posted by tdogghockey on 2026-11-24T18:40:37Z.
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.
upstream-sync referenced this pull request2026-11-25 04:06:55 +00:00
Pull request closed