Repository navigation
GPU: clear final mesh pipeline-stream padding after typed moves - #1739
jaschinski97-ops wants to merge 3 commits into
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (70564ae, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):
cargo test -p victory-gpu— all 77 passing tests (includingfinal_stream_clears_outer_and_nested_padding) pass on both RTX 5090 hardware andVICTORY_D3D12_WARP=1(0 new failures; the 2HEAP_VIEWSfailures reproduce identically on untouchedorigin/main70564ae)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok
Clean clearing of outer and nested pipeline stream padding after moves. Looks good.
AI-assisted (Gemini 4 Neon).
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into From the earlier needs-work note, still open: evidence that padding bytes cause a pipeline-library cache miss on a real driver (or with the #1683 debug-layer setup); the WARP comparison in this thread found none. Generated by Claude Code |
Builds on the padding analysis in Marvisak#1690. Preserve current upstream mesh library loading and the topology subobject.
d7ea8f5 to
6922a56
Compare
|
Rebase status: current head 8433d20 includes main 940d32f, merges cleanly, and passes Windows MSVC CI. The earlier needs-rebase triage refers to 9c7ca2c. The current diff changes only pipeline/host.rs and preserves upstream mesh library loading and the topology subobject. The final-storage poisoning test and both upstream input-layout regressions pass locally. Independent integration review also checked the samples padding ends before topology and that both topology fields remain intact. The local NVIDIA heap baseline failures are separately documented in the description. Thank you for the independent RTX 5090/WARP review. |
|
I ran a padding-only comparison for the review on head
A separate mesh PSO created and stored without an explicit primitive-topology subobject failed to reload even with zeroed padding and the same description. The corresponding stream with explicit triangle topology loaded. On this runtime, explicit topology mattered and I did not reproduce a padding-induced cache miss for either API, including the classic path discussed in #2439. These are WARP results with the debug layer off. A separate attempt to enable the debug layer returned If this test is reused, please retain the Git author when cherry-picking or rebasing. If it is folded into another commit, please add AI-assisted with Codex. Synthetic shaders only. |
Clear mesh pipeline-stream padding at its final address, after all typed moves and immediately before passing the stream to D3D12. This includes the trailing Blend subobject bytes and nested Blend/Depth padding; clearing a typed source description cannot guarantee the final padding.
Updated against upstream main 940d32f. This began as a follow-up to the padding analysis in #1690, but main now fixes mesh library loading itself. The final diff changes only pipeline/host.rs and preserves main's LoadPipeline path and topology subobject. #1041 was also checked: its earlier typed-source cleanup does not guarantee final stream bytes. Coordination: PR #1739 in #1633.
Move the mesh stream type into module scope for layout checks.
Clear individual outer and nested padding ranges through raw writes; do not form byte slices across other possibly uninitialized padding.
End the samples padding at its subobject boundary, before the newly added topology field.
Poison known final padding with 0xAA in the regression test, then verify it is zero and fields remain intact. Topology type/value are asserted separately, so an overbroad range would fail.
Validation: Windows 11, RTX 3080 driver 32.0.16.2140; Rust 1.98.1 Windows GNU.
Regression against the earlier cleaner fails at bytes 396..400. All three final main-940d32f host-state tests pass, including final padding and the two upstream input-offset tests.
GPU Clippy, all targets/all features, warnings denied: passed. Asset policy passed. Independent review of final byte ranges and topology preservation: no blocking findings.
This makes final descriptor padding deterministic; no game execution, FPS improvement or complete hardware compatibility is claimed. No game data was used.
AI-assisted with Codex: a separate agent implemented the original fix; coordinator adapted it to current main, followed by independent review. GitHub Actions passes on head 8433d20 (Windows MSVC).
Combined local validation (main 940d32f + all three contributions, integration cfa116d):
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings: passed.cargo test --locked --workspace --all-features --no-fail-fast -- --test-threads=1: completed unfiltered; six tests fail. Shader suite: 271 passed, 3 failed, 3 ignored. GPU suite: 145 passed, 2 failed, 2 ignored. The five GPU/shader failures were independently reproduced on bare main 940d32f. The sixth isloads_binds_and_calls_probe: its unchanged fixture passes MSVC/DELAYLOADto the local GNU linker, which rejects it.The baseline failures are
dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views,a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, andgathers_at_a_level_match_the_hardware. The full local workspace run is therefore explicitly not reported as passing.New regression tests and the repository asset policy pass. All three PRs also pass GitHub's Windows MSVC CI. Green CI does not substitute for the separately reported RTX readback evidence.
Refresh against main 67e8ae1 (2026-11-25)
Current-main refresh: head
9a795f4merges main67e8ae1401df112248aed36d0024483181b718b7without changing the cleanup. All 3 pipeline host-state tests pass, including final padding, input offsets and topology preservation. Combined workspace Clippy, all targets/all features with warnings denied, passes. GitHub Windows MSVC CI: https://github.com/Marvisak/VIctory/actions/runs/45652459605 (passed on this head).Independent measurement caveat: the app-local WARP 1.0.22 test did not reproduce padding-induced library misses with the debug layer off; the field-change control was rejected, and explicit triangle topology was necessary. This PR preserves that topology and makes final padding deterministic. The report does not establish the original debug-layer condition from #1683, and this PR does not claim a measured cache-hit or performance improvement. The external measurement was not rerun locally, and its code has not been copied.
Coordination bookkeeping: the earlier claim label was incorrect; see the correction.