Shaders: v_pk_fmac_f16 with DPP reads src0 from the selected lane #2229

Open
github-bot wants to merge 1 commit from github-bot/gh-2229 into main AGit
Owner

@⁠BastienRodz on GitHub · 2026-11-25 08:23 UTC · original
BastienRodz:shader/pk-fmac-dpp-src0 → main · +164 −1 · 2 files · 1 commits · open

What's wrong

For a VOP1/VOP2 instruction with DPP, Lower::valu fetches src0 from the selected lane and leaves it in self.src0; fsrc, src, half_src and v_cndmask_b32 use it for source 0. Lower::fmac_half, which reads the halves of v_pk_fmac_f16, called self.operand instead, so v_pk_fmac_f16_dpp multiplied the lane's own src0 in both halves. RDNA 2 ISA §12.7 defines the operation on S0, and §6.9 says DPP selects VOP1/VOP2 operands "from different lanes (threads) rather than just using a thread's own lane".

What the fix does

fmac_half takes self.src0 for source 0 when it is set, like the other readers. Nothing changes without DPP.

Tests

New emit::valu_tests::packed_fmac_dpp_reads_the_swizzled_lane: a pixel program on a 2x2 target packs a per-pixel pair of halves, runs v_pk_fmac_f16_dpp quad_perm:[1,0,3,2], and checks each pixel got its horizontal neighbour's product. A pixel program is used because quad permutes behave the same at any wave size, so the test also runs on WARP (a compute version would declare the console's wave of 32, which WARP and llvmpipe refuse).

  • On main (940d32f) it fails: every pixel gets its own product (left: [[6.5, 6.0, …], [10.5, 8.0, …], …], right: [[10.5, 8.0, …], [6.5, 6.0, …], …]).
  • With the fix it and packed_fmac_accumulates_each_half pass.
  • Run under Wine 10 with vkd3d-proton 3.1 on llvmpipe (VKD3D_FEATURE_LEVEL=12_2 VKD3D_SHADER_MODEL=6_6).
  • windows-latest run on the fork: https://github.com/BastienRodz/VIctory/actions/runs/45575808602

Not tested

Not run on an AMD/NVIDIA GPU. No dxil.dll here, so the new program was not run through the validator locally. Whether title shaders use v_pk_fmac_f16 with DPP is not measured.

Fixes #2228

AI-assisted (Gemini 4 Neon found and wrote it, Claude Code reviewed, trimmed and verified it). No game data used.

🤖 Generated with Claude Code

**@⁠BastienRodz** on GitHub · 2026-11-25 08:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229) `BastienRodz:shader/pk-fmac-dpp-src0` → `main` · +164 −1 · 2 files · 1 commits · open ### What's wrong For a VOP1/VOP2 instruction with DPP, `Lower::valu` fetches `src0` from the selected lane and leaves it in `self.src0`; `fsrc`, `src`, `half_src` and `v_cndmask_b32` use it for source 0. `Lower::fmac_half`, which reads the halves of `v_pk_fmac_f16`, called `self.operand` instead, so `v_pk_fmac_f16_dpp` multiplied the lane's own `src0` in both halves. RDNA 2 ISA §12.7 defines the operation on S0, and §6.9 says DPP selects VOP1/VOP2 operands "from different lanes (threads) rather than just using a thread's own lane". ### What the fix does `fmac_half` takes `self.src0` for source 0 when it is set, like the other readers. Nothing changes without DPP. ### Tests New `emit::valu_tests::packed_fmac_dpp_reads_the_swizzled_lane`: a pixel program on a 2x2 target packs a per-pixel pair of halves, runs `v_pk_fmac_f16_dpp quad_perm:[1,0,3,2]`, and checks each pixel got its horizontal neighbour's product. A pixel program is used because quad permutes behave the same at any wave size, so the test also runs on WARP (a compute version would declare the console's wave of 32, which WARP and llvmpipe refuse). - On `main` (940d32f) it fails: every pixel gets its own product (`left: [[6.5, 6.0, …], [10.5, 8.0, …], …]`, `right: [[10.5, 8.0, …], [6.5, 6.0, …], …]`). - With the fix it and `packed_fmac_accumulates_each_half` pass. - Run under Wine 10 with vkd3d-proton 3.1 on llvmpipe (`VKD3D_FEATURE_LEVEL=12_2 VKD3D_SHADER_MODEL=6_6`). - windows-latest run on the fork: https://github.com/BastienRodz/VIctory/actions/runs/45575808602 ### Not tested Not run on an AMD/NVIDIA GPU. No `dxil.dll` here, so the new program was not run through the validator locally. Whether title shaders use `v_pk_fmac_f16` with DPP is not measured. Fixes #2228 AI-assisted (Gemini 4 Neon found and wrote it, Claude Code reviewed, trimmed and verified it). No game data used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lower::valu puts a DPP instruction's cross-lane src0 in self.src0 before
lowering the operation; fsrc, src, half_src and v_cndmask_b32 read it for
source 0, but fmac_half read the operand directly, so v_pk_fmac_f16_dpp
multiplied the lane's own src0 in both halves. Read self.src0 for source
0 as the other readers do.

