Shaders: preserve live interpolation values (on #453) #1738

Closed
github-bot wants to merge 10 commits from github-bot/gh-1738 into main AGit
Owner

@⁠jaschinski97-ops on GitHub · 2026-11-24 21:40 UTC · original
jaschinski97-ops:fix/upstream-live-interpolation → main · +1401 −138 · 6 files · 10 commits · closed without merging

Keep the real value of an interpolation first half, P0 + i*(P1-P0), when it is exported alone, consumed beside a folded pair, used through a phi, or used as another interpolation's weight. Omitting it can refuse translation or lose the partial result.

Includes #453's barycentric/Weighted infrastructure, with its original author commit retained. Updated against main 940d32f, preserving Elsewhere/unless proofs, packed input/signature handling, initialized pixel SGPRs, and the merged f16 output-modifier fix in #1696. Coordination: PR #1738 in #1633. This complements #1099: replacing an unlinked first half with zero does not preserve its value.

  • Track demanded first halves through SSA dependencies and phis, retaining the unwritten destination half of f16 P2.

  • Allow P0 vertex reads beside ordinary interpolation of the same row: retain flat vertex access and evaluate the interpolated value from vertices. P0-only and ordinary-only paths retain their existing feature requirements.

  • Avoid extra barycentric requirements for a dead first half overwritten under entry EXEC or a safe ordinary pair after register reuse. Keep masked-move dependencies.

  • Resolve conditional pairs using the existing avoids proof before final liveness/signature selection. Unsafe pairs use actual native weights, including transitive first-half dependencies.

  • Preserve op_sel destination halves, omod and clamp in both ordinary and Weighted f16 paths.

Validation: Windows 11, NVIDIA GeForce RTX 3080, driver 32.0.16.2140; Rust 1.98.1 Windows GNU.

  • Standalone, dead-overwrite, safe-ordinary/no-extra-feature and f16-preservation regressions fail before their respective corrections.

  • Final targeted suite: 20 barycentric tests pass, including real GPU rendering. An 8x8 synthetic triangle checks 6,656 channel results across RTX 3080 and WARP: standalone f32, partial+full f32, exact f16 bit preservation, computed i/j in place, high-half writes with omod/clamp and a preserved low-half marker, and P0 before/after an interpolation in the same/different channel.

  • CPU tests also cover phi reads, masked moves, transitive computed weights, upstream ordinary-register reuse and output modifiers. Clippy, all targets/all features, warnings denied: passed. Asset policy passed.

Fixtures contain synthetic instructions and vertex data only. No game boot, image-quality or FPS claim is made. Hosts without barycentrics skip render checks; existing barycentric-mode restrictions remain.

AI-assisted with Codex: separate worktrees for research and implementation, followed by independent reviews and coordinator GPU validation. GPU test processes were serialized centrally.

Combined local validation before the P0 follow-up (main 940d32f + all three contributions, integration cfa116d):

  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings: passed.

  • cargo test --locked --workspace --all-features --no-fail-fast -- --test-threads=1: completed unfiltered; six tests fail. Shader suite: 271 passed, 3 failed, 3 ignored. GPU suite: 145 passed, 2 failed, 2 ignored. The five GPU/shader failures were independently reproduced on bare main 940d32f. The sixth is loads_binds_and_calls_probe: its unchanged fixture passes MSVC /DELAYLOAD to the local GNU linker, which rejects it.

  • The baseline failures are dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views, a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, and gathers_at_a_level_match_the_hardware. The full local workspace run is therefore explicitly not reported as passing.

  • New regression tests and the repository asset policy pass. All three PRs also pass GitHub's Windows MSVC CI. Green CI does not substitute for the separately reported RTX readback evidence.

P0 follow-up 08e2e07: the synthetic mixed P0/ordinary-row case failed before the correction with one input interpolated two ways; all four order/channel combinations now validate and render correctly. Twenty targeted tests, shader Clippy (all targets/all features, warnings denied), and asset policy pass. Claim: #1633. Full current-head shader rerun: 267 passed, 3 failed, 3 ignored. The three failures are exactly the independently reproduced main-940d32f heap/stride/gather baseline cases listed above. Windows MSVC GitHub CI passes on 08e2e07 (run https://github.com/Marvisak/VIctory/actions/runs/45600161321).

Refresh against main 67e8ae1 (2026-11-25)

Current-main refresh: head 9d59892 merges main 67e8ae1401df112248aed36d0024483181b718b7 and adapts the new counted v_movreld input-initialization proof to lazy barycentric reads. The overwrite proof is checked before loading a phi's original input, so a complete overwrite still introduces no BARYCENTRICS requirement. The upstream test's former unsupported-barycentric outcomes now verify the retained input instead of rejecting a newly supported shader: 2 complete-overwrite cases have no barycentric feature/input, and all 13 other cases retain exactly one barycentric element. All 15 generated shaders pass the local DXIL validator.

On the refreshed stack: 17 general emitter tests and all 20 interpolation tests pass, including the 13 render cases / 6,656 channel checks on RTX 3080 and built-in WARP. Workspace Clippy, all targets/all features with warnings denied, passes on the combined stack. The asset policy passes. GitHub Windows MSVC CI: https://github.com/Marvisak/VIctory/actions/runs/45652319615 (passed on this head). Earlier full-suite results above are explicitly tied to their older main revisions; no new full native-workspace pass is claimed.

Coordination bookkeeping: the earlier claim label was incorrect; see the correction. The completed P0 follow-up is assigned as NEW-120.

**@⁠jaschinski97-ops** on GitHub · 2026-11-24 21:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738) `jaschinski97-ops:fix/upstream-live-interpolation` → `main` · +1401 −138 · 6 files · 10 commits · closed without merging Keep the real value of an interpolation first half, P0 + i*(P1-P0), when it is exported alone, consumed beside a folded pair, used through a phi, or used as another interpolation's weight. Omitting it can refuse translation or lose the partial result. Includes #453's barycentric/Weighted infrastructure, with its original author commit retained. Updated against main 940d32f, preserving Elsewhere/unless proofs, packed input/signature handling, initialized pixel SGPRs, and the merged f16 output-modifier fix in #1696. Coordination: PR #1738 in #1633. This complements #1099: replacing an unlinked first half with zero does not preserve its value. - Track demanded first halves through SSA dependencies and phis, retaining the unwritten destination half of f16 P2. - Allow P0 vertex reads beside ordinary interpolation of the same row: retain flat vertex access and evaluate the interpolated value from vertices. P0-only and ordinary-only paths retain their existing feature requirements. - Avoid extra barycentric requirements for a dead first half overwritten under entry EXEC or a safe ordinary pair after register reuse. Keep masked-move dependencies. - Resolve conditional pairs using the existing avoids proof before final liveness/signature selection. Unsafe pairs use actual native weights, including transitive first-half dependencies. - Preserve op_sel destination halves, omod and clamp in both ordinary and Weighted f16 paths. Validation: Windows 11, NVIDIA GeForce RTX 3080, driver 32.0.16.2140; Rust 1.98.1 Windows GNU. - Standalone, dead-overwrite, safe-ordinary/no-extra-feature and f16-preservation regressions fail before their respective corrections. - Final targeted suite: 20 barycentric tests pass, including real GPU rendering. An 8x8 synthetic triangle checks 6,656 channel results across RTX 3080 and WARP: standalone f32, partial+full f32, exact f16 bit preservation, computed i/j in place, high-half writes with omod/clamp and a preserved low-half marker, and P0 before/after an interpolation in the same/different channel. - CPU tests also cover phi reads, masked moves, transitive computed weights, upstream ordinary-register reuse and output modifiers. Clippy, all targets/all features, warnings denied: passed. Asset policy passed. Fixtures contain synthetic instructions and vertex data only. No game boot, image-quality or FPS claim is made. Hosts without barycentrics skip render checks; existing barycentric-mode restrictions remain. AI-assisted with Codex: separate worktrees for research and implementation, followed by independent reviews and coordinator GPU validation. GPU test processes were serialized centrally. Combined local validation before the P0 follow-up (main 940d32f + all three contributions, integration cfa116d): - `cargo clippy --locked --workspace --all-targets --all-features -- -D warnings`: passed. - `cargo test --locked --workspace --all-features --no-fail-fast -- --test-threads=1`: completed unfiltered; six tests fail. Shader suite: 271 passed, 3 failed, 3 ignored. GPU suite: 145 passed, 2 failed, 2 ignored. The five GPU/shader failures were independently reproduced on bare main 940d32f. The sixth is `loads_binds_and_calls_probe`: its unchanged fixture passes MSVC `/DELAYLOAD` to the local GNU linker, which rejects it. - The baseline failures are `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`, `a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, and `gathers_at_a_level_match_the_hardware`. The full local workspace run is therefore explicitly not reported as passing. - New regression tests and the repository asset policy pass. All three PRs also pass GitHub's Windows MSVC CI. Green CI does not substitute for the separately reported RTX readback evidence. P0 follow-up 08e2e07: the synthetic mixed P0/ordinary-row case failed before the correction with `one input interpolated two ways`; all four order/channel combinations now validate and render correctly. Twenty targeted tests, shader Clippy (all targets/all features, warnings denied), and asset policy pass. Claim: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633. Full current-head shader rerun: 267 passed, 3 failed, 3 ignored. The three failures are exactly the independently reproduced main-940d32f heap/stride/gather baseline cases listed above. Windows MSVC GitHub CI passes on 08e2e07 (run https://github.com/Marvisak/VIctory/actions/runs/45600161321). ### Refresh against main 67e8ae1 (2026-11-25) Current-main refresh: head `9d59892` merges main `67e8ae1401df112248aed36d0024483181b718b7` and adapts the new counted `v_movreld` input-initialization proof to lazy barycentric reads. The overwrite proof is checked before loading a phi's original input, so a complete overwrite still introduces no BARYCENTRICS requirement. The upstream test's former unsupported-barycentric outcomes now verify the retained input instead of rejecting a newly supported shader: 2 complete-overwrite cases have no barycentric feature/input, and all 13 other cases retain exactly one barycentric element. All 15 generated shaders pass the local DXIL validator. On the refreshed stack: 17 general emitter tests and all 20 interpolation tests pass, including the 13 render cases / 6,656 channel checks on RTX 3080 and built-in WARP. Workspace Clippy, all targets/all features with warnings denied, passes on the combined stack. The asset policy passes. GitHub Windows MSVC CI: https://github.com/Marvisak/VIctory/actions/runs/45652319615 (passed on this head). Earlier full-suite results above are explicitly tied to their older main revisions; no new full native-workspace pass is claimed. Coordination bookkeeping: the earlier claim label was incorrect; see the [correction](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633). The completed P0 follow-up is assigned as NEW-120.
Pixel programs that use the I/J VGPRs as plain values (custom
interpolation, math on the weights) failed with "barycentrics read
directly". They are now channels y and z of an SV_Barycentrics input
(SM 6.1+, the emitter targets 6.6) declared with the interpolation mode
of their kind (perspective/linear, center/centroid/sample), one element
per mode (semantic index 0 and 1), with the Barycentrics shader flag and
SFI0 feature. GFX10 interpolates P0 + i (P1 - P0) + j (P2 - P0) with P0
the provoking vertex, which the host's barycentrics weight as vertex 0,
so i = y and j = z.

