Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64 #117
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!117
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/117/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?
@tedin7 on GitHub · 2026-11-24 00:39 UTC · original
tedin7:vic-s-bitcmp-2→main· +52 −0 · 1 files · 1 commits · merged 2026-11-24 07:51 UTCWhat
s_bitcmp0_b32,s_bitcmp1_b32,s_bitcmp0_b64ands_bitcmp1_b64. SCC becomes whether bitsrc1(mod 32, mod 64 for the 64-bit forms) ofsrc0is clear (bitcmp0) or set (bitcmp1).Why
sop()had no case for them. Any shader using one failed to translate withUnsupported.Tested
cargo test -j4 -p victory-shader scalar_bit_tests_lowerwith the lowering disabled (test only): fails withUnsupported { offset: 8, what: "s_bitcmp0_b32" }.cargo test -j4 -p victory-shaderafter the change: 56 passed (origin/main237f2e8), 0 failed (the new test included).cargo clippy -j4 -p victory-shader --tests: no new warnings (existing: dead_codeconstant_colorin emit/mod.rs, a boolean-simplification note in resource.rs).rustfmt --edition 2024 --checkon lower.rs: clean.lowers()helper in the tests module.@lordon1a on GitHub · 2026-11-24 00:51 UTC · original
Verified
3c860538eon Windows 11 (x86_64-pc-windows-gnullvm,rustc 1.100.0, applied cleanly tomain@4c0bb89): pass.cargo xtask policy: 151 files okcargo test -p victory-shader -- --skip v_med3_f32_matches_rdna2_with_nan: 69 passed, 0 failed.AI-assisted.
@DaviTostes on GitHub · 2026-11-24 01:10 UTC · original
Tested
3c86053on Arch Linux x86_64, rustc 1.98.1: pass.cargo test -p victory-shader: 56 passed, 0 failed (2 test binaries), including the 1 test this PR adds.s_bitcmp0/1_b32/s_bitcmp0/1_b64(ands_sext), and is open; one of the two should be closed.victory-gpuE0425.