Repository navigation
Shaders: retain live interpolation first halves - #52
jaschinski97-ops wants to merge 3 commits into
Conversation
|
Independent test run on commit
AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report. |
|
Offline coverage of this PR on the retail pack, measured on its own (not stacked with the other first-half PRs, because #52 and #77 both edit Method: worktree at
+8 gained, -160 lost. The 8 gained are the ones this PR is after, and they are real:
The 160 lost are all pixel programs, and they cluster on peds and fire: For comparison, #77 on the same base gains the same 8 and loses 0, so the 8 do not need this PR, while the 160 do come from it. Is that expected - are the ped/fire programs meant to be refused until something else lands? I did not look at the diff for a reason, only at what the translator does, so this may be a known trade. On my side it is the difference between "worth trying in the title" and "not": No game data; counts and program names only. |
|
Merged onto main 90228a7 and ran
For comparison, #77 clears the same 8 with no new failure reason. |
|
Tested on the title's own shaders: all 8 "first half of an interpolation" programs now translate, validate and get a pipeline on an RTX 4060, with no regressions in the rest of the archive. Setup
Whole archive (
The 8 programs, each extracted and run on its own with
Two of these ( Tests,
I didn't do a game run with this PR, so I haven't seen these draws on screen. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the translations and tests, and drafted this; the machine is mine. No game files or extracted shaders attached. |
A synthetic pixel shader exporting
v_interp_p1_f32without its second half fails withthe first half of an interpolation. The same happens when the partial result is copied for another calculation before an otherwise ordinary loaded-i/j pair completes. That failure message is also reported in #7; the reported title shader itself was not available for validation.I/O raising now records first halves whose SSA values are consumed outside a folded complete interpolation, including values reaching a consumer through phis. They use the existing weighted interpolation lowering (
P0 + i * (P1 - P0)). Normal loaded-i/j pairs retain their current single host interpolation and do not gain barycentrics or per-vertex attribute reads. Computed-weight pairs retain their existing handling.Validation on Windows 11 / NVIDIA RTX 3080, driver 32.0.16.2140, Rust 1.98.1 / Windows GNU:
1e-5.v_interp_p1ll_f16(the f16 form was not executed on the GPU).interpolation_alone_declares_no_barycentricsand computed-weight tests pass, preserving the ordinary-pair optimization.cargo test --locked -p victory-shader --lib -- --test-threads=1: 215 passed, 0 failed, 2 existing ignored tests (90.94 seconds).victory-shader, all targets,diagnostics,host, with-D warnings: clean. Asset policy: 169 files OK.diagnostics,hostand-D warningsand the asset policy pass. The changes combine without conflicts.No gameplay or shader-corpus result is claimed. No title data, dumps or extracted code are included. Synthetic programs and tests are our own. Instruction semantics: AMD RDNA 2 ISA section 12.11, https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture
AI-assisted contribution with Codex; code and hardware/software rendering tests run locally.
Additional review corrections in c194f64: demand-based first-half tracking avoids unnecessary barycentrics for a dead value overwritten by a full move, preserves masked-move dependencies, and retains the old destination High16 of a folded f16 P2. The dead-overwrite test fails before the fix. The extended render test checks 1,536 channel results on RTX 3080 and WARP, including exact old-High16/new-f16-Low16 bits. Final branch shader suite: 218 passed, 2 pre-existing ignored; Clippy and asset policy pass. All fixtures remain synthetic.