victory-shader: handle unlinked v_interp_p1 in interp lowering #1099

Closed
github-bot wants to merge 1 commit from gh-pr/1099/head into gh-pr/1099/base
Owner

@⁠bartikele on GitHub · 2026-11-24 15:43 UTC · original
bartikele:shader-interp-first-half → main · +12 −0 · 1 files · 1 commits · closed without merging

Handle v_interp_p1_f32 / v_interp_p1ll_f16 / v_interp_p1lv_f16 when the interpolation site has no matching p2 in self.interps (e.g., dead or unlinked first half of an interpolation) by writing 0 instead of failing with the first half of an interpolation.

Using 0 rather than undef avoids DXIL validation errors (Instructions should not read uninitialized value) when downstream instructions read the destination register.

Tested with:

  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings
  • cargo test -p victory-shader --locked
**@⁠bartikele** on GitHub · 2026-11-24 15:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/1099) `bartikele:shader-interp-first-half` → `main` · +12 −0 · 1 files · 1 commits · closed without merging Handle `v_interp_p1_f32` / `v_interp_p1ll_f16` / `v_interp_p1lv_f16` when the interpolation site has no matching `p2` in `self.interps` (e.g., dead or unlinked first half of an interpolation) by writing `0` instead of failing with `the first half of an interpolation`. Using `0` rather than `undef` avoids DXIL validation errors (`Instructions should not read uninitialized value`) when downstream instructions read the destination register. Tested with: - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` - `cargo test -p victory-shader --locked`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:19:49 +00:00
github-bot closed this pull request 2026-11-26 04:19:49 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-24 16:01 UTC · original

Ran the whole victory-shader crate at 69695bd. The PR adds no test of its own, so this is a regression check rather than a proof of the new behaviour:

Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p victory-shader
120 passed; 0 failed; 1 ignored      (exit 0)

That matches main on this machine (ffe310e: 120 passed, 1 ignored), so the change does not disturb the existing lowering tests. What it cannot show is the new path itself: a frame where an unlinked v_interp_p1 appears would be the real check, and I have no game data here.

Not tested: the title (no game data), RDNA2/RDNA4 and Intel GPUs, release build.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the crate's tests, wrote this report; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-24 16:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1099#issuecomment-7137010495) Ran the whole `victory-shader` crate at `69695bd`. The PR adds no test of its own, so this is a regression check rather than a proof of the new behaviour: Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-shader 120 passed; 0 failed; 1 ignored (exit 0) ``` That matches `main` on this machine (`ffe310e`: 120 passed, 1 ignored), so the change does not disturb the existing lowering tests. What it cannot show is the new path itself: a frame where an unlinked `v_interp_p1` appears would be the real check, and I have no game data here. Not tested: the title (no game data), RDNA2/RDNA4 and Intel GPUs, release build. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the crate's tests, wrote this report; no game data was used.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:29 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 69695bd: cargo test -p victory-shader passes, 120 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1099#issuecomment-7137749025) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 69695bd: `cargo test -p victory-shader` passes, 120 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠bartikele on GitHub · 2026-11-24 17:15 UTC · original

Closing this PR based on the review feedback from @⁠mercuryVM and @⁠DoubleD17 — dead v_interp_p1 sites are already skipped via Val::Missing, so the 28 programs actually consume the intermediate P0 + I*(P1 - P0) result, and writing 0 would silently compute wrong values. Keeping the refusal until proper GetAttributeAtVertex lowering is implemented. Thanks for catching that!

**@⁠bartikele** on GitHub · 2026-11-24 17:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/1099#issuecomment-7138913788) Closing this PR based on the review feedback from @⁠mercuryVM and @⁠DoubleD17 — dead `v_interp_p1` sites are already skipped via `Val::Missing`, so the 28 programs actually consume the intermediate `P0 + I*(P1 - P0)` result, and writing `0` would silently compute wrong values. Keeping the refusal until proper `GetAttributeAtVertex` lowering is implemented. Thanks for catching that!

Pull request closed

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!1099
No description provided.