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. |
…rror-and-query-bounds GPU: hold SHADER_HEAPS across descriptor mirror and check query offsets (cherry picked from commit 1117251)
- gfx10::Instruction::new: upstream fxceless#1180 made the decoded name a private field; the fork's lane-mask unspill builds instructions, now through it. - descriptor.rs: shader_slot kept beside upstream fxceless#52's locked mirror(); the fork's late texture views still look slots up through it. - semantics_tests: the HostShader of this fork (no memory/view_addresses flags; root_indexed_views). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRkN9XKxpoYQhz4KNXw
…ull requests and the host FidelityFX on our layer; our translator, title memory and copy-back kept 319 commits past ffe310e, merged onto wave4. Most of its runtime pull requests were here already, picked one by one (fxceless#653 and fxceless#716, prhle, offpr): where a change arrived both ways, the copy this branch had is kept (net, audio, xg, runtime, lifecycle with its one stand-in window (#1677), files, kernel, xasync, xgamesave, xmem, gameinput, the loader's crash, clzero and publish code, the pipeline cache, #1658's staging clamp). The rest is the resolution first made on wave2 (offm-on-wave2, ab1d525), carried over: - crates/victory-shader: ours (every conflict --ours). Kept from theirs only what landed whole: fxceless#661 SP3 text operands, fxceless#1021 s_atc_probe's immediate, #1636 FLAT offsets. Reverted where half landed: fxceless#1180, range.rs, fxceless#617's bench, #1337's sampler, ACCC, SOURCE_HASH, and new test files whose mod lines are in conflicted files. The rest is to be ported on its own. - victory-gpu: ours plus the official units taken, each from its own diff: host.rs (fxceless#615 switch=0 is off, fxceless#1082 TDR log, #1626 swap-chain retries throttled), descriptor/host.rs (fxceless#974, its walk no longer cut at 2^18 steps by ours), descriptor.rs (fxceless#52: a mirror holds the heaps' lock while it uses the heap, a read lock on this branch's RwLock, and so does our re-mirror of waiting slots), resource.rs (fxceless#52, fxceless#504 depth/stencil footprints, #1390 A8), pipeline/host.rs (fxceless#618), pipeline.rs (a stream subobject past its end not read), capture.rs (fxceless#615, fxceless#1146, a D24 depth plane dumped as depth), frame.rs (fxceless#174, with our late-wait shortcut inside the tick reservation), device.rs (fxceless#928, feature queries 7/8/23), list.rs (#1446, fxceless#52), external.rs (host FidelityFX, VICTORY_FIDELITYFX_DIR, off unless set), switch.rs, tdr.rs, and the small PRs (fxceless#553, #1562, fxceless#270, fxceless#153, #1453, #1204, fxceless#1173, #1206, fxceless#474). - Not taken, ours kept: title memory at raw addresses (27c3dc9, 0f63757, 6d021fe: their memory.rs and Upload), page marks (cd94d35, 940d32f: with our shaders every write through a view would be lost), bindless.rs and the change journal (c75fdba), root views and retirement at execute end (d71c388: unsafe with flights in the air), rectangle GS and table constants in place (683ad7a), twins and shared host textures (13bbd6f), heap copies (86a5ed6, bacb06a), the shader cache key, warm-up, pipeline queue and library (c47b529, 9c58a1c, fxceless#1000, #1660), #1510, #1635, #1246, fxceless#322, #1322, fxceless#669, fxceless#197 (turned down by prhle), #1726 (ours waits longer; its test added), the console upscaler's UAV clears. `translate --cache` is `--warm all` (with the adapter probe); the pipeline pre-build is not in. - Also taken: the shader pack and the database's effects (shader-info), the startup archive check (fxceless#12, on this branch's KnownBuild with its patches), and the runtime PRs not here yet (FidelityFX's config and module). - The title is not named in the merged-in comments (4e17478). Details, the overlaps and what to watch: README, "The official repository, merged".
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.