The test draws a 2x2 quad whose pixels swap their packed src0 through
quad_perm:[1,0,3,2].

Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:59:06 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 08:59 UTC · original

I ran the same quad-permute fixture on 940d32f and exact head 754e60e on native Windows. I made DXIL validation and the software-device creation mandatory. The DXC 1.9.2609 validator accepted both shaders on both revisions.

The render used Agility 1.620.2 and packaged WARP 1.0.22, with both loaded module paths checked. Reading the 2x2 target gave these low/high pairs in pixel order.

  • 940d32f: (6.5, 6), (10.5, 8), (14.5, 14), (18.5, 16). This failed the test because both halves used their own lane.
  • 754e60e: (10.5, 8), (6.5, 6), (18.5, 16), (14.5, 14). All four readbacks passed and matched the horizontal neighbour.

The inbox WARP device reported SM 6.2 and could not run this fixture. AI-assisted. Synthetic shaders only.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 08:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7157723886) I ran the same quad-permute fixture on 940d32f and exact head 754e60e on native Windows. I made DXIL validation and the software-device creation mandatory. The DXC 1.9.2609 validator accepted both shaders on both revisions. The render used Agility 1.620.2 and packaged WARP 1.0.22, with both loaded module paths checked. Reading the 2x2 target gave these low/high pairs in pixel order. - 940d32f: (6.5, 6), (10.5, 8), (14.5, 14), (18.5, 16). This failed the test because both halves used their own lane. - 754e60e: (10.5, 8), (6.5, 6), (18.5, 16), (14.5, 14). All four readbacks passed and matched the horizontal neighbour. The inbox WARP device reported SM 6.2 and could not run this fixture. AI-assisted. Synthetic shaders only.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 09:12 UTC · original

I also checked the DPP8 encoding from #2228 with a separate compute fixture. The existing pixel test covers DPP16. This fixture dispatches one group of 32 threads, swaps adjacent lanes within each eight-lane DPP8 group, and reads back both packed halves from every thread.

  • 940d32f: lane 0 returned [2, 1], its own-lane result. It should have returned [3, 5] from lane 1.
  • 754e60e: both halves matched the selected lane across all 32 readback words.

Native DXIL validation passed for both. The execution used app-local Agility 1.620.2 and WARP 1.0.22. The test-only b940374 sits directly on your current head and passes strict shader Clippy. If you fold in the test, please retain Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 09:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7158025166) I also checked the DPP8 encoding from #2228 with a separate compute fixture. The existing pixel test covers DPP16. This fixture dispatches one group of 32 threads, swaps adjacent lanes within each eight-lane DPP8 group, and reads back both packed halves from every thread. - `940d32f`: lane 0 returned `[2, 1]`, its own-lane result. It should have returned `[3, 5]` from lane 1. - `754e60e`: both halves matched the selected lane across all 32 readback words. Native DXIL validation passed for both. The execution used app-local Agility 1.620.2 and WARP 1.0.22. The test-only [`b940374`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/b94037410138cb972993173c1f72ac312df668fd) sits directly on your current head and passes strict shader Clippy. If you fold in the test, please retain `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
Author
Owner

@⁠BastienRodz on GitHub · 2026-11-25 09:15 UTC · original

Thanks for running the DPP8 case. I'll keep the PR to the one test: DPP16 and DPP8 both go through Lower::dpp before fmac_half reads self.src0, so the fix doesn't depend on the encoding, and your results here already record that DPP8 behaves the same. If the maintainer would rather have both encodings covered, I'm happy to fold in b940374 with your co-author line.

**@⁠BastienRodz** on GitHub · 2026-11-25 09:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7158077732) Thanks for running the DPP8 case. I'll keep the PR to the one test: DPP16 and DPP8 both go through `Lower::dpp` before `fmac_half` reads `self.src0`, so the fix doesn't depend on the encoding, and your results here already record that DPP8 behaves the same. If the maintainer would rather have both encodings covered, I'm happy to fold in b940374 with your co-author line.
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 10:39 UTC · original

Offline measurement on a retail dump

Result: no count change against main.

I merged head 754e60e4 onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 10:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7160001070) ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head 754e60e4 onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 13:31 UTC · original · edited 2026-11-26 00:22 UTC

Automated triage for the maintainers.

Merge candidate (worth a look). The head is unchanged (754e60e). Lower::fmac_half (crates/victory-shader/src/emit/lower.rs) reads source 0 of v_pk_fmac_f16 from the DPP lane-selected self.src0, as the other source helpers do; main still reads self.operand there. The new pixel test fails on main and passes with the fix on WARP and on an RTX 4070 (per a tester). CI check passes and it still merges cleanly into the current main.

On your reply: agreed. DPP src0_neg/src0_abs on a packed op is a separate question that needs AMD hardware evidence, and keeping it out of this PR doesn't change the verdict.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 13:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7163892282) · edited 2026-11-26 00:22 UTC <!-- victory-triage v1 head=754e60e44c7226c85748a5d65f3edf030c33ddd2 verdict=merge-candidate at=2026-11-26T00:22:56Z --> Automated triage for the maintainers. **Merge candidate (worth a look).** The head is unchanged (`754e60e`). `Lower::fmac_half` (`crates/victory-shader/src/emit/lower.rs`) reads source 0 of `v_pk_fmac_f16` from the DPP lane-selected `self.src0`, as the other source helpers do; `main` still reads `self.operand` there. The new pixel test fails on `main` and passes with the fix on WARP and on an RTX 4070 (per a tester). CI `check` passes and it still merges cleanly into the current `main`. On your reply: agreed. DPP `src0_neg`/`src0_abs` on a packed op is a separate question that needs AMD hardware evidence, and keeping it out of this PR doesn't change the verdict. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Mericas77 on GitHub · 2026-11-25 15:33 UTC · original

Tested on NVIDIA hardware (RTX 4070, Ada, wave32), Windows 11, Agility 1.620.2, on base 940d32f. Earlier runs here were WARP only.

#2229 (head 754e60e): packed_fmac_dpp_reads_the_swizzled_lane passes on the 4070 and on WARP. Without the lower.rs change it fails on the hardware with the rows unswapped ([6.5, 6], [10.5, 8], ... instead of [10.5, 8], [6.5, 6], ...).

Cross-check with #2266 (head 1483d37): the two fixes are equivalent. Each PR's test fails on main's lower.rs and passes with either PR's fix. #2266's test (row_shr:1 with bound_ctrl) gives 0x44004400 (2.0 × 2.0 in both halves) without a fix and 0 with one. Its comment says WARP refuses the pipeline. Here I only ran it on the hardware, as written. #2229's test does run on WARP on this machine.

Full crate (victory-shader --lib): 245 passed, 3 failed, 3 ignored with either PR. That is the same 3 failures main has on this card (stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware, see #1835). Neither PR adds a failure.

So #2229 looks fine to merge from the NVIDIA side, and #2266 is a duplicate of it.

One adjacent point, not covered by either PR: the DPP16 dword's src0_neg/src0_abs bits are decoded into v.neg/v.abs (gfx10/fields.rs, the 0xFA arm). For v_pk_fmac_f16, packed16 applies v.neg to the low half only (neg_hi stays 0 for a VOP2) and never reads v.abs. So a v_pk_fmac_f16_dpp with abs would silently lose it, and one with neg would negate only the low half. I can't check what RDNA 2 does with those bits on a packed op from NVIDIA hardware. Refusing modifiers with DPP on v_pk_fmac_f16 might be the safer choice until someone checks on an AMD card. That is only worth doing if the title actually emits that form.

AI-assisted.

**@⁠Mericas77** on GitHub · 2026-11-25 15:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7167018686) Tested on NVIDIA hardware (RTX 4070, Ada, wave32), Windows 11, Agility 1.620.2, on base `940d32f`. Earlier runs here were WARP only. **#2229 (head `754e60e`):** `packed_fmac_dpp_reads_the_swizzled_lane` passes on the 4070 **and** on WARP. Without the `lower.rs` change it fails on the hardware with the rows unswapped (`[6.5, 6]`, `[10.5, 8]`, ... instead of `[10.5, 8]`, `[6.5, 6]`, ...). **Cross-check with #2266 (head `1483d37`):** the two fixes are equivalent. Each PR's test fails on main's `lower.rs` and passes with either PR's fix. #2266's test (row_shr:1 with bound_ctrl) gives `0x44004400` (2.0 × 2.0 in both halves) without a fix and `0` with one. Its comment says WARP refuses the pipeline. Here I only ran it on the hardware, as written. #2229's test does run on WARP on this machine. **Full crate (`victory-shader --lib`):** 245 passed, 3 failed, 3 ignored with either PR. That is the same 3 failures main has on this card (`stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`, see #1835). Neither PR adds a failure. So #2229 looks fine to merge from the NVIDIA side, and #2266 is a duplicate of it. One adjacent point, not covered by either PR: the DPP16 dword's `src0_neg`/`src0_abs` bits are decoded into `v.neg`/`v.abs` (`gfx10/fields.rs`, the `0xFA` arm). For `v_pk_fmac_f16`, `packed16` applies `v.neg` to the low half only (`neg_hi` stays 0 for a VOP2) and never reads `v.abs`. So a `v_pk_fmac_f16_dpp` with `abs` would silently lose it, and one with `neg` would negate only the low half. I can't check what RDNA 2 does with those bits on a packed op from NVIDIA hardware. Refusing modifiers with DPP on `v_pk_fmac_f16` might be the safer choice until someone checks on an AMD card. That is only worth doing if the title actually emits that form. AI-assisted.
Author
Owner

@⁠BastienRodz on GitHub · 2026-11-25 15:35 UTC · original

Thanks @⁠Mericas77, it's useful to have it confirmed on Ada hardware, and the cross-check with #2266 too. On the DPP src0_neg/src0_abs bits for v_pk_fmac_f16: agreed, that's a separate question from the lane selection fixed here. I'd rather keep this PR to the one-line fix and leave modifier handling for a check on an AMD card, if the title turns out to emit that form.

**@⁠BastienRodz** on GitHub · 2026-11-25 15:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7167077375) Thanks @⁠Mericas77, it's useful to have it confirmed on Ada hardware, and the cross-check with #2266 too. On the DPP `src0_neg`/`src0_abs` bits for `v_pk_fmac_f16`: agreed, that's a separate question from the lane selection fixed here. I'd rather keep this PR to the one-line fix and leave modifier handling for a check on an AMD card, if the title turns out to emit that form.
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 08:48 UTC · original · approved these changes

v_pk_fmac_f16 with DPP reads src0 from the lane's own value. Tested locally: merged into main 940d32f69b, cargo test -p victory-shader --locked on macOS arm64 — 144 passed, 0 failed, 2 ignored. Approving.

**@⁠catminou4** on GitHub · 2026-11-25 08:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#pullrequestreview-6054377628) · **approved these changes** v_pk_fmac_f16 with DPP reads src0 from the lane's own value. Tested locally: merged into main 940d32f69b, `cargo test -p victory-shader --locked` on macOS arm64 — 144 passed, 0 failed, 2 ignored. Approving.
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-25 09:02 UTC · original · approved these changes

Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):

  • cargo test -p victory-shader --lib packed_fmac_dpp_reads_the_swizzled_lane — passed on both RTX 5090 hardware and VICTORY_D3D12_WARP=1
  • cargo clippy -p victory-shader --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean fix reading src0 from the DPP-selected lane in v_pk_fmac_f16, verified end-to-end on RTX 5090 + WARP. Looks great.

AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-25 09:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#pullrequestreview-6054568082) · **approved these changes** Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with `dxil.dll` validator): - `cargo test -p victory-shader --lib packed_fmac_dpp_reads_the_swizzled_lane` — passed on both RTX 5090 hardware and `VICTORY_D3D12_WARP=1` - `cargo clippy -p victory-shader --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean fix reading `src0` from the DPP-selected lane in `v_pk_fmac_f16`, verified end-to-end on RTX 5090 + WARP. Looks great. AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠fyernald on GitHub · 2026-11-25 17:33 UTC · original · approved these changes

Verified on RTX 3080 (617.42), Windows 10 (19045) plus WARP, main 67e8ae1 + #486 + #2596 (the suite crashes on NVIDIA without #2596, #2571). cargo test -p victory-shader --lib --locked -- --test-threads=1: 268 passed, 3 failed (the #1835 ones, also on the base). packed_fmac_dpp_reads_the_swizzled_lane passes on both adapters.

#2266 makes the identical change (self.src0 for k == 0 in the packed-operand read). This PR came first and has the more thorough test, so I'd take this one.

**@⁠fyernald** on GitHub · 2026-11-25 17:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#pullrequestreview-6062131510) · **approved these changes** Verified on **RTX 3080 (617.42), Windows 10 (19045)** plus WARP, `main` `67e8ae1` + #486 + #2596 (the suite crashes on NVIDIA without #2596, #2571). `cargo test -p victory-shader --lib --locked -- --test-threads=1`: 268 passed, 3 failed (the #1835 ones, also on the base). `packed_fmac_dpp_reads_the_swizzled_lane` passes on both adapters. #2266 makes the identical change (`self.src0` for `k == 0` in the packed-operand read). This PR came first and has the more thorough test, so I'd take this one.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 16:56 UTC · original

I checked this together with #2623, following the same-card RX 7900 XTX retest of its latest head. I merged 754e60e into a756f0f on the current 63bcca4 base. Git merged both lower.rs and valu_tests.rs cleanly.

On #2623 alone with this PR's test added, the DPP case leaves the rows unswapped. The exact combined heads swap both row pairs correctly. All 42 VALU tests passed, including the plain packed FMAC control, scalar clamp and rounding, and the directed subnormal/non-finite fixture. The separate f16_arithmetic_rounds_once comparison had zero mismatches. I used WARP 1.0.22 with Agility 1.620.2 and DXIL validation. Clippy and asset policy also passed.

These changes can be merged independently. The hardware evidence for the scalar fix is in the RX 7900 XTX retest. AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 16:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#issuecomment-7198283131) I checked this together with #2623, following the same-card RX 7900 XTX retest of its latest head. I merged `754e60e` into `a756f0f` on the current `63bcca4` base. Git merged both `lower.rs` and `valu_tests.rs` cleanly. On #2623 alone with this PR's test added, the DPP case leaves the rows unswapped. The exact combined heads swap both row pairs correctly. All 42 VALU tests passed, including the plain packed FMAC control, scalar clamp and rounding, and the directed subnormal/non-finite fixture. The separate `f16_arithmetic_rounds_once` comparison had zero mismatches. I used WARP 1.0.22 with Agility 1.620.2 and DXIL validation. Clippy and asset policy also passed. These changes can be merged independently. The hardware evidence for the scalar fix is in the [RX 7900 XTX retest](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2623). AI-assisted with Codex.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 17:01 UTC · original · approved these changes

Verified 754e60e44c7226c85748a5d65f3edf030c33ddd2 merged cleanly onto 63bcca43 on Windows 11 with an RTX 5090 (Wave32), WARP, dxil.dll (Windows SDK 10.0.26100.0), and VICTORY_D3D12_DEBUG=1.

Code review

  • Lower::valu computes the DPP-swizzled src0 via self.dpp(inst, d) and stores it in self.src0 for the duration of valu_op across both DPP16 and DPP8 encodings. Having Lower::fmac_half (crates/victory-shader/src/emit/lower.rs:6638-6651) take self.src0 when k == 0 brings v_pk_fmac_f16 in line with fsrc, src, half_src, and v_cndmask_b32 while leaving non-DPP lowering untouched.
  • crates/victory-shader/src/emit/lower.rs merges cleanly onto 63bcca43 at 520,645 bytes (< 524,288 limit; 520,942 bytes when co-merged with #2167, with zero conflict).

Verification

  • cargo xtask policy: 191 files ok.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings (default and --all-features): clean.
  • RTX 5090 + WARP + dxil.dll + VICTORY_D3D12_DEBUG=1: packed_fmac 2 passed, 0 failed (packed_fmac_accumulates_each_half and packed_fmac_dpp_reads_the_swizzled_lane, validated by dxil.dll and passing on both RTX 5090 hardware and WARP).
**@⁠fuzeofficlal** on GitHub · 2026-11-26 17:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/2229#pullrequestreview-6077995308) · **approved these changes** Verified `754e60e44c7226c85748a5d65f3edf030c33ddd2` merged cleanly onto `63bcca43` on Windows 11 with an RTX 5090 (Wave32), WARP, `dxil.dll` (Windows SDK 10.0.26100.0), and `VICTORY_D3D12_DEBUG=1`. ### Code review - `Lower::valu` computes the DPP-swizzled `src0` via `self.dpp(inst, d)` and stores it in `self.src0` for the duration of `valu_op` across both DPP16 and DPP8 encodings. Having `Lower::fmac_half` (`crates/victory-shader/src/emit/lower.rs:6638-6651`) take `self.src0` when `k == 0` brings `v_pk_fmac_f16` in line with `fsrc`, `src`, `half_src`, and `v_cndmask_b32` while leaving non-DPP lowering untouched. - `crates/victory-shader/src/emit/lower.rs` merges cleanly onto `63bcca43` at `520,645` bytes (`< 524,288` limit; `520,942` bytes when co-merged with `#2167`, with zero conflict). ### Verification - `cargo xtask policy`: `191 files ok`. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` (default and `--all-features`): clean. - RTX 5090 + WARP + `dxil.dll` + `VICTORY_D3D12_DEBUG=1`: `packed_fmac` **2 passed, 0 failed** (`packed_fmac_accumulates_each_half` and `packed_fmac_dpp_reads_the_swizzled_lane`, validated by `dxil.dll` and passing on both RTX 5090 hardware and WARP).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2229/head:github-bot/gh-2229'
git switch 'github-bot/gh-2229'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2229'
git switch 'github-bot/gh-2229'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2229'
git switch 'github-bot/gh-2229'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2229'
git switch 'main'
git merge --squash 'github-bot/gh-2229'
git switch 'main'
git merge --ff-only 'github-bot/gh-2229'
git switch 'main'
git merge 'github-bot/gh-2229'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!2229
No description provided.