Game: preserve sample masks in prebuilt graphics pipelines #1864
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1866"
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?
Imported from Marvisak/VIctory. Originally posted by necrobytes on 2026-11-24T23:47:01Z.
translate --cache --pipelinesused to write0xffffffffinto every graphics pipeline’s sample-mask field. A four-sample record with mask0x5therefore looked the same as one enabling all four samples. The runtime includes the mask in its pipeline cache key, so a request for the partial mask could miss the prebuilt entry.The prebuilder now copies the mask returned by
Graphics::samples()into the creation stream. The existing stream test now checks partial, zero, and full coverage on a four-sample record.I tested on x86-64 Linux with Rust 1.98.1. A synthetic pack with masks
0,1,5, and0xffffffffproduced one distinct stream on70564ae. With this change, it produced four, each carrying the original mask.victory-gametests passed natively on Linux. I also cross-compiled the tests forx86_64-pc-windows-gnuand ran the Windows executable under Wine 11.21. All 15 passed there too. The new0x5assertion failed on the original implementation.cargo clippy --locked --workspace --all-targets --target x86_64-pc-windows-msvc -- -D warningspassed both with default features and with--all-features. Strict Clippy also passed forvictory-gameon the Linux target.cargo xtask policypassed for all 174 tracked files.Tracked as
NEW-41. Claim in #1633Implemented and tested with Codex.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:09:57Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
940d32f), cargo test → 15 passed, 0 failed. GPU execution tests are #[cfg(all(test, windows))] and run only on Windows.victory-game. Game: preserve sample masks in prebuilt graphics…: sample-mask preservation in prebuilt shaders.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T07:18:36Z.
Automated triage for the maintainers.
Merge candidate. The verdict is unchanged.
Since the last review (
1f34644→771bb01): the only new commit merges currentmaininto the branch. The PR's own diff againstmainis the same as before.streamincrates/victory-game/src/pipelines.rswrites the sample mask fromGraphics::samples()(metadata offset 0x1c) into the stream's sample-mask field at 0x1dc, instead of always writingu32::MAX.crates/victory-gpu/src/pipeline/host.rsreads that field intosample_maskand the pipeline key. The test now builds records with masks 0x5, 0 andu32::MAXand checks that each one reaches the stream.CI: passing.
Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 10:07:34 +00:00
_d16and_d16_hiloads #2001Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:24:09Z.
Review: APPROVED
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):cargo test --locked -p victory-game— 15 passed, 0 failed (includinga_record_becomes_the_engines_creation_streamacross sample masks0x5,0, andu32::MAX)cargo clippy --locked -p victory-game --all-targets -- -D warnings(default and--all-features) — 0 warningsrustfmt --edition 2024 --check crates/victory-game/src/pipelines.rs— cleancargo xtask policy— ok (191 files ok)Review notes
stream()now forwards the little-endianu32sample mask fromGraphics::samples()(0x1cin metadata) straight into offset0x1dcinstead of overwriting it withu32::MAX, preserving0, partial masks, andu32::MAXalike.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T07:18:25Z.
I combined #1866 at
771bb01with #3690 atf7e419bin a7364db. This retains the prebuilder's sample-mask fix and the byte-identical runtime input descriptions.On Windows the prebuild stream test preserved zero, partial and full sample masks. A new host test fed
0,1,5and0xffffffffthrough the sample-mask subobject of a four-sample graphics state. All four produced distinct runtime cache keys with the same input layout. The game and pipeline-host tests, strict Clippy for both crates and the asset policy passed.necrobytes or a maintainer can use the additional test if both changes land. This check covers the generated stream and key, without measuring a title's cache hit rate.
Please retain the Git authors on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding this resolution into another commit.AI-assisted with OpenAI Codex.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.