Game: preserve sample masks in prebuilt graphics pipelines #1866
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!1866
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@necrobytes on GitHub · 2026-11-24 23:47 UTC · original
necrobytes:fix/prebuild-sample-mask→main· +19 −7 · 1 files · 5 commits · opentranslate --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.
@Marvisak on GitHub · 2026-11-25 07:18 UTC · original · edited 2026-11-25 20:20 UTC
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
@catminou4 on GitHub · 2026-11-25 02:09 UTC · original · approved these changes
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.
@fuzeofficlal on GitHub · 2026-11-26 19:24 UTC · original · approved these changes
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.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.