GPU: report default buffer alignment from GetDesc #2690
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!2690
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2690"
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-25 18:17 UTC · original
andrewpozdnakov7-jpg:codex2/buffer-get-desc-alignment→main· +66 −1 · 1 files · 1 commits · openProblem
GetDesc returns the creation description's alignment of zero for a buffer created with the default alignment. Native D3D12 reports the effective 64 KiB alignment for the same buffer. Zero is the creation shorthand for 64 KiB. D3D12 buffer description
Change
Resolve the default alignment in the buffer description returned by GetDesc.
Verification
13f91careports alignment 0, while native D3D12 WARP reports 65536. Both report 65536 after the change.Coordination claim
AI-assisted (Codex 2). Please retain the Git author on cherry-pick or rebase. If folding this change into another commit, please retain Co-authored-by: andrewpozdnakov7-jpg [email protected].
@kotekompotek on GitHub · 2026-11-25 18:53 UTC · original
Matches native semantics: GetDesc resolves the creation shorthand (0 = default 64 KiB for buffers) to the effective alignment. Verified the test compares against a real committed WARP buffer for both inputs, not just the constant.
@fuzeofficlal on GitHub · 2026-11-25 18:59 UTC · original
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and review of
78bf751c(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory-gpu --all-targets -- -D warningsand--features diagnostics: 0 warnings.cargo test --locked -p victory-gpu --features diagnostics --lib resource: 20 passed, 0 failed (buffer_get_desc_reports_the_effective_alignment:input 65536 -> native 65536, guest 65536;input 0 -> native 65536, guest 65536).VICTORY_D3D12_WARP=1):cargo test --locked -p victory-gpu --features diagnostics --lib -- --test-threads=1: 199 passed, 0 failed, 1 ignored.Review Notes
0 -> KIB_64default strictly todesc.dimension == BUFFERmatches D3D12GetDesc()andresource::footprintwithout altering texture alignments (4 KiB/64 KiB/4 MiBMSAA). Clean and ready to merge.@oni-swr on GitHub · 2026-11-25 19:41 UTC · original
Independent WARP/CPU verification
Head:
78bf751c5baa2f2f7f9b8d0386512c31d34de971Base:
origin/main13f91caee25f2fdf2c062be5f7a27f058e51cbcaStatus: open, non-draft; clean merge tree; no
oni-swrcomment on this head.Environment: Windows x64, WARP selected (
VICTORY_WARP=1,VICTORY_D3D12_WARP=1),dxil.dll1.8.2502.11 from Windows SDK 10.0.26100.0; rustc 1.98.1.Commands (each with
CARGO_TARGET_DIR=D:\victory-warp-2690-targetand the WARP variables above):cargo test --locked -p victory-gpucargo test --locked -p victory-gpu --features diagnosticscargo test --locked -p victory-gpu buffer_get_desc_reports_the_effective_alignmentcargo clippy --locked -p victory-gpu --all-targets -- -D warningsResults: default baseline 195 passed, 1 ignored; PR 196 passed, 1 ignored. Diagnostics baseline 197 passed, 1 failed, 1 ignored; PR 199 passed, 1 ignored. The baseline-only failure was
memory::tests::a_submission_that_missed_leaves_the_copies_at_once; it passed in the PR run. Targeted alignment test 1/1 passed. Clippy passed.Negative control: restored the old
resource_descbehavior; the alignment regression failed (exit 101), as expected. No implementation bug found.Not tested: physical GPU, retail title, release build. AI-assisted: Codex (gpt-6-luna).
@Marvisak on GitHub · 2026-11-25 22:19 UTC · original
Automated triage for the maintainers.
Merge candidate (recommend a look).
resource_descincrates/victory-gpu/src/resource.rsnow reports 64 KiB instead of 0 for a buffer created with the default alignment. Nothing else changes: textures and explicit alignments are reported as before. The evidence is public D3D12 documentation plus a test that compares the guest's answer with a real committed buffer on the host device (it skips the comparison when there is no device), so the test checks native behaviour rather than repeating the code. The storeddescis not modified, so creation-side code that readsalignment == 0is unaffected. One limit: the reference is PC D3D12; no title-side measurement shows the title reads this field.CI:
checkpassing on this head.Generated by Claude Code
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.