The VGPRs are loaded on first use as a value, so programs that only feed
them to v_interp_* declare nothing new. A console signature's own
SV_Barycentrics row (D3D name 23) is parsed and reused. Pull-model
barycentrics stay unsupported.

SV_Barycentrics is left unpacked (no row, packing location -1), like
other non-packed system values: the DXIL validator refuses it in a row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
v_interp_p1/p2 (and the f16 forms) fed with an i or j that is not the
loaded input VGPR now evaluate each half as the hardware does: P0 + i
(P1 - P0) for the first, the old dst + j (P2 - P0) for the second, with
the vertex values read by attributeAtVertex. That needs the element
declared constant, so every other interpolation of the same attribute
row is weighed from its vertices with SV_Barycentrics of its mode, and
flat reads stay loadInput of the provoking vertex. v_interp_mov of P10
and P20 reads P1 - P0 and P2 - P0 the same way when the program also
interpolates the attribute (so the hardware holds the deltas); alone it
is still refused.

The translate command's tally counts Interp::Weighted as interpolated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
lower.rs: keep the PR's lazy barycentric VGPR inputs next to main's
`Reg::S(n)` arm for uninitialized SGPRs. mod.rs: the barycentric test
helper passes the structure to resource::track, which now takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
DXIL allows at most two SV_Barycentrics input elements, one perspective
and one linear. A program reading both perspective center and centroid
I/J as values declared two perspective elements, which the validator
refuses ("There can only be up to two input attributes of
SV_Barycentrics with different perspective interpolation mode").

The second mode of the same kind is now an Unsupported reason rather
than a second element. Reusing the first element would hand centroid
reads center weights (or the reverse), which differ on edge pixels: a
silent wrong value. Before this PR such reads were refused anyway.

Test: center + centroid values are refused; centroid alone still
translates with one element.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:21 +00:00
Author
Owner

@⁠HocotateGuy15 on GitHub · 2026-11-24 21:50 UTC · original

Independent offline verification for a cutscene shader that the runtime producer trace linked to two missing 1440p texture outputs. On Windows 10 22H2 / RTX 3070, the exact pixel-shader container previously failed translation with "the first half of an interpolation" at its color export. The trace followed the unavailable first-half value through SSA merges to that export. PR #1293 and PR #683 each left this specific failure in place in local offline comparisons.

I tested this PR at d39a027 on the same container, selected by its runtime BLAKE3 prefix 7778fb128a65511e. It translated successfully, and Microsoft's DXIL validator accepted the emitted shader. Five focused first-half unit tests also passed in the integrated diagnostics build. This verifies the identified shader translation failure, while cutscene rendering and the separate driver hang still need a runtime comparison. No game content or disassembly attached.

AI-assisted diagnostics and write-up.

**@⁠HocotateGuy15** on GitHub · 2026-11-24 21:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7145464716) Independent offline verification for a cutscene shader that the runtime producer trace linked to two missing 1440p texture outputs. On Windows 10 22H2 / RTX 3070, the exact pixel-shader container previously failed translation with "the first half of an interpolation" at its color export. The trace followed the unavailable first-half value through SSA merges to that export. PR #1293 and PR #683 each left this specific failure in place in local offline comparisons. I tested this PR at d39a027 on the same container, selected by its runtime BLAKE3 prefix 7778fb128a65511e. It translated successfully, and Microsoft's DXIL validator accepted the emitted shader. Five focused first-half unit tests also passed in the integrated diagnostics build. This verifies the identified shader translation failure, while cutscene rendering and the separate driver hang still need a runtime comparison. No game content or disassembly attached. AI-assisted diagnostics and write-up.
Author
Owner

