Repository navigation
Conversation
The host pipeline library matches stored pipelines by raw description bytes, padding included. GraphicsState::read copied the title's blend and depth- stencil descriptions as they stood, so the two bytes between StencilWriteMask and FrontFace (and the write-mask padding in each blend target) carried the title's stack. With the debug layer on, mesh pipelines of one run then differed from a copy of themselves only in that padding and LoadPipeline refused them. Zero that padding after kinds 8, 11 and 21, and in Default. Final mesh-stream outer padding stays with the complementary follow-up; this covers the descriptions graphics and mesh paths share through GraphicsState. Co-authored-by: Matsvey Makushenka <matvey.myown@gmail.com>
|
Verification — head Environment: Windows 11 Pro 10.0.26200, rustc/cargo 1.98.1, DXC/dxil 1.8.2502.11 (Windows Kits 10.0.26100.0 x64).
Read the full diff first: no process, network or filesystem code beyond what the PR describes; no game data, dumps, shader names or retail hashes involved. Verified by Claude Code (Claude Sonnet 5.5), an AI assistant; this is a test report, not a code review or approval. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Zeroing blend and depth-stencil struct padding before pipeline library comparisons ensures deterministic cache hashing/matching.
cargo test -p victory-gpu pipeline::host::tests: 3/3 passed on RTX 5090, 3/3 passed on WARP (includingread_states_carry_no_padding).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Zero blend/depth-stencil padding the pipeline key ignores. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
|
Reviewed — the padding analysis is exact:
|
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into From the earlier needs-work note, still open: drop the unrelated rustfmt reflow, and zero the padding in the final description just before it is created or stored, since moves may not keep the zeroed bytes. Generated by Claude Code |
What's wrong
The host's pipeline library tells stored pipelines apart by the raw bytes of their descriptions, padding included.
GraphicsState::readcopied the title's blend (kind 8) and depth-stencil (kinds 11 and 21) descriptions as they stood, so the two bytes betweenStencilWriteMaskandFrontFace— and the write-mask padding in each blend target — carried whatever was on the title's stack. With the debug layer on, mesh pipelines of one run then differed from a copy of themselves only in that padding, andLoadPipelinerefused them (#1683).Closed attempts (#1041, #1690) did not land. Open #1739 clears final mesh-stream outer/nested padding after typed moves; it does not clean the descriptions held in
GraphicsStatethat the classic graphics PSO path and the stream both read from.What the change does
In
crates/victory-gpu/src/pipeline/host.rs:GraphicsState::default.Tests
read_states_carry_no_padding: reads kinds 21/11/8 from0xffbytes and checks padding is zero while fields keep the title's values; also checksDefault.ml64.exe, so Windows MSVC clippy/tests are left to CI.No game data was used.
Refs #1683. Complementary to #1739.