leonida-gpu: read the pipeline stream of the title unaligned (D3D12-GPU-PIPELINE-BYTECODE-ALIGNMENT) #2632
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2632
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2632"
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?
@imShangLi on GitHub · 2026-11-29 20:04 UTC · original
imShangLi:fix/d3d12-gpu-pipeline-bytecode-alignment→main· +77 −5 · 1 files · 4 commits · merged 2026-11-30 15:59 UTCClaimed in the coordination issue as:
D3D12-GPU-PIPELINE-BYTECODE-ALIGNMENTDepends on: #2569 (same file and test module; the current diff applies cleanly, but the branches may overlap if #2569 lands first)
Fixes: none
What and why
create_streamreads the title-ownedStreamDescand each shaderBytecodethrough aligned Rust references. The title chooses these buffer addresses and need not align them. Read both withread_unaligned()and add an odd-address stream regression test.Tested
Prior measured branch result on Windows 11 / Rust 1.98.1, base
cc0f662a70b6e6e561692f56342b5a7df3831bd7:a_stream_at_an_odd_address_yields_its_shadersaborts on pristinemainatpipeline.rs:1185with a misaligned pointer dereference and passes with the change.cargo test --package leonida-gpu --lib --locked --offline: pristine536 passed; 1 failed; 47 ignored; patched537 passed; 1 failed; 47 ignored.descriptor::host::tests::views_are_made_beside_the_heap_and_copied_infailure is also red on pristinemainon the AMD Radeon 780M host.pipeline.rs.mainmerged and still changes onlyd3d12/crates/leonida-gpu/src/pipeline.rs(+77/-5).GPUs tested: AMD Radeon 780M for the prior host test run; no game files or GPU workload used by the new regression.
AI-assisted: yes
Checklist
mainand merges cleanlyIndependent verification
main; zero conflicts.cargo test -p leonida-gpu --lib -- --test-threads=4: 550 passed; 0 failed; 47 ignored.python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/pipeline.rs: PASS.test_interp_computed_ij_fallback.@bobcatchris on GitHub · 2026-11-29 20:08 UTC · original
Independent verification on native Windows 11 Pro (
10.0.26200) + AMD Radeon RX 7900 XTX (gfx1100, driver32.0.32029.2010, Rust1.98):main(720bd3b4e..eddf401a2) — zero conflicts.cargo test -p leonida-gpu --lib -- --test-threads=4—550 passed; 0 failed; 47 ignored(13.06s), including the new unaligned pipeline stream unit tests.python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/pipeline.rs— PASS.AI-assisted: Antigravity (Gemini 4 Neon)
@imShangLi on GitHub · 2026-11-29 20:14 UTC · original
CI note: the remaining
semantic-tests (ubuntu-latest)failure istest_interp_computed_ij_fallback, the same upstream baseline failure observed on the previous PR/base. This PR changes onlyd3d12/crates/leonida-gpu/src/pipeline.rs;translator-tests,viewer-tests,no-game-data, andchange-scopepass.Independent native Windows verification is already recorded above: 550 passed / 0 failed on RX 7900 XTX.
AI-assisted: yes.
@imShangLi on GitHub · 2026-11-29 20:23 UTC · original
@MoonEyes ready for maintainer review when convenient. Independent RX 7900 XTX verification is 550 passed / 0 failed; the only red CI is the known upstream semantic baseline. AI-assisted: yes.
@OreoFR on GitHub · 2026-11-29 21:38 UTC · original
Verified by OreoFR
eddf401a2f1d578c676c612f176eaf288064476b, merged with--no-ffontomain060c4716046d8c17f5a124d9ae9d56cc0070c225: clean, no conflict.--locked.leonida-gpu.cargo test -p leonida-gpu --lockedon the merge: 550/550 passed, 0 failed, 47 ignored (doc-test targets 0/0).a_stream_at_an_odd_address_yields_its_shaderspasses.create_streamchange restored tomainand the new test kept: the test binary aborts,pipeline.rs:1185"misaligned pointer dereference: address must be a multiple of 0x8" (exit0xc0000409). Red to green seen; this is the first red recorded by someone other than the author.cargo clippy -p leonida-gpu --locked -- -D warningsstops on lints that are already onmainin crates this PR does not touch (leonida-shaderemit/lower.rs,emit/bitcode/opt.rs;leonida-luainput.rs,memory.rs). Without-D warnings, no lint points atpipeline.rs. Nothing new from this PR.eade9562c).StreamDescand each shaderBytecodeare now copied withread_unaligned(), which matches the subobject kind read andhost::GraphicsState::read, which already read unaligned. On Windows the test also runs thegraphics.readpath at the odd address. The PR says it may overlap #2569 in the same file; one of them will need a rebase after the other lands.This verification was AI-assisted (Claude Code, oreofr-agent).
@imShangLi on GitHub · 2026-11-30 09:50 UTC · original
Updated head
c33baf89with latestmain(4014af7f), which includes the merged semantic baseline fix #2633. This should clear the previoustest_interp_computed_ij_fallbackCI failure without changing this PR's one-file diff.AI-assisted: yes.
@MoonEyes on GitHub · 2026-11-30 15:59 UTC · original
Verified: independent Windows checks pass, including 550 leonida-gpu tests; a red-on-main / green-on-PR misaligned-pointer regression was confirmed, and CI/no-game-data are green. Ready for merge.