Repository navigation
Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64 - #117
Merged
Merged
Conversation
The scalar bit tests decode and are tracked in ir.rs (they write SCC) but the lowering had no case for them, so any shader using one failed to translate with Unsupported.
Contributor
|
Verified
AI-assisted. |
|
Tested
|
Closed
r4tedx
added a commit
to r4tedx/VIctory
that referenced
this pull request
Nov 24, 2026
main moved under Marvisak#307 and this branch. One conflict, in the test module of emit/lower.rs: the imports take both sides' names (Marvisak#117's `half_shift` beside `Lowered`), and Marvisak#117's `scalar_bit_tests_lower` sits after this branch's waterfall tests. No code outside the test module was touched by hand. A merge rather than a rebase so Marvisak#307's commits keep their ids. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
BastienRodz
added a commit
to BastienRodz/VIctory
that referenced
this pull request
Nov 24, 2026
… the tests compile cargo test -p victory-shader does not compile on main (cf0bb43): error[E0061]: this function takes 2 arguments but 1 argument was supplied --> crates/victory-shader/src/emit/lower.rs:6954:13 25b0f88 (Marvisak#432) gave the test helper lowers() an rsrc2 argument and updated its callers; 3c86053 (Marvisak#117), merged in the same wave, added the s_bitcmp test with a call of the old form. The helper used rsrc2 0 before, so the call passes 0. One argument, nothing else changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
r4tedx
added a commit
to r4tedx/VIctory
that referenced
this pull request
Nov 24, 2026
On main at 8d23f07 the test target of victory-shader does not compile: Marvisak#612 gave the test helper `lowers` a second argument (rsrc2) and Marvisak#117's `scalar_bit_tests_lower`, merged beside it, still calls it with one. The call passes 0, as the helper's other callers without group ids do. Not part of the scratch-memory change; it is here so this branch's tests can run. Drop it when main has the same fix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
r4tedx
added a commit
to r4tedx/VIctory
that referenced
this pull request
Nov 24, 2026
On main the test target of victory-shader does not compile (upstream issue Marvisak#719): Marvisak#612 gave the test helper `lowers` a second argument (rsrc2) and Marvisak#117's `scalar_bit_tests_lower`, merged beside it, still calls it with one. The call passes 0, as the helper's other callers without group ids do. Not part of the image sampling change; it is here so this branch's tests can run. Drop it when main has the same fix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
suirentakamura
referenced
this pull request
in suirentakamura/victory-suiren
Nov 24, 2026
Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64
suirentakamura
referenced
this pull request
in suirentakamura/victory-suiren
Nov 24, 2026
main moved under #307 and this branch. One conflict, in the test module of emit/lower.rs: the imports take both sides' names (#117's `half_shift` beside `Lowered`), and #117's `scalar_bit_tests_lower` sits after this branch's waterfall tests. No code outside the test module was touched by hand. A merge rather than a rebase so #307's commits keep their ids. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
itsonlysimbo
pushed a commit
to itsonlysimbo/VIctory
that referenced
this pull request
Nov 24, 2026
Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64
itsonlysimbo
pushed a commit
to itsonlysimbo/VIctory
that referenced
this pull request
Nov 24, 2026
main moved under Marvisak#307 and this branch. One conflict, in the test module of emit/lower.rs: the imports take both sides' names (Marvisak#117's `half_shift` beside `Lowered`), and Marvisak#117's `scalar_bit_tests_lower` sits after this branch's waterfall tests. No code outside the test module was touched by hand. A merge rather than a rebase so Marvisak#307's commits keep their ids. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
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/main 237f2e8), 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.