@⁠HocotateGuy15 on GitHub · 2026-11-24 21:56 UTC · original

Runtime follow-up on the RTX 3070 / Windows 10 run with #1738 d39a027 added to the Agility, Wave64, buffer-transition, bounded root SRV, packed render-target and producer trace test stack. With the final presentation path enabled, the log explicitly reports that the previously rejected pixel shader translated. The prior interpolation error and producer warnings naming that shader were absent. Black frames still occurred, and the process eventually exited with DXGI_ERROR_DEVICE_HUNG following a 32-list submission. The DRED range contains a mesh dispatch (operation 42) without a marker identifying its pipeline. Windows recorded NVIDIA display-driver recovery one second later.

This verifies the shader fix in-game. The overall black-screen and driver-reset issues remain open. AI-assisted log analysis.

**@⁠HocotateGuy15** on GitHub · 2026-11-24 21:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7145590739) Runtime follow-up on the RTX 3070 / Windows 10 run with #1738 d39a027 added to the Agility, Wave64, buffer-transition, bounded root SRV, packed render-target and producer trace test stack. With the final presentation path enabled, the log explicitly reports that the previously rejected pixel shader translated. The prior interpolation error and producer warnings naming that shader were absent. Black frames still occurred, and the process eventually exited with DXGI_ERROR_DEVICE_HUNG following a 32-list submission. The DRED range contains a mesh dispatch (operation 42) without a marker identifying its pipeline. Windows recorded NVIDIA display-driver recovery one second later. This verifies the shader fix in-game. The overall black-screen and driver-reset issues remain open. AI-assisted log analysis.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:35 UTC · original · edited 2026-11-25 16:46 UTC

