shader/wave: decode f16 inline float constants for v_add_f16 #30

Closed
Androtim wants to merge 0 commits from upstream-pr/30 into main
Androtim commented 2026-11-28 09:19:36 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T09:19:36Z.


Summary

Port Marvisak/VIctory 3578e3 (#2493) into crates/victory-shader/src/emit/wave.rs:

  • In simulate(), decode RDNA Operand::Const(240..=248) inline float constants as IEEE 754 inary16 ( 16) bit patterns (x3800, xB800, x3C00, xBC00, x4000, xC000, x4400, xC400, x3118) when simulating _add_f16 rather than falling back to 32 inline constants via crate::resource::inline(c).
  • Added unit test _add_f16_inline_float_constants_decode_as_f16 verifying all 9 240..=248 inline float constants decode to their Shape::K(f16_bits) values and prevent _add_f16 with non-zero inline constants from matching Shape::Active(Op::AddH, ...) while 128 (.0) still matches.

Rig Specs Tested On

  • CPU: 13th Gen Intel(R) Core(TM) i7-13700F
  • GPU & VRAM: NVIDIA GeForce RTX 4060 Ti (8 GiB VRAM)
  • System RAM: 32 GiB
  • OS & GPU Driver: Windows 11 Home (Build 26300) / Driver 32.0.16.2124

Run Settings & Profile

  • Build & Commit SHA:
    elease @ $sha (static/unit/compile verification + CI full workspace suite; no separate live runtime capture for this unit-tested shader wave-constant decoding fix)
  • Console Profile & Internal Resolution / Scale: N/A (unit/static verification; full ictory-shader + ictory-gpu suite verified via CI)
  • Ray Tracing: N/A
  • Upscaling: N/A
  • Frame Generation: N/A
  • Launcher Command / Preset & Extra VICTORY_ Overrides:* N/A
  • Scene / Area & Session Length: N/A

Measurements & Verification

  • Base FPS (without Frame Gen): N/A (compiler/wave-pass fix)
  • Frame-Gen FPS (if enabled): N/A
  • VRAM / RAM Usage: N/A
  • Crashes / DRED Resets: N/A
  • Automated Checks:
    • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (sset policy: 294 files ok)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask (6 passed; 0 failed)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit:👋:tests (10 passed; 0 failed; 284 filtered out)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::wave64_tests (12 passed; 0 failed; 282 filtered out)
    • cargo +1.98.1-x86_64-pc-windows-gnu build --release -p victory + objdump -p check (0 non-system MinGW DLLs)
    • Full ictory-shader + ictory-gpu test suite via GitHub Actions CI (local SDK dxil.dll 101.6.2104.33 fails 3 pre-existing PSV0 validator tests unrelated to wave.rs)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5538670749 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/30). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T09:19:36Z. --- ## Summary Port Marvisak/VIctory 3578e3 (#2493) into crates/victory-shader/src/emit/wave.rs: - In simulate(), decode RDNA Operand::Const(240..=248) inline float constants as IEEE 754 inary16 ( 16) bit patterns (x3800, xB800, x3C00, xBC00, x4000, xC000, x4400, xC400, x3118) when simulating _add_f16 rather than falling back to 32 inline constants via crate::resource::inline(c). - Added unit test _add_f16_inline_float_constants_decode_as_f16 verifying all 9 240..=248 inline float constants decode to their Shape::K(f16_bits) values and prevent _add_f16 with non-zero inline constants from matching Shape::Active(Op::AddH, ...) while 128 (.0) still matches. ## Rig Specs Tested On - **CPU:** 13th Gen Intel(R) Core(TM) i7-13700F - **GPU & VRAM:** NVIDIA GeForce RTX 4060 Ti (8 GiB VRAM) - **System RAM:** 32 GiB - **OS & GPU Driver:** Windows 11 Home (Build 26300) / Driver 32.0.16.2124 ## Run Settings & Profile - **Build & Commit SHA:** elease @ $sha (static/unit/compile verification + CI full workspace suite; no separate live runtime capture for this unit-tested shader wave-constant decoding fix) - **Console Profile & Internal Resolution / Scale:** N/A (unit/static verification; full ictory-shader + ictory-gpu suite verified via CI) - **Ray Tracing:** N/A - **Upscaling:** N/A - **Frame Generation:** N/A - **Launcher Command / Preset & Extra VICTORY_* Overrides:** N/A - **Scene / Area & Session Length:** N/A ## Measurements & Verification - **Base FPS (without Frame Gen):** N/A (compiler/wave-pass fix) - **Frame-Gen FPS (if enabled):** N/A - **VRAM / RAM Usage:** N/A - **Crashes / DRED Resets:** N/A - **Automated Checks:** - [x] cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (sset policy: 294 files ok) - [x] cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask (6 passed; 0 failed) - [x] cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (0 warnings) - [x] cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings (0 warnings) - [x] cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::wave::tests (10 passed; 0 failed; 284 filtered out) - [x] cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::wave64_tests (12 passed; 0 failed; 282 filtered out) - [x] cargo +1.98.1-x86_64-pc-windows-gnu build --release -p victory + objdump -p check (0 non-system MinGW DLLs) - [ ] Full ictory-shader + ictory-gpu test suite via GitHub Actions CI (local SDK dxil.dll 101.6.2104.33 fails 3 pre-existing PSV0 validator tests unrelated to wave.rs)
Androtim commented 2026-11-28 10:02:59 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T10:02:59Z.


Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7237635651 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/30#issuecomment-7237635651). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T10:02:59Z. --- <!-- minivi-triage v1 head=1be27019a3ab75d29f5d67aa80f3d8b6ef1187ad verdict=needs-rebase ci=passing at=2026-11-28T21:02:58Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-11-28 21:18:12 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:18:12Z.


Closing as superseded duplicate of merged PR #16.

<!-- greyfinch-sync:Androtim/MiniVI:comment:7245919289 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/30#issuecomment-7245919289). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T21:18:12Z. --- Closing as superseded duplicate of merged PR #16.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Androtim/MiniVI!30
No description provided.