formats: bound thick 3D mip tail by depth #1494
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!1494
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1494/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?
@nino-exe on GitHub · 2026-11-24 18:26 UTC · original
nino-exe:fix/thick-3d-mip-tail-depth-bound→main· +24 −1 · 1 files · 1 commits · closed without mergingFixes VIC-BT-014 (P1) from #1242: the thick 3D mip-tail predicate checked width/height/remaining-mips but omitted mip_depth(i) <= fixed[2], so a base mip whose width/height fit the tail bounds was wrongly folded into the tail even when its depth exceeded fixed[2].
Adds the missing depth check to crates/victory-formats/src/texture.rs:408 and a unit test (thick_3d_mip_tail_respects_depth_bound) that fails on main.
Verified:
No game data used; synthetic numbers only.
@ArnabSaga on GitHub · 2026-11-24 19:11 UTC · original
I independently verified the existing implementation against AMD addrlib v10.9 and documented the results on #1450.
PR #1549 also independently confirms the reference-layout mismatch introduced by the proposed depth predicate, with substantially broader differential testing.
I recommend reviewing both investigations before merging this change.
@tdogghockey on GitHub · 2026-11-24 19:34 UTC · original
Quick correction from me: when I reviewed this earlier, I only checked the code and local tests, and I called the depth-bound change correct. The addrlib v10.9 cross-check linked from #1450/#1549 contradicts that conclusion, so I no longer think the predicate change should be merged as-is.
My local verification still stands: the patch applies cleanly and its synthetic test passes here. But that test only proves the new predicate matches the new expectation; it doesn't prove the expectation matches addrlib. Sorry for the misleading earlier note.
@Marvisak on GitHub · 2026-11-25 00:41 UTC · original
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.
Adds a depth test to the thick-3D mip-tail condition. The GFX10 address library the module follows tests only width, height and mips left (the depth test belongs to the older GFX9 code), and main's 3D layouts match the console library; this would move mip 0 of deep narrow volumes out of the tail and change their sizes.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed