GPU: add unit tests for pipeline/host.rs offsets, defaults, formats, and subobject parsing #1207
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!1207
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1207/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?
@geiyiliyabumo on GitHub · 2026-11-24 16:25 UTC · original
geiyiliyabumo:test/gpu-pipeline-host→main· +375 −0 · 1 files · 1 commits · closed without mergingSummary
Closes #1079
Full verification details and change notes are documented in #1079 (commit
649c6e5, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 649c6e5:
cargo test -p victory-gpupasses, 64 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 01:18 UTC · original · edited 2026-11-25 07:22 UTC
Automated triage for the maintainers.
Merge candidate. Update after your trim: the production code of
crates/victory-gpu/src/pipeline/host.rsnow matchesmain. The alignment change, the new refusals and the formatting hunks are gone, and the diff is one hunk inmod tests. I checked the expected values by hand againstGraphicsState::readandelements.appended_inputs_respect_format_alignment_per_slotgives the right per-slot offsets forD3D12_APPEND_ALIGNED_ELEMENT(min(4, size) alignment, slots 0 and 31 kept apart).omitted_subobjects_use_d3d12_defaultsmatches the documented D3D12 defaults for blend, rasterizer and depth-stencil state. TheDEPTH_STENCIL1test confirms that the depth-bounds field is dropped, as the code's comment says. The subobject helper puts the payload at +4, or at +8 for the pointer-holding input layout, asreadexpects. The unaligned sample-mask case exercises theread_unalignedpath. Merges cleanly.CI: passing (
check).Generated by Claude Code
@geiyiliyabumo on GitHub · 2026-11-25 02:20 UTC · original
Rebased cleanly onto \main\ (\
ccfb029). \cargo test -p victory-gpu --locked pipeline::host::tests, \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.@geiyiliyabumo on GitHub · 2026-11-25 04:03 UTC · original
Rebased onto latest \main\ (\
940d32f, head \6a76d2), preserving upstream view-write \marks\ tracking alongside the input-layout validation, aligned vertex offset handling, and tests. Verified \cargo xtask policy, \cargo clippy -p victory-gpu --tests -- -D warnings, and \pipeline::host::tests\ (16/16 passed).@geiyiliyabumo on GitHub · 2026-11-25 06:56 UTC · original
Trimmed this PR per triage feedback (head $sha): restored all production code in \crates/victory-gpu/src/pipeline/host.rs\ byte-for-byte to \main\ (\
940d32f, dropping the redundant alignment change, refusal checks, and formatting hunks). Only a single hunk inside \mod tests\ remains, adding 8 tests pinning current behavior for offsets/alignment, D3D12 defaults, format conversion, subobject parsing, and bytecode/semantic-name ownership. Verified \cargo xtask policy, \cargo clippy -p victory-gpu --tests -- -D warnings, and \pipeline::host::tests\ (10/10 passed).@Marvisak on GitHub · 2026-11-25 21:59 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because two of the eight tests fail on current
mainand the rest add little.translates_render_target_and_depth_formatsandinput_layout_owns_semantic_names_and_describes_their_valuesexpect console formats 118/119/120 to map to the D24S8 family, butresource::pc_formatnow maps them to the D32_FLOAT_S8X24 family on purpose, so merging this would turn the workspace tests red. Most of the others assert that a value read back equals what was written, and the one piece of real logic (append-aligned offsets) already hasappended_elements_are_aligned.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed