GPU: honor BaseOffset in GetCopyableFootprints #3287
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!3287
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 15:59 UTC · original
andrewpozdnakov7-jpg:fix/386-copyable-base-offset→main· +62 −2 · 1 files · 1 commits · openRefs #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.
@Dukestar69 on GitHub · 2026-11-26 16:09 UTC · original · approved these changes
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).
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 17:01 UTC · original
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.