Automated triage for the maintainers.

Needs work.

What changed since the last triage: the head merges main 67e8ae1 and adds 9d59892. That commit moves the counted v_movreld overwrite proof ahead of lazy barycentric loading in the phi lowering (emit/lower.rs), and updates the indexed-input test in emit/mod.rs to expect a retained SV_Barycentrics element instead of a refusal. It looks consistent with the rest of the PR, it merges cleanly, and CI passes (check).

The content itself (first-half liveness in io.rs, Interp::Weighted, lazy SV_Barycentrics reads, P0 beside interpolation) is still backed by the render tests and the archive counts posted above. What blocks it is unchanged: the PR still carries all of #453 (21c585a…88b34a4, by another author). #453 is open, and its author hasn't said anywhere that this PR should replace it. The description now says it includes #453 with authorship kept, but that alone doesn't settle it. Please agree with #453's author on one route:

  • this PR supersedes #453: they say so in #453 and close it; or
  • #453 is rebased and lands first, and this PR is rebased on top so it shows only your commits.

The earlier suggestion to split out the P0-beside-interpolation fix (08e2e07) still stands. It would make review much easier.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7149724188) · edited 2026-11-25 16:46 UTC <!-- victory-triage v1 head=9d598928c7b654976327b4baae0b9d7fd4a79968 verdict=needs-work at=2026-11-25T16:44:32Z --> Automated triage for the maintainers. **Needs work.** What changed since the last triage: the head merges `main` `67e8ae1` and adds `9d59892`. That commit moves the counted `v_movreld` overwrite proof ahead of lazy barycentric loading in the phi lowering (`emit/lower.rs`), and updates the indexed-input test in `emit/mod.rs` to expect a retained `SV_Barycentrics` element instead of a refusal. It looks consistent with the rest of the PR, it merges cleanly, and CI passes (`check`). The content itself (first-half liveness in `io.rs`, `Interp::Weighted`, lazy `SV_Barycentrics` reads, P0 beside interpolation) is still backed by the render tests and the archive counts posted above. What blocks it is unchanged: the PR still carries all of #453 (`21c585a`…`88b34a4`, by another author). #453 is open, and its author hasn't said anywhere that this PR should replace it. The description now says it includes #453 with authorship kept, but that alone doesn't settle it. Please agree with #453's author on one route: - this PR supersedes #453: they say so in #453 and close it; or - #453 is rebased and lands first, and this PR is rebased on top so it shows only your commits. The earlier suggestion to split out the P0-beside-interpolation fix (`08e2e07`) still stands. It would make review much easier. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

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

Tested #1738 (d39a027) against its base ffe310e with victory translate shaders.rpf on my own copy of the shader pack (Windows, RTX 2080 SUPER, release build). Counts only.

ffe310e #1738
VS/PS DXIL emitted 12,231 of 14,027 12,447 of 14,234
the first half of an interpolation 28 0
an interpolation with computed barycentrics 207 0
barycentrics read directly 13 0
an opaque lane mask 29 61

Net +216 VS/PS programs. The 32 new "opaque lane mask" refusals are programs that now get past I/O and stop later; compute (1,441) and mesh (8,214) are unchanged. The 28 first halves match mercuryVM's count on #1099, and from the code a first half read as data keeps P0 + i·P10 rather than 0, which was the concern there.

For comparison, #1682 on the same base gets 12,419: it clears the 207 + 13 but still refuses the 28 first halves.

Not checked: DXIL validation (the Windows SDK 10.0.19041 dxil.dll crashes with 0xC0000005 under --validate, on ffe310e too) and in-game rendering. AI-assisted.

**@⁠whamre** on GitHub · 2026-11-25 08:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7157729808) Tested #1738 (d39a027) against its base ffe310e with `victory translate shaders.rpf` on my own copy of the shader pack (Windows, RTX 2080 SUPER, release build). Counts only. | | ffe310e | #1738 | |---|---|---| | VS/PS DXIL emitted | 12,231 of 14,027 | 12,447 of 14,234 | | the first half of an interpolation | 28 | 0 | | an interpolation with computed barycentrics | 207 | 0 | | barycentrics read directly | 13 | 0 | | an opaque lane mask | 29 | 61 | Net +216 VS/PS programs. The 32 new "opaque lane mask" refusals are programs that now get past I/O and stop later; compute (1,441) and mesh (8,214) are unchanged. The 28 first halves match mercuryVM's count on #1099, and from the code a first half read as data keeps P0 + i·P10 rather than 0, which was the concern there. For comparison, #1682 on the same base gets 12,419: it clears the 207 + 13 but still refuses the 28 first halves. Not checked: DXIL validation (the Windows SDK 10.0.19041 dxil.dll crashes with 0xC0000005 under `--validate`, on ffe310e too) and in-game rendering. AI-assisted.
Author
Owner

@⁠whamre on GitHub · 2026-11-25 09:10 UTC · original

Follow-up with validation, using dxil.dll from DXC v1.9.2609 (my SDK validator was the crashing one). Same shader pack, per program, ffe310e → #1738:

  • VS/PS validated: 12,155 → 12,365 (+210). None go from validated to failing.
  • All 28 "the first half of an interpolation" programs now validate.
  • "an interpolation with computed barycentrics": 172 of 207 validate; 32 stop at "an opaque lane mask"; 3 fail with "signature element … has interpolation mode that differs from another element packed into the same row" (about 50 programs already fail with that on ffe310e).
  • "barycentrics read directly": 10 of 13 validate; 3 fail with "out of bound coord must be undef" (the existing sample-lowering issue).
  • Compute and mesh unchanged.

Still not checked in game. AI-assisted.

**@⁠whamre** on GitHub · 2026-11-25 09:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7157983624) Follow-up with validation, using dxil.dll from DXC v1.9.2609 (my SDK validator was the crashing one). Same shader pack, per program, ffe310e → #1738: - VS/PS validated: 12,155 → 12,365 (+210). None go from validated to failing. - All 28 "the first half of an interpolation" programs now validate. - "an interpolation with computed barycentrics": 172 of 207 validate; 32 stop at "an opaque lane mask"; 3 fail with "signature element … has interpolation mode that differs from another element packed into the same row" (about 50 programs already fail with that on ffe310e). - "barycentrics read directly": 10 of 13 validate; 3 fail with "out of bound coord must be undef" (the existing sample-lowering issue). - Compute and mesh unchanged. Still not checked in game. AI-assisted.
Author
Owner

@⁠jaschinski97-ops on GitHub · 2026-11-25 11:00 UTC · original

Current head 08e2e07 includes main 940d32f and the synthetic-test interface updates. The needs-rebase triage on d39a027 is addressed. The previous 351dc2d CI passed; this new follow-up is uploaded for CI.

The archive measurements above concern the old ffe310e/d39a027 stack. I have not independently run that archive. Current main already harmonizes unused generic-float siblings in a signature row, so the three old row-validator reports do not by themselves establish the same defect on the current head.

A separate current failure is now reproduced and fixed: a P0 vertex read beside an ordinary interpolation of the same row returned one input interpolated two ways. P0 remains flat; the interpolated value reads the vertices with its proper weights. Four combinations (P0 before/after the pair, same/another channel) validate and render correctly on RTX 3080 and WARP. P0-only and ordinary-only regressions both keep BARYCENTRICS unset.

