GPU: honor BaseOffset in GetCopyableFootprints #3285
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3287"
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 andrewpozdnakov7-jpg on 2026-11-26T15:59:53Z.
Refs #386.
GetCopyableFootprintsaddsBaseOffsetto each subresource's relative layout. The shim aligned the absolute position instead. A 10×6 RGBA8 texture with two mips at base 1 returned offsets 512 and 2048 on main. Native D3D12 returned 1 and 1537. Microsoft API documentationKeep subresource alignment relative to the base and add the base exactly as supplied. This addresses the base-offset result from #386 and credits the earlier patch in #409.
Verification
63bcca4at base 1 and passes with the patch. It checks bases 0, 1, 255, 512 and 513 against native D3D12 on app-local WARP 1.0.22 / Agility 1.620.2. The total is 2,068 bytes at each base.AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T16:09:38Z.
Review: APPROVED
Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090):
footprint.offset = base + (end - base).next_multiple_of(PLACEMENT)aligns subresources relative tobaseand matches nativeID3D12Device::GetCopyableFootprintsacross both aligned and unalignedbaseoffsets.cargo test -p victory-gpu --lib resource:: -- --test-threads=1(RTX 5090): 19 passed, 0 failed (includingcopyable_footprints_add_the_exact_base_offset).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T17:01:29Z.
I checked this exact
b06f7d7with #2193 ata3c16a3. They merge cleanly. The cross-PR regression8e690a1creates a 10x6 RGBA8 texture with automatic mips and two array slices. It takes the guestGetDescresult and queries three footprints that cross the slice boundary, then compares dimensions, pitch, row counts, row sizes, offsets and total bytes against native D3D12.The same test failed three times on this PR alone at
GetDesc(0 instead of 4 mips). It failed three times on #2193 alone at the first unaligned base. The integration passed three runs at bases 0, 1 and 513, with row counts [1, 6, 3] and 2,580 bytes each time. On verified app-local Agility 1.620.2/WARP 1.0.22, resource tests passed 22/22 and GPU diagnostics 251/0/1, including runtime identity. Strict GPU Clippy passed in both configurations. Policy passed.The maintainers can land both fixes independently. The regression is available once both are present. Please retain its Git author on cherry-pick, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding it into another commit. AI-assisted with Codex.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.