shader: recognize bit-field extraction in pixel primitive masks #27
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!27
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/27/head"
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?
@shabouwcaw on GitHub · 2026-11-26 10:02 UTC · original
shabouwcaw:fix/pixel-prim-mask-bitfield-extract→main· +45 −3 · 3 files · 2 commits · merged 2026-11-26 10:17 UTCA guessed pixel shader that extracts its primitive mask with
s_bfe_u32before moving it to M0 is rejected asa hardware SGPR input. Recognize unsigned bit-field extraction alongside the existing scalar mask/shift operations, retaining the checks that the value is used only for interpolation and that SCC has no observable consumer.The hand-assembled regression fails before the change and passes with both
wave32_hostsettings afterward. Negative cases retain rejection when the original mask, extracted mask, or SCC affects output. The guessed-path assumption and validation limits are documented indocs/native-host.md.Related to #4. This covers a synthetic instance of the hardware-SGPR refusal; it has not been verified against the seven reported game shaders and does not claim to close the issue. No game data is included.
Validation on the current main base:
cargo test -j6 --locked -p victory-shader -p xtask: 222 passed, 2 ignored benchmarks.cargo clippy -j6 --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: passed.cargo xtask policy: passed (363 files).git diff --check: passed.Broader local checks attempted before rebasing were limited by missing host dependencies: GPU tests abort when
libmetalirconverter.dylibcannot be loaded; HLE native-probe integration tests cannot build without Homebrew LLVM'sllvm-dlltool. The 122 HLE unit tests passed. Full CI and maintainer review remain required.@LakshanSivakumar on GitHub · 2026-11-26 10:13 UTC · original · approved these changes
Reviewed and tested merged with current main: victory-shader/victory-gpu/xtask tests (incl. the new extraction regression) and policy pass. Small, well-guarded change with good negative cases. Thanks, and welcome!