Triage: open PRs that add lowering for the same shader instructions #1899
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T00:23:39Z.
With about 980 open PRs, several groups add the same
matcharms incrates/victory-shader/src/emit/lower.rsfor 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.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
matcharms ("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
s_cmov_b32,s_cmov_b64,s_cmovk_i32valu_testscase.v_div_scale_f32,v_div_fmas_f32,v_div_fixup_f32,v_div_fixup_f16#1149v_swaprel_b32,v_movrelsd_2_b32#627v_swaprel_b32only.image_gather4_c_lz,image_gather4_c_lz_ov_lerp_u8v_fmaak/fmamk_f16,v_cvt_pk_*; #1688:v_mad_u32_u16/v_mad_i32_i16).s_absdiff_i32,s_pack_*_b32_b16#1675v_cvt_f32_f64#978v_permlane16_b32,v_permlanex16_b32#576(#98)wave.rsfor whole-wave sections, a different approach.Open PRs that overlap something already in main
v_mad_u64_u32/v_mad_i64_i32arms already in mainv_mad_i64_i32,clamprefused) and adds a GPU test.v_interp_p2_f16modifiers. It also carries a vertex/pixel draw-and-readback fixture that could be reviewed as a test-only change.#1197#1647INT64capability that main'smul_hisets.#1654v_mad_*arms in mainINT64.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.
Imported from Marvisak/VIctory. Originally posted by Ingenioeren on 2026-11-25T00:32:01Z.
One row can move to “overlaps main.” #1696 merged as
4436fcaafter the snapshot. The corresponding #1338 is still open.I checked
4118f33with the syntheticinterpolated_f16_writes_the_op_sel_half_with_modifierstest and addedmul:4anddiv:2to 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 atomod multiplies by two. Merged regression testThe 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.
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T01:40:37Z.
Refreshed against
mainccfb029: three groups lost a member, two PRs became redundant withmain, and one now merges cleanlyI re-checked this list against today's
mainccfb029instead of thee2a80cfdit 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 incrates/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_i32are there, which is what the overlap table already said.)PRs that are no longer open, so their groups are smaller than the table claims:
v_interp_p2_f16), so group H is now just #1338 — and #1338 ismergeable: null, i.e. GitHub is recomputing, not a conflict;Two PRs now conflict with
mainand 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 isnull. The ones that arenullare not conflicts; I am readingfalseas conflicting andnullas "not computed yet", which is what the API'smergeablemeans.The one that is now easy: #171 is the interesting one:
open,mergeable: true,+160-8, and its lowering is already inmain(its diff only adds the GPU testvalu_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.
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T01:41:05Z.
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 testvalu_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:#171 changes the lowering: signed carry-out (
SDST) forv_mad_i64_i32as bit 64 of the exact 65-bit result,clamprefused on both forms, and its own tests. That the arms forv_mad_u64_u32andv_mad_i64_i32exist inmainis 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:
mainalready lowers, it applies cleanly (mergeable: true), and it should be reviewed as such — not waved through as a test-only change.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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:52:11Z.
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.rsdoes not show whethermainlowers it.v_interp_p2_f16has no such arm onmain(940d32f), yet #1696 merged its lowering andcrates/victory-shader/src/emit/mod.rshas its tests. Some instructions are matched by pattern rather than by name, so please check presence inmainagainst tests or the diff, not against the string.Generated by Claude Code