Final targeted run: 20 tests pass, including 13 render cases / 6,656 checked channel results; Clippy all targets/all features with warnings denied and asset policy pass. Full shader/CI reruns will be recorded in the description. Follow-up claim: #1633. #1682's broader, now-closed manual-row work and #2038's isolated P10 handling were checked for overlap. Synthetic fixtures only, no title data or game-playability claim. AI-assisted with independent coordinator review and GPU checks.

**@⁠jaschinski97-ops** on GitHub · 2026-11-25 11:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7160458897) Current head 08e2e07 includes main 940d32f and the synthetic-test interface updates. The needs-rebase triage on d39a027 is addressed. The previous 351dc2d CI passed; this new follow-up is uploaded for CI. The archive measurements above concern the old ffe310e/d39a027 stack. I have not independently run that archive. Current main already harmonizes unused generic-float siblings in a signature row, so the three old row-validator reports do not by themselves establish the same defect on the current head. A separate current failure is now reproduced and fixed: a P0 vertex read beside an ordinary interpolation of the same row returned `one input interpolated two ways`. P0 remains flat; the interpolated value reads the vertices with its proper weights. Four combinations (P0 before/after the pair, same/another channel) validate and render correctly on RTX 3080 and WARP. P0-only and ordinary-only regressions both keep BARYCENTRICS unset. Final targeted run: 20 tests pass, including 13 render cases / 6,656 checked channel results; Clippy all targets/all features with warnings denied and asset policy pass. Full shader/CI reruns will be recorded in the description. Follow-up claim: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633. #1682's broader, now-closed manual-row work and #2038's isolated P10 handling were checked for overlap. Synthetic fixtures only, no title data or game-playability claim. AI-assisted with independent coordinator review and GPU checks.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:31 UTC · original

Code review and RTX 5090 + WARP + DXIL verification at head 9d598928c7b6 merged onto main (63bcca43c6a0):

  • 512 KiB file-size policy blocker (xtask):
    • Code merges cleanly (carrying stacked #453 commits), but crates/victory-shader/src/emit/lower.rs reaches 533,630 bytes (+9,342 B over the 524,288-byte limit), causing cargo xtask policy to fail:
      POLICY: crates/victory-shader/src/emit/lower.rs: 533630 bytes exceeds the 524288-byte limit
    • Moving the interpolation/barycentric lowering helpers (barycentric, interp, eval_channel, vertex_input) into a submodule under emit/lower/ will clear the policy gate cleanly.
  • Logic & hardware results:
    • Interp::Weighted / retain_live_first_halves (io.rs:495-610), lazy_barycentric (lower.rs:1442-1778), overwritten_movreld_edge priority in fill_phis, and translate.rs:709 accounting all checked out cleanly.
    • clippy (default + --features diagnostics + victory): 0 warnings; io::tests 7/7; emit::lower::tests 33/33; emit::tests 17/17; emit::barycentric_tests 20/20 passed (including first_half_values_render_on_hardware_and_warp across all 13 render cases on RTX 5090 + WARP); emit::semantics_tests 34/34 on both RTX 5090 and WARP (1 ignored).

Implementation and hardware rendering look great — just needs extracting helpers out of lower.rs to pass xtask policy.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7179850020) Code review and RTX 5090 + WARP + DXIL verification at head `9d598928c7b6` merged onto `main` (`63bcca43c6a0`): - **512 KiB file-size policy blocker (`xtask`)**: - Code merges cleanly (carrying stacked `#453` commits), but `crates/victory-shader/src/emit/lower.rs` reaches **`533,630` bytes** (`+9,342` B over the `524,288`-byte limit), causing `cargo xtask policy` to fail: `POLICY: crates/victory-shader/src/emit/lower.rs: 533630 bytes exceeds the 524288-byte limit` - Moving the interpolation/barycentric lowering helpers (`barycentric`, `interp`, `eval_channel`, `vertex_input`) into a submodule under `emit/lower/` will clear the policy gate cleanly. - **Logic & hardware results**: - `Interp::Weighted` / `retain_live_first_halves` (`io.rs:495-610`), `lazy_barycentric` (`lower.rs:1442-1778`), `overwritten_movreld_edge` priority in `fill_phis`, and `translate.rs:709` accounting all checked out cleanly. - `clippy` (default + `--features diagnostics` + `victory`): 0 warnings; `io::tests` 7/7; `emit::lower::tests` 33/33; `emit::tests` 17/17; `emit::barycentric_tests` **20/20 passed** (including `first_half_values_render_on_hardware_and_warp` across all 13 render cases on RTX 5090 + WARP); `emit::semantics_tests` 34/34 on both RTX 5090 and WARP (1 ignored). Implementation and hardware rendering look great — just needs extracting helpers out of `lower.rs` to pass `xtask policy`.
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-26 03:39 UTC · original

From a tester working with Claude (AI-assisted, Claude Code): an offline check of this PR over a whole title's shader pack (25,889 distinct containers through emit::translate_with; hashes and counts only).

  • Base: main 63bcca4 + #3016 (an unrelated SALU fix), then with this PR merged (9d598928, no conflicts).
  • The title's last remaining barycentrics read directly refusal (5067d502a1b4ffb4) now translates: refused 216 → 215.
  • None goes from translated to refused.
  • 10,237 programs' output changes in all, as expected for a change to how interpolation is lowered. All 10,237 convert with dxil-spirv (master), and every one that converted before still does.

Not run: your GPU tests, NVIDIA, and the title in a game run, so this says nothing about the pictures of the 10,236 programs that changed but were already translating. Translation and conversion only.

**@⁠Anzymanz** on GitHub · 2026-11-26 03:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7181916858) From a tester working with Claude (AI-assisted, Claude Code): an offline check of this PR over a whole title's shader pack (25,889 distinct containers through `emit::translate_with`; hashes and counts only). - **Base:** main `63bcca4` + #3016 (an unrelated SALU fix), then with this PR merged (`9d598928`, no conflicts). - The title's last remaining `barycentrics read directly` refusal (`5067d502a1b4ffb4`) now translates: refused 216 → **215**. - **None** goes from translated to refused. - 10,237 programs' output changes in all, as expected for a change to how interpolation is lowered. All 10,237 convert with dxil-spirv (master), and every one that converted before still does. Not run: your GPU tests, NVIDIA, and the title in a game run, so this says nothing about the pictures of the 10,236 programs that changed but were already translating. Translation and conversion only.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 04:32 UTC · original

Measured offline on the title's shaders (the method in #1247), head 9d59892 merged onto main 63bcca4 (a clean merge, security-reviewed first): +1, 0 lost. The one is the only program on main that refuses with emit: barycentrics read directly. cargo test -p victory-shader --lib --locked passes 325/0 on an RX 7900 XTX.

That makes it the last piece. With the stack in #1247 (#1924 port, #2978, #385, #2999, #1737, #3016, #2363), every program of the title except the 71 mesh programs over the validator's output size would validate. One caution for the merge order: this PR edits fill_phis in emit/lower.rs, and #385 moves fill_phis into emit/lower/phi.rs. #1924 also extends the Lower fields where this PR changes interps to owned Interp and adds interp_live. So against those two it's a real port, not a keep-both, and I haven't measured it on the stack. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 04:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7182682494) Measured offline on the title's shaders (the method in #1247), head `9d59892` merged onto `main` `63bcca4` (a clean merge, security-reviewed first): **+1, 0 lost.** The one is the only program on `main` that refuses with `emit: barycentrics read directly`. `cargo test -p victory-shader --lib --locked` passes 325/0 on an RX 7900 XTX. That makes it the last piece. With the stack in #1247 (#1924 port, #2978, #385, #2999, #1737, #3016, #2363), every program of the title except the 71 mesh programs over the validator's output size would validate. One caution for the merge order: this PR edits `fill_phis` in `emit/lower.rs`, and #385 moves `fill_phis` into `emit/lower/phi.rs`. #1924 also extends the `Lower` fields where this PR changes `interps` to owned `Interp` and adds `interp_live`. So against those two it's a real port, not a keep-both, and I haven't measured it on the stack. Offline counts only; no program names or data.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-26 07:07 UTC · original

Tested 9d598928 merged onto current main (842b0cb). It merges cleanly.

Thanks for 9d598928. indexed_move_initializes_an_input_before_its_first_use now checks what a case keeps: the cases that read the input before the v_movreld loop declare SV_Barycentrics and the Barycentrics flag, and the complete overwrites declare neither. All of them validate. That was the stale expectation from my last comment, and the test passes now. The overwritten-input check in lower.rs now runs before the lazy barycentric load, so an edge the loop overwrites no longer loads the input.

Census (main 842b0cb, 64-lane target): 24,850 → 24,851 validated, 0 lost, 1 pixel program gained (barycentrics read directly; no program is left with that reason). Nothing else changes in the listing. On current main no program stops at "the first half of an interpolation" or at "an interpolation with computed barycentrics", so this title does not measure the live-interpolation part of this PR.

Tests (WARP, victory-shader lib, main + this PR): 320 passed, 4 failed, the same 4 that fail on main on this machine's WARP. The barycentric, first-half and indexed-input tests all pass. Clippy (victory-shader, with and without --features diagnostics): clean.

