shader: recognize bit-field extraction in pixel primitive masks #27
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by shabouwcaw on 2026-11-26T10:02:57Z.
A 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.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T10:13:02Z.
Review: APPROVED
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!