Triage: open PRs that add lowering for the same shader instructions #1901

Open
opened 2026-11-26 04:48:06 +00:00 by github-bot · 4 comments
Owner

@⁠Dathinel on GitHub · 2026-11-25 00:23 UTC · original

With about 980 open PRs, several groups add the same match arms in crates/victory-shader/src/emit/lower.rs for the same instructions. This list groups them so each group can be reviewed together and the rest closed or folded in. It makes no claim about which PR in a group is better.

Updated 2026-11-25 ~02:55Z against main 940d32f6. Closed and merged PRs are struck through. The #171 row was wrong in the first version and is corrected (thanks @⁠fiestorra); #1338 moved to the overlap table after #1696 merged (thanks @⁠Ingenioeren). See the comments for their checks.

How this was checked. Instruction names were taken from the titles of all open PRs and grouped. For every PR listed below, the diff was fetched and the instruction names added as match arms ("name" => / | "name") were extracted from its added lines. That method finds new arms only; changes inside existing arms (as in #171) need the diff read.

Open PRs that add the same instructions

Instructions PRs Notes
s_cmov_b32, s_cmov_b64, s_cmovk_i32 #91, #1649 Same three arms. #1649 also adds a valu_tests case.
v_div_scale_f32, v_div_fmas_f32, v_div_fixup_f32, v_div_fixup_f16 #200, #1747, #379, #1149 #200: scale, fmas, fixup_f32. #1747: scale, fmas. #379: fixup_f16.
v_swaprel_b32, v_movrelsd_2_b32 #498, #1569, #627 #498: both. #1569: v_swaprel_b32 only.
image_gather4_c_lz, image_gather4_c_lz_o #1489, #1687 Same two arms.
v_lerp_u8 #1314, #1688 Only this instruction overlaps; each also adds others (#1314: v_fmaak/fmamk_f16, v_cvt_pk_*; #1688: v_mad_u32_u16/v_mad_i32_i16).
s_absdiff_i32, s_pack_*_b32_b16 #120, #1675 No longer a duplicate.
v_cvt_f32_f64 #416, #978 No longer a duplicate.
v_permlane16_b32, v_permlanex16_b32 #1014, #576 (#98) #98 models them in wave.rs for whole-wave sections, a different approach.

Open PRs that overlap something already in main

PR Overlaps Notes
#171 v_mad_u64_u32/v_mad_i64_i32 arms already in main Corrected: not test-only. It changes the existing lowering (signed carry-out for v_mad_i64_i32, clamp refused) and adds a GPU test.
#1338 #1696 (merged) Same v_interp_p2_f16 modifiers. It also carries a vertex/pixel draw-and-readback fixture that could be reviewed as a test-only change.
#1197 #162 (merged) Closed.
#1647 #156 (merged) Closed. It avoided the INT64 capability that main's mul_hi sets.
#1654 the v_mad_* arms in main Closed. It also avoided INT64.

Limits. This only matches instruction names. Two PRs in one group may still differ in correctness, tests or edge cases; that needs a review of each diff. PRs whose titles name no instruction are not covered.

AI-assisted: Claude Code (Claude Opus 5.5) collected and grouped the data and wrote this issue; the added arms were extracted from each PR's diff, not inferred from titles.

**@⁠Dathinel** on GitHub · 2026-11-25 00:23 UTC · [original](https://github.com/Marvisak/VIctory/issues/1901) With about 980 open PRs, several groups add the same `match` arms in `crates/victory-shader/src/emit/lower.rs` for the same instructions. This list groups them so each group can be reviewed together and the rest closed or folded in. It makes no claim about which PR in a group is better. > **Updated 2026-11-25 ~02:55Z against `main` `940d32f6`.** Closed and merged PRs are struck through. The #171 row was wrong in the first version and is corrected (thanks @⁠fiestorra); #1338 moved to the overlap table after #1696 merged (thanks @⁠Ingenioeren). See the comments for their checks. **How this was checked.** Instruction names were taken from the titles of all open PRs and grouped. For every PR listed below, the diff was fetched and the instruction names added as `match` arms (`"name" =>` / `| "name"`) were extracted from its added lines. That method finds new arms only; changes inside existing arms (as in #171) need the diff read. ### Open PRs that add the same instructions | Instructions | PRs | Notes | |---|---|---| | `s_cmov_b32`, `s_cmov_b64`, `s_cmovk_i32` | #91, #1649 | Same three arms. #1649 also adds a `valu_tests` case. | | `v_div_scale_f32`, `v_div_fmas_f32`, `v_div_fixup_f32`, `v_div_fixup_f16` | #200, #1747, #379, ~~#1149~~ | #200: scale, fmas, fixup_f32. #1747: scale, fmas. #379: fixup_f16. | | `v_swaprel_b32`, `v_movrelsd_2_b32` | #498, #1569, ~~#627~~ | #498: both. #1569: `v_swaprel_b32` only. | | `image_gather4_c_lz`, `image_gather4_c_lz_o` | #1489, #1687 | Same two arms. | | `v_lerp_u8` | #1314, #1688 | Only this instruction overlaps; each also adds others (#1314: `v_fmaak/fmamk_f16`, `v_cvt_pk_*`; #1688: `v_mad_u32_u16`/`v_mad_i32_i16`). | | `s_absdiff_i32`, `s_pack_*_b32_b16` | #120, ~~#1675~~ | No longer a duplicate. | | `v_cvt_f32_f64` | #416, ~~#978~~ | No longer a duplicate. | | `v_permlane16_b32`, `v_permlanex16_b32` | #1014, ~~#576~~ (#98) | #98 models them in `wave.rs` for whole-wave sections, a different approach. | ### Open PRs that overlap something already in main | PR | Overlaps | Notes | |---|---|---| | #171 | `v_mad_u64_u32`/`v_mad_i64_i32` arms already in main | **Corrected:** not test-only. It changes the existing lowering (signed carry-out for `v_mad_i64_i32`, `clamp` refused) and adds a GPU test. | | #1338 | #1696 (merged) | Same `v_interp_p2_f16` modifiers. It also carries a vertex/pixel draw-and-readback fixture that could be reviewed as a test-only change. | | ~~#1197~~ | #162 (merged) | Closed. | | ~~#1647~~ | #156 (merged) | Closed. It avoided the `INT64` capability that main's `mul_hi` sets. | | ~~#1654~~ | the `v_mad_*` arms in main | Closed. It also avoided `INT64`. | **Limits.** This only matches instruction names. Two PRs in one group may still differ in correctness, tests or edge cases; that needs a review of each diff. PRs whose titles name no instruction are not covered. AI-assisted: Claude Code (Claude Opus 5.5) collected and grouped the data and wrote this issue; the added arms were extracted from each PR's diff, not inferred from titles.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:06 +00:00
Author
Owner

@⁠Ingenioeren on GitHub · 2026-11-25 00:32 UTC · original

One row can move to “overlaps main.” #1696 merged as 4436fca after the snapshot. The corresponding #1338 is still open.

I checked 4118f33 with the synthetic interpolated_f16_writes_the_op_sel_half_with_modifiers test and added mul:4 and div:2 to the test in a temporary checkout. DXC confirmed the destination-half handling, clamp, and all three nonzero output modifiers. As a control, I swapped back only the pre-merge lowering. The same test then failed at omod multiplies by two. Merged regression test

The compiler-side behavior is covered on main. #1338 still carries a separate vertex/pixel draw-and-readback fixture that could be reviewed as a test-only change. I verified the emitted DXIL here and did not run the draw-and-readback fixture.

AI-assisted verification. Synthetic shader input only.

**@⁠Ingenioeren** on GitHub · 2026-11-25 00:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/1901#issuecomment-7148605170) One row can move to “overlaps main.” #1696 merged as `4436fca` after the snapshot. The corresponding #1338 is still open. I checked `4118f33` with the synthetic `interpolated_f16_writes_the_op_sel_half_with_modifiers` test and added `mul:4` and `div:2` to the test in a temporary checkout. DXC confirmed the destination-half handling, clamp, and all three nonzero output modifiers. As a control, I swapped back only the pre-merge lowering. The same test then failed at `omod multiplies by two`. [Merged regression test](https://github.com/Marvisak/VIctory/blob/4118f33b3910f6b6b738216d6a66e8b355502b28/crates/victory-shader/src/emit/mod.rs#L1405-L1495) The compiler-side behavior is covered on main. #1338 still carries a separate vertex/pixel draw-and-readback fixture that could be reviewed as a test-only change. I verified the emitted DXIL here and did not run the draw-and-readback fixture. _AI-assisted verification. Synthetic shader input only._
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 01:40 UTC · original

Refreshed against main ccfb029: three groups lost a member, two PRs became redundant with main, and one now merges cleanly

I re-checked this list against today's main ccfb029 instead of the e2a80cfd it was written on, and against the current state of every PR it names. Two kinds of change, and the second is the one worth acting on.

Instructions are still missing from main, so no group is solved: s_cmov_b32, s_absdiff_i32, v_div_scale_f32, v_cvt_f32_f64, v_swaprel_b32, v_permlane16_b32, image_gather4_c_lz, v_interp_p2_f16, v_lerp_u8 — none of them has an arm in crates/victory-shader/src/emit/lower.rs. (v_sad_u8, v_sad_u16, v_sad_u32, v_msad_u8, v_mad_u64_u32, v_mad_i64_i32 are there, which is what the overlap table already said.)

PRs that are no longer open, so their groups are smaller than the table claims:

  • merged: #1696 (v_interp_p2_f16), so group H is now just #1338 — and #1338 is mergeable: null, i.e. GitHub is recomputing, not a conflict;
  • closed without merging: #1675 (group B is only #120), #1149 (group C loses one of four), #978 (group D is only #416), #627 (group E loses the only PR that had all three), #1197 and #1654 (both overlap-table rows).

Two PRs now conflict with main and need a rebase before any of them can be reviewed as duplicates: #1649 (s_cmov_*), #120 (s_absdiff_i32), #1747 (v_div_*), #98 (v_permlane*), #1489 (image_gather4_c_lz) and #1675's group-mate #1687 is null. The ones that are null are not conflicts; I am reading false as conflicting and null as "not computed yet", which is what the API's mergeable means.

The one that is now easy: #171 is the interesting one: open, mergeable: true, +160-8, and its lowering is already in main (its diff only adds the GPU test valu_mad64_executes_on_gpu), so it is a test-only addition that applies cleanly today — the cheapest thing on this list to merge.

What I am not doing: judging the groups. Which PR in a group is better is a review of each diff, and this list's own limits say so. I am only saying what the repository says today about state and presence in main.

If it helps, the ordering I would use to review: the four v_div_* group (C) has one member (#200) that adds three of the four instructions — reviewing it first decides whether the others are still needed; group I (v_lerp_u8) has two PRs that each add something else too, so neither is a plain duplicate.

No game data is involved: instruction names, PR numbers and mergeable flags.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 01:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/1901#issuecomment-7149826335) **Refreshed against `main` `ccfb029`: three groups lost a member, two PRs became redundant with `main`, and one now merges cleanly** I re-checked this list against today's `main` `ccfb029` instead of the `e2a80cfd` it was written on, and against the current state of every PR it names. Two kinds of change, and the second is the one worth acting on. **Instructions are still missing from `main`**, so no group is solved: `s_cmov_b32`, `s_absdiff_i32`, `v_div_scale_f32`, `v_cvt_f32_f64`, `v_swaprel_b32`, `v_permlane16_b32`, `image_gather4_c_lz`, `v_interp_p2_f16`, `v_lerp_u8` — none of them has an arm in `crates/victory-shader/src/emit/lower.rs`. (`v_sad_u8`, `v_sad_u16`, `v_sad_u32`, `v_msad_u8`, `v_mad_u64_u32`, `v_mad_i64_i32` are there, which is what the overlap table already said.) **PRs that are no longer open**, so their groups are smaller than the table claims: - merged: **#1696** (`v_interp_p2_f16`), so group H is now just #1338 — and #1338 is `mergeable: null`, i.e. GitHub is recomputing, not a conflict; - closed without merging: **#1675** (group B is only #120), **#1149** (group C loses one of four), **#978** (group D is only #416), **#627** (group E loses the only PR that had all three), **#1197** and **#1654** (both overlap-table rows). **Two PRs now conflict with `main`** and need a rebase before any of them can be reviewed as duplicates: **#1649** (`s_cmov_*`), **#120** (`s_absdiff_i32`), **#1747** (`v_div_*`), **#98** (`v_permlane*`), **#1489** (`image_gather4_c_lz`) and **#1675**'s group-mate **#1687** is `null`. The ones that are `null` are not conflicts; I am reading `false` as conflicting and `null` as "not computed yet", which is what the API's `mergeable` means. **The one that is now easy**: **#171** is the interesting one: `open`, `mergeable: true`, `+160-8`, and its lowering is already in `main` (its diff only adds the GPU test `valu_mad64_executes_on_gpu`), so it is a **test-only addition that applies cleanly today** — the cheapest thing on this list to merge. What I am not doing: judging the groups. Which PR in a group is better is a review of each diff, and this list's own limits say so. I am only saying what the repository says today about *state* and *presence in main*. If it helps, the ordering I would use to review: the four `v_div_*` group (C) has one member (#200) that adds three of the four instructions — reviewing it first decides whether the others are still needed; group I (`v_lerp_u8`) has two PRs that each add something else too, so neither is a plain duplicate. No game data is involved: instruction names, PR numbers and mergeable flags. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 01:41 UTC · original

Correction to my comment above, about #171: it is not test-only, and I should not have said it was

I wrote that #171's lowering "is already in main" and that its diff "only adds the GPU test valu_mad64_executes_on_gpu", taking that from the note in the issue's overlap table. I checked the pull request itself afterwards and it is wrong:

crates/victory-shader/src/emit/lower.rs  +18 -8
crates/victory-shader/src/emit/mod.rs    +142 -0

#171 changes the lowering: signed carry-out (SDST) for v_mad_i64_i32 as bit 64 of the exact 65-bit result, clamp refused on both forms, and its own tests. That the arms for v_mad_u64_u32 and v_mad_i64_i32 exist in main is true — but the PR is not adding them, it is fixing what they emit, which is a different thing and exactly the "alternative, not a plain duplicate" case the table's notes describe for #1647 and #1654.

So the corrected version of the one actionable line in my refresh:

  • #171 is not the cheapest thing on the list; it is a correctness fix to the carry-out of an instruction that main already lowers, it applies cleanly (mergeable: true), and it should be reviewed as such — not waved through as a test-only change.
  • The rest of the refresh stands: the instruction names are still absent from main, #1696 merged, #1675/#1149/#978/#627/#1197/#1654 were closed without merging, and the conflicting ones are #1649, #120, #1747, #98, #1489.

The lesson is mine and worth writing down: a table's note about a pull request goes stale, and I should read the diff before repeating it — the same mistake I keep warning others about with log lines.

No game data is involved: file names, line counts and instruction names.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 01:41 UTC · [original](https://github.com/Marvisak/VIctory/issues/1901#issuecomment-7149835557) **Correction to my comment above, about #171: it is not test-only, and I should not have said it was** I wrote that #171's lowering "is already in `main`" and that its diff "only adds the GPU test `valu_mad64_executes_on_gpu`", taking that from the note in the issue's overlap table. I checked the pull request itself afterwards and it is wrong: ``` crates/victory-shader/src/emit/lower.rs +18 -8 crates/victory-shader/src/emit/mod.rs +142 -0 ``` #171 changes the **lowering**: signed carry-out (`SDST`) for `v_mad_i64_i32` as bit 64 of the exact 65-bit result, `clamp` refused on both forms, and its own tests. That the arms for `v_mad_u64_u32` and `v_mad_i64_i32` exist in `main` is true — but the PR is not adding them, it is fixing what they emit, which is a different thing and exactly the "alternative, not a plain duplicate" case the table's notes describe for #1647 and #1654. So the corrected version of the one actionable line in my refresh: - **#171 is not the cheapest thing on the list**; it is a correctness fix to the carry-out of an instruction that `main` already lowers, it applies cleanly (`mergeable: true`), and it should be reviewed as such — not waved through as a test-only change. - The rest of the refresh stands: the instruction names are still absent from `main`, #1696 merged, #1675/#1149/#978/#627/#1197/#1654 were closed without merging, and the conflicting ones are #1649, #120, #1747, #98, #1489. The lesson is mine and worth writing down: a table's note about a pull request goes stale, and I should read the diff before repeating it — the same mistake I keep warning others about with log lines. No game data is involved: file names, line counts and instruction names. Written with an AI assistant.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:52 UTC · original

Automated triage for the maintainers.

A review aid for maintainers: it groups open PRs that add lowering for the same instructions in crates/victory-shader/src/emit/lower.rs, so each group can be reviewed together. It is kept open as a tracking list.

One caution on the refresh comment: looking for a quoted instruction name in lower.rs does not show whether main lowers it. v_interp_p2_f16 has no such arm on main (940d32f), yet #1696 merged its lowering and crates/victory-shader/src/emit/mod.rs has its tests. Some instructions are matched by pattern rather than by name, so please check presence in main against tests or the diff, not against the string.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/1901#issuecomment-7162969836) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T01:41:05Z at=2026-11-25T12:52:00Z --> Automated triage for the maintainers. A review aid for maintainers: it groups open PRs that add lowering for the same instructions in `crates/victory-shader/src/emit/lower.rs`, so each group can be reviewed together. It is kept open as a tracking list. One caution on the refresh comment: looking for a quoted instruction name in `lower.rs` does not show whether `main` lowers it. `v_interp_p2_f16` has no such arm on `main` (`940d32f`), yet #1696 merged its lowering and `crates/victory-shader/src/emit/mod.rs` has its tests. Some instructions are matched by pattern rather than by name, so please check presence in `main` against tests or the diff, not against the string. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#1901
No description provided.