The unit tests are synthetic. Local title data was used offline for the census: a translation of the title's shader pack, with only counts and refusal reasons reported.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-26 07:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7185120035) Tested `9d598928` merged onto current `main` (`842b0cb`). It merges cleanly. Thanks for `9d598928`. `indexed_move_initializes_an_input_before_its_first_use` now checks what a case keeps: the cases that read the input before the `v_movreld` loop declare `SV_Barycentrics` and the Barycentrics flag, and the complete overwrites declare neither. All of them validate. That was the stale expectation from my last comment, and the test passes now. The overwritten-input check in `lower.rs` now runs before the lazy barycentric load, so an edge the loop overwrites no longer loads the input. **Census** (`main` `842b0cb`, 64-lane target): 24,850 → 24,851 validated, 0 lost, 1 pixel program gained (`barycentrics read directly`; no program is left with that reason). Nothing else changes in the listing. On current `main` no program stops at "the first half of an interpolation" or at "an interpolation with computed barycentrics", so this title does not measure the live-interpolation part of this PR. Tests (WARP, `victory-shader` lib, `main` + this PR): 320 passed, 4 failed, the same 4 that fail on `main` on this machine's WARP. The barycentric, first-half and indexed-input tests all pass. Clippy (`victory-shader`, with and without `--features diagnostics`): clean. The unit tests are synthetic. Local title data was used offline for the census: a translation of the title's shader pack, with only counts and refusal reasons reported. AI-assisted
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 13:11 UTC · original

Following up on the merge-order note above: I ported this PR (9d59892) onto the full stack from #1247 (#1924 port, #2978, #385, #2999, #1737, #3016 and #2363 on main 63bcca4). The resolution, for whenever this rebases after those land:

  • emit/lower.rs, Lower fields: take this PR's interps: HashMap<Site, Interp> and interp_live, and keep #1924's gs_reads, lds_outputs, gs_outputs, gs_ops and merged_wave_mask after them. The same goes for their initialisers in Lower::new.
  • emit/lower.rs, Input::Barycentric: take this PR's return self.barycentric(kind, index) and keep #1924's PrimitiveId / GsInstanceId arm after it.
  • fill_phis: #385 moved it into emit/lower/phi.rs, so drop this PR's copy in lower.rs and carry its three changes into the moved function. Compute overwritten_input (no read && needed, because that loop already skips edges that aren't live), call lazy_barycentric(arg) under the same guards, add the _ if overwritten_input => undef arm first, and remove the old Missing("barycentrics read directly") arm. phi.rs needs use crate::io::Input;.
  • io.rs, end of raise: keep #1924's merged-geometry match, then this PR's retain_live_first_halves call, then Ok(io). Keep both sets of new items after it (LdsAddr / ds_elements / raise_es_gs_lds, then retain_live_first_halves).

Measured on that port (offline, the title's shaders, RX 7900 XTX): +1 on the stack, 26,013 of 26,084 validated (+1,163 on main, 0 lost). The only programs left are the 71 mesh programs over the validator's 32,768-byte output size. cargo test -p victory-shader --lib passes 357/0, -p victory-gpu --lib passes 231/0, and cargo clippy -p victory-shader --all-targets --locked -- -D warnings is clean. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 13:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1738#issuecomment-7193008351) Following up on the merge-order note above: I ported this PR (`9d59892`) onto the full stack from #1247 (#1924 port, #2978, #385, #2999, #1737, #3016 and #2363 on `main` `63bcca4`). The resolution, for whenever this rebases after those land: - **`emit/lower.rs`, `Lower` fields:** take this PR's `interps: HashMap<Site, Interp>` and `interp_live`, and keep #1924's `gs_reads`, `lds_outputs`, `gs_outputs`, `gs_ops` and `merged_wave_mask` after them. The same goes for their initialisers in `Lower::new`. - **`emit/lower.rs`, `Input::Barycentric`:** take this PR's `return self.barycentric(kind, index)` and keep #1924's `PrimitiveId` / `GsInstanceId` arm after it. - **`fill_phis`:** #385 moved it into `emit/lower/phi.rs`, so drop this PR's copy in `lower.rs` and carry its three changes into the moved function. Compute `overwritten_input` (no `read &&` needed, because that loop already skips edges that aren't live), call `lazy_barycentric(arg)` under the same guards, add the `_ if overwritten_input => undef` arm first, and remove the old `Missing("barycentrics read directly")` arm. `phi.rs` needs `use crate::io::Input;`. - **`io.rs`, end of `raise`:** keep #1924's merged-geometry match, then this PR's `retain_live_first_halves` call, then `Ok(io)`. Keep both sets of new items after it (`LdsAddr` / `ds_elements` / `raise_es_gs_lds`, then `retain_live_first_halves`). Measured on that port (offline, the title's shaders, RX 7900 XTX): **+1 on the stack, 26,013 of 26,084 validated (+1,163 on `main`, 0 lost).** The only programs left are the 71 mesh programs over the validator's 32,768-byte output size. `cargo test -p victory-shader --lib` passes 357/0, `-p victory-gpu --lib` passes 231/0, and `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` is clean. Offline counts only; no program names or data.
github-bot closed this pull request 2026-11-26 18:12:17 +00:00

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