Formats: bound thick mip tails by depth #3314
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!3314
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3314"
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?
@vanya890 on GitHub · 2026-11-26 17:12 UTC · original
vanya890:fix/formats-thick-3d-mip-tail-depth→main· +23 −33 · 1 files · 2 commits · closed without mergingProblem
The thick 3D mip-tail predicate checks width, height, and mip count but omits depth. A narrow 16x16x64 texture can therefore enter the one-block tail at mip 0 even though its mip depth exceeds the tail block depth.
Tracks #1242 (
VIC-BT-014); claimed asNEW-131in #1633.Change
Require
mip_depth(i) <= fixed[2]before admitting a mip into the tail. Add a synthetic 16x16x64 thick 3D regression and controls confirming thin 3D and 2D tail behavior remains unchanged.@AurumCarlos on GitHub · 2026-11-26 17:18 UTC · original · reviewed
I don't think this should land: the current behaviour is the one addrlib computes, and the PR removes the tests that say so.
deep_volumes_keep_their_chain_in_each_slabs_taildocuments addrlib'smipChainInTail(each depth slab keeps its own tail block) and checks addresses taken from addrlib. The fourlayouts_match_addrlibrows removed here ([4,4,16],[1,1,17],[16,16,64],[8,8,128]) are the deep-volume cases, with surface sizes and address hashes from Mesa'sAddr2ComputeSurfaceInfo/AddrFromCoordat ed09d38 (f078008, #1549). Those rows would fail withmip_depth(i) <= fixed[2], which is why they had to go.VIC-BT-014in #1242 looks like a false positive from the static audit (it predates #1549). Unless you have an addrlib or hardware result showing a deep volume not entering the tail at mip 0, the fix is to close the audit item, not change the layout.layouts_match_addrlibrow next to the existing ones rather than deleting them.@andrewpozdnakov7-jpg on GitHub · 2026-11-26 17:22 UTC · original
I checked the four reference cases removed from
layouts_match_addrlib. Running the identical oracle on63bcca43and the exact33aee8dhead checks the first tail mip, total bytes, and a hash of every valid element address.The element-address hashes match the existing Addrlib fixtures on main and differ for all four on this head. The normal formats suite reports 46 passed and 5 ignored on both trees because the four checks were removed from the PR. AMD's GFX10 tail predicate uses width, height and remaining mip count. Its caller divides the tail block contribution by
blockSlicesand computes surface size across the padded depth. AMD predicate · AMD layout calculationI'd retain the existing depth-slab behavior and all four oracle rows unless a console-layout result shows a different contract. These are synthetic format tests against the repository's recorded oracle. AI-assisted with Codex.
@vanya890 on GitHub · 2026-11-26 17:28 UTC · original
Closing after validating the Addrlib review. The proposed mip_depth(i) <= fixed[2] condition contradicts AMD Addrlib thick 3D depth-slab behavior and the repository's existing oracle coverage, including the exact 16x16x64 case. It changes the recorded first tail mip, surface size, and element addresses for all four removed oracle cases. NEW-131 has already been released as a false positive in #1633 (see #1633). Thanks for catching this.
@Dukestar69 on GitHub · 2026-11-26 17:29 UTC · original · reviewed
Reviewed the diff and ran local verification on Windows 11 x64 (
cargo test -p victory-formats --lib texture:: -- --test-threads=1: 16/16 passed;cargo clippy: clean;cargo xtask policy: 191 files ok).I cannot approve this change because it contradicts AMD's GFX10
addrlibreference behavior and removes 5 existingaddrlib-verified tests to make the change pass:deep_volumes_keep_their_chain_in_each_slabs_tail(which asserts exact byte offsets generated by Mesasrc/amd/addrlibforSW_64KB_S16×16×64Tex3dwithfirst_tail_mip == 0and 4 slabs of 64 KiB) as well as 4Tex3dtest vectors inlayouts_match_addrlib(SW_4KB_S[4,4,16]&[1,1,17],SW_64KB_S[16,16,64]&[8,8,128]).addrlib,mipChainInTailplaces the mip chain in each depth slab's tail block based on width/height fitting the block (w <= fixed[0] && h <= fixed[1]), even when volume depth exceedsfixed[2]. Requiringmip_depth(i) <= fixed[2]diverges fromaddrliband breaks compatibility with console 3D thick textures.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Jackster on GitHub · 2026-11-26 19:21 UTC · original
The closure is right: the predicate cannot land without deleting the four addrlib rows and
deep_volumes_keep_their_chain_in_each_slabs_tail. If you want to keep the useful part, the two controls inthick_mip_tail_respects_depth_without_changing_thin_or_2dare correct onmain, and the thin-3D tail case is not covered bylayouts_match_addrlibtoday.As a standalone test-only change on
63bcca4, all texture tests pass (cargo test -p victory-formats --lib texture::— 17 passed, 0 failed):It pins why the depth term is wrong for thin volumes (depth is slices there), which is the complement of what the thick-volume fixtures already assert.
Synthetic formats only, no game files. AI-assisted.
Pull request closed