GPU: clear final mesh pipeline-stream padding after typed moves #1739
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!1739
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1739"
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?
@jaschinski97-ops on GitHub · 2026-11-24 21:40 UTC · original
jaschinski97-ops:fix/upstream-final-pipeline-padding→main· +172 −17 · 1 files · 3 commits · openClear 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 main940d32f. 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.
67e8ae1into final stream-padding cleanup 9a795f4a4e@Marvisak on GitHub · 2026-11-25 01:35 UTC · original · edited 2026-11-25 22:17 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-gpu/src/pipeline/host.rs). It will be reviewed again once it is rebased.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
@jaschinski97-ops on GitHub · 2026-11-25 10:57 UTC · original
Rebase status: current head
8433d20includes main940d32f, 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.
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 14:22 UTC · original
I ran a padding-only comparison for the review on head
8433d20, using synthetic shaders on app-local WARP 1.0.22 and D3D12 Agility 1.620.2. The fixture stored the PSOs with zeroed padding, serialized and reopened the library, then changed one group of padding bytes at a time to0xaain the final descriptions while keeping the fields unchanged.LoadPipelineLoadGraphicsPipelineSampleMaskchanged (field-change control)E_INVALIDARGE_INVALIDARGA 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
DXGI_ERROR_SDK_COMPONENT_MISSING, so the original debug-layer configuration in #1683 still needs an independent run.If this test is reused, please retain the Git author when cherry-picking or rebasing. If it is folded into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with Codex. Synthetic shaders only.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.