Shaders: lane masks spilled to VGPR lanes and read back #298

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

@⁠permadiego on GitHub · 2026-11-24 02:08 UTC · original
permadiego:shader/lane-mask-spills → main · +289 −35 · 2 files · 1 commits · closed without merging

What changed

The console compiler spills lane masks like any other SGPR: v_writelane_b32 to a constant lane, then v_readlane_b32 of that lane later. In CS_RaytracingResolve, for example, a compare result (v_cmp_eq_f32 s7, 0, v21) is spilled to lane 1 of v128. Thousands of instructions later it is read back and fed to s_and_saveexec.

Two things failed on that pattern:

  • The lane pass took the read-back value for an opaque mask.
  • The spill write read the mask as data. This fails for a mask holding lanes that are not running there, such as the complement s_xor_b32 s8, s1, -1: "a lane mask holding lanes elsewhere read as data".

Changes:

  • structure.rs: a v_readlane_b32 of a constant lane is taken as the mask itself when it reads back a v_writelane_b32 of that mask. The lookup follows writes of other lanes and joins whose arguments agree, and only applies where the mask's value dominates the read. Each lane's bit is then the one it had when spilled. A wave64 mask needs both dwords read back from the same mask.
  • lower.rs (mask_spills): a read-back of this kind leaves its value to the mask's readers. The spill write is left out (the VGPR keeps its old value) when that VGPR lane is read only by such reads; no vector instruction or computed-lane read sees it. Neither instruction counts as reading the console's lanes.

This no longer depends on #54, which was closed. It applies on main alone.

Measured

victory translate --validate over the title's shaders.rpf, main ffe310e against this branch (54f97db):

main this branch
compute validated 1,417 1,424
vertex and pixel validated 12,155 12,182
mesh validated 8,152 8,152
"a lane mask holding lanes elsewhere read as data" 273 13

34 programs gain, 0 lose. Most CS_RaytracingResolve variants now stop at "a descriptor read only as data", which #180 covers.

cargo test -p victory-shader -- --skip valu_tests --skip wave_tests: 105 passed. The skipped tests and the two waterfall_tests need an SM 6.6 device, which this machine lacks (sampled() returns nothing). Clippy is clean.

Not verified

No GPU run here. @⁠qntic's lane-spill hardware test and @⁠Nixitov's world run were done on the earlier, #54-based head d0261f1, so they need a re-run on this head.

🤖 Generated with Claude Code

**@⁠permadiego** on GitHub · 2026-11-24 02:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/298) `permadiego:shader/lane-mask-spills` → `main` · +289 −35 · 2 files · 1 commits · closed without merging ## What changed The console compiler spills lane masks like any other SGPR: `v_writelane_b32` to a constant lane, then `v_readlane_b32` of that lane later. In `CS_RaytracingResolve`, for example, a compare result (`v_cmp_eq_f32 s7, 0, v21`) is spilled to lane 1 of `v128`. Thousands of instructions later it is read back and fed to `s_and_saveexec`. Two things failed on that pattern: - The lane pass took the read-back value for an opaque mask. - The spill write read the mask as data. This fails for a mask holding lanes that are not running there, such as the complement `s_xor_b32 s8, s1, -1`: "a lane mask holding lanes elsewhere read as data". Changes: - **structure.rs:** a `v_readlane_b32` of a constant lane is taken as the mask itself when it reads back a `v_writelane_b32` of that mask. The lookup follows writes of other lanes and joins whose arguments agree, and only applies where the mask's value dominates the read. Each lane's bit is then the one it had when spilled. A wave64 mask needs both dwords read back from the same mask. - **lower.rs (`mask_spills`):** a read-back of this kind leaves its value to the mask's readers. The spill write is left out (the VGPR keeps its old value) when that VGPR lane is read only by such reads; no vector instruction or computed-lane read sees it. Neither instruction counts as reading the console's lanes. This no longer depends on #54, which was closed. It applies on `main` alone. ## Measured `victory translate --validate` over the title's `shaders.rpf`, `main` ffe310e against this branch (54f97db): | | `main` | this branch | |---|---|---| | compute validated | 1,417 | 1,424 | | vertex and pixel validated | 12,155 | 12,182 | | mesh validated | 8,152 | 8,152 | | "a lane mask holding lanes elsewhere read as data" | 273 | 13 | 34 programs gain, 0 lose. Most `CS_RaytracingResolve` variants now stop at "a descriptor read only as data", which #180 covers. `cargo test -p victory-shader -- --skip valu_tests --skip wave_tests`: 105 passed. The skipped tests and the two `waterfall_tests` need an SM 6.6 device, which this machine lacks (`sampled()` returns nothing). Clippy is clean. ## Not verified No GPU run here. @⁠qntic's lane-spill hardware test and @⁠Nixitov's world run were done on the earlier, #54-based head d0261f1, so they need a re-run on this head. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The console compiler spills lane masks like other SGPRs: v_writelane_b32
to a constant lane, v_readlane_b32 of that lane later. The lane pass took
the read-back value for an opaque mask, and the spill write read the
mask as data, which fails for a mask holding lanes not running there
("a lane mask holding lanes elsewhere read as data").

structure: a v_readlane_b32 of a constant lane that reads back a
v_writelane_b32 of a mask (through writes of other lanes and agreeing
joins), where the mask's value dominates the read, is that mask: each
lane's bit is the one it had when spilled. Wave64 masks need both dwords
read back from the same mask.

lower: such a read leaves its value to the mask's readers, and a spill
write of a mask is left out where that VGPR lane is read only by such
reads (no vector instruction or computed-lane read sees it). Neither
counts as reading the console's lanes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:58:23 +00:00
github-bot closed this pull request 2026-11-26 03:58:23 +00:00
Author
Owner

@⁠SpaghettiMaster545 on GitHub · 2026-11-24 03:48 UTC · original

Tested with the title at d0261f1. The branch also carries #54's three commits, so this measures #54 + this PR together.

  • NVIDIA GeForce RTX 5070 Ti, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9800X3D; Windows 11 10.0.26100; Rust 1.98.1. Diag build of the branch merged onto main d2a4bae (clean), its own empty VICTORY_CACHE_DIR, VICTORY_KEYS into story mode, until the host GPU failure (#71, unrelated); compared program by program with a main run made the same way (#400 has the setup).
  • 11 programs that stop on main translate and run, 4 of them compute programs whose pipelines the driver refused on main. 0 programs that ran on main stop.
  • The world hang is unchanged (64 s, within main's 59–111 s).

Not tested: #54 alone, AMD GPUs, a release build, image results.

(Claude Code, Claude Opus 5.5: ran the title on both builds and compared the logs program by program.)

**@⁠SpaghettiMaster545** on GitHub · 2026-11-24 03:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7121441920) **Tested with the title** at `d0261f1`. The branch also carries #54's three commits, so this measures #54 + this PR together. - NVIDIA GeForce RTX 5070 Ti, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9800X3D; Windows 11 10.0.26100; Rust 1.98.1. Diag build of the branch merged onto `main` `d2a4bae` (clean), its own empty `VICTORY_CACHE_DIR`, `VICTORY_KEYS` into story mode, until the host GPU failure (#71, unrelated); compared program by program with a `main` run made the same way (#400 has the setup). - 11 programs that stop on `main` translate and run, 4 of them compute programs whose pipelines the driver refused on `main`. 0 programs that ran on `main` stop. - The world hang is unchanged (64 s, within `main`'s 59–111 s). **Not tested**: #54 alone, AMD GPUs, a release build, image results. (Claude Code, Claude Opus 5.5: ran the title on both builds and compared the logs program by program.)
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:18 UTC · original

Tested PR #298 at head d0261f1174368e2c203b42942e19b24f8f8d7787 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at d0261f1174368e2c203b42942e19b24f8f8d7787.

  • cargo test --locked -p victory-shader wave64_64thread_sgpr_spills_run_on_wave32_host — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 73 filtered out; finished in 0.59s ); cases: emit::wave_tests::wave64_64thread_sgpr_spills_run_on_wave32_host.
  • cargo test --locked -p victory-shader pixel_shader_sgpr_spill_lowers_and_draws — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 73 filtered out; finished in 0.32s ); cases: emit::wave_tests::pixel_shader_sgpr_spill_lowers_and_draws.

Behavior covered: Checks wave64 SGPR spill lowering on a wave32 host and pixel-shader SGPR spill drawing behavior; the latter cases require a supported host GPU.
Code: crates/victory-shader/src/emit/lower.rs, crates/victory-shader/src/emit/wave_tests.rs, crates/victory-gpu/src/host.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7121892873) Tested PR #298 at head `d0261f1174368e2c203b42942e19b24f8f8d7787` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `d0261f1174368e2c203b42942e19b24f8f8d7787`. - `cargo test --locked -p victory-shader wave64_64thread_sgpr_spills_run_on_wave32_host` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 73 filtered out; finished in 0.59s ); cases: emit::wave_tests::wave64_64thread_sgpr_spills_run_on_wave32_host. - `cargo test --locked -p victory-shader pixel_shader_sgpr_spill_lowers_and_draws` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 73 filtered out; finished in 0.32s ); cases: emit::wave_tests::pixel_shader_sgpr_spill_lowers_and_draws. Behavior covered: Checks wave64 SGPR spill lowering on a wave32 host and pixel-shader SGPR spill drawing behavior; the latter cases require a supported host GPU. Code: [crates/victory-shader/src/emit/lower.rs](https://github.com/Marvisak/VIctory/blob/d0261f1174368e2c203b42942e19b24f8f8d7787/crates/victory-shader/src/emit/lower.rs), [crates/victory-shader/src/emit/wave_tests.rs](https://github.com/Marvisak/VIctory/blob/d0261f1174368e2c203b42942e19b24f8f8d7787/crates/victory-shader/src/emit/wave_tests.rs), [crates/victory-gpu/src/host.rs](https://github.com/Marvisak/VIctory/blob/d0261f1174368e2c203b42942e19b24f8f8d7787/crates/victory-gpu/src/host.rs)
Author
Owner

@⁠GamingRipperDoc on GitHub · 2026-11-24 05:26 UTC · original

A combination finding, from victory translate <dump> --validate (offline, dxil.dll validator) on Windows 10 + RX 9070 XT, base d2a4bae + #175 + #336. Counts are compute programs, out of 2,581.

on the base emitted validated Entry function performs some operation that is incompatible with the shader stage or other entry properties
base 1,693 1,670 23
+ this PR (with #54) 1,731 1,698 33
+ #136 1,796 1,697 99
+ #136 + this PR 2,332 1,725 607
+ #193 + #437 + this PR 2,442 1,795 647
+ #193 + this PR 1,822 1,768 54

On its own this PR is clean (+38 emitted, +10 of these errors). But together with #136, or with #437 (both let more scalar buffer loads through), ~540 more compute programs get through this PR's path and come out failing validation with the error above. So it looks like a shape #136/#437 expose that this PR's lowering doesn't handle validly in compute. The validator only prints the summary line here ("See other errors for details" without others).

Why it matters: VIctory doesn't validate at run time, so in game these programs go to the driver. In a play run with this PR + #136 + #305 + #385 + #302 + #193 + #437 + #54 on the stack, AMD's shader compiler crashed (amdxc64.dll+0x85fd0f, access violation reading 0x8) after ~1 min in the world, with 250–1,000 pipelines still compiling. I can't say which program it was compiling, but this stack sends ~1,200 non-validating programs to it (these, plus #305's).

I can share the per-program --list output for the combination privately if it helps (it names the title's shaders, so not here).

No game data in this comment.

AI-assisted (Claude Code); I ran the measurements on my machine.

**@⁠GamingRipperDoc** on GitHub · 2026-11-24 05:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7122947334) A combination finding, from `victory translate <dump> --validate` (offline, dxil.dll validator) on Windows 10 + RX 9070 XT, base `d2a4bae` + #175 + #336. Counts are compute programs, out of 2,581. | on the base | emitted | validated | `Entry function performs some operation that is incompatible with the shader stage or other entry properties` | |---|---|---|---| | base | 1,693 | 1,670 | 23 | | + this PR (with #54) | 1,731 | 1,698 | 33 | | + #136 | 1,796 | 1,697 | 99 | | **+ #136 + this PR** | **2,332** | **1,725** | **607** | | + #193 + #437 + this PR | 2,442 | 1,795 | 647 | | + #193 + this PR | 1,822 | 1,768 | 54 | On its own this PR is clean (+38 emitted, +10 of these errors). But together with #136, or with #437 (both let more scalar buffer loads through), ~540 more compute programs get through this PR's path and come out failing validation with the error above. So it looks like a shape #136/#437 expose that this PR's lowering doesn't handle validly in compute. The validator only prints the summary line here ("See other errors for details" without others). Why it matters: VIctory doesn't validate at run time, so in game these programs go to the driver. In a play run with this PR + #136 + #305 + #385 + #302 + #193 + #437 + #54 on the stack, AMD's shader compiler crashed (`amdxc64.dll+0x85fd0f`, access violation reading 0x8) after ~1 min in the world, with 250–1,000 pipelines still compiling. I can't say which program it was compiling, but this stack sends ~1,200 non-validating programs to it (these, plus #305's). I can share the per-program `--list` output for the combination privately if it helps (it names the title's shaders, so not here). No game data in this comment. AI-assisted (Claude Code); I ran the measurements on my machine.
Author
Owner

@⁠Nixitov on GitHub · 2026-11-24 06:49 UTC · original

Big effect on the RTX 5070 world run — this is the single most valuable shader PR I have tested.

Setup: Windows 11 Pro 26200.9974, RTX 5070, driver 617.14, d2a4bae + the GPU stack #493 + #483 + #581 + #595, release build. Same scene (first mission intro), same run length.

build shaders that do not translate a lane mask holding lanes elsewhere read as data draws dropped without a host pipeline
without this PR 399 85 1408
with this PR (#298) 370 10 —
with this PR + #585 + #259 + #302 + #307 + #539 361-362 10-11 952

(399 → 952 dropped draws is not a like-for-like ratio; the two dropped-draw numbers are the last frame line of runs at the same scene, with and without the stack.)

The count of the reason this PR targets drops from 85 to 10; the 97 a select on an untracked mask entries disappear with #585 on top. Nothing regressed in the run: still 2 fps, no device removals, and the frame log reaches the same intro scene.

One integration note: merging #298 with #54-era code needed only two additive hunks in lower.rs (guard_slots next to resolved_reads / pure_spill_writes, and both in the constructor), plus deriving guard_slot from count + dynamic when stacked on #483.

No game files; only counts and log lines.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠Nixitov** on GitHub · 2026-11-24 06:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7124324998) Big effect on the RTX 5070 world run — this is the single most valuable shader PR I have tested. **Setup:** Windows 11 Pro 26200.9974, RTX 5070, driver 617.14, `d2a4bae` + the GPU stack #493 + #483 + #581 + #595, release build. Same scene (first mission intro), same run length. | build | shaders that do not translate | `a lane mask holding lanes elsewhere read as data` | draws dropped without a host pipeline | |---|---|---|---| | without this PR | 399 | 85 | 1408 | | **with this PR (#298)** | **370** | **10** | — | | with this PR + #585 + #259 + #302 + #307 + #539 | 361-362 | 10-11 | **952** | (399 → 952 dropped draws is not a like-for-like ratio; the two dropped-draw numbers are the last frame line of runs at the same scene, with and without the stack.) The count of the reason this PR targets drops from 85 to 10; the 97 `a select on an untracked mask` entries disappear with #585 on top. Nothing regressed in the run: still 2 fps, no device removals, and the frame log reaches the same intro scene. One integration note: merging #298 with #54-era code needed only two additive hunks in `lower.rs` (`guard_slots` next to `resolved_reads` / `pure_spill_writes`, and both in the constructor), plus deriving `guard_slot` from `count + dynamic` when stacked on #483. No game files; only counts and log lines. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠qntic on GitHub · 2026-11-24 11:12 UTC · original

tested on rx 6600 xt with my compute regression harness. the vgpr lane mask spill test gives 24 incorrect lanes out of 64 on main. with this pr all 64 lanes produce the expected values.
hardware tests:
https://github.com/qntic/VIctory/tree/hwtest/compute-lanes

**@⁠qntic** on GitHub · 2026-11-24 11:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7129807173) tested on rx 6600 xt with my compute regression harness. the vgpr lane mask spill test gives 24 incorrect lanes out of 64 on main. with this pr all 64 lanes produce the expected values. hardware tests: https://github.com/qntic/VIctory/tree/hwtest/compute-lanes
Author
Owner

@⁠permadiego on GitHub · 2026-11-24 11:42 UTC · original

Rebased onto main ffe310e as 54f97db, now standalone: #54 was closed, so the spill handling this needs for masks is in this PR (mask_spills in lower.rs). Over shaders.rpf against main: +34 validated, 0 lost, "a lane mask holding lanes elsewhere read as data" 273 → 13. Tests done on d0261f1 (thanks @⁠qntic, @⁠Nixitov, @⁠jeremygold02) were on the #54-based head.

🤖 Generated with Claude Code

**@⁠permadiego** on GitHub · 2026-11-24 11:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7130451462) Rebased onto `main` ffe310e as 54f97db, now standalone: #54 was closed, so the spill handling this needs for masks is in this PR (`mask_spills` in `lower.rs`). Over `shaders.rpf` against `main`: +34 validated, 0 lost, "a lane mask holding lanes elsewhere read as data" 273 → 13. Tests done on d0261f1 (thanks @⁠qntic, @⁠Nixitov, @⁠jeremygold02) were on the #54-based head. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠qntic on GitHub · 2026-11-24 13:25 UTC · original

re-tested on the rebased head 54f97db on my rx 6600 xt.

the mask spill test still produces correct values, but the select pattern after vcc_hi = 0 still silently produces incorrect values in 16 of 64 lanes.

#660 is still needed to safely reject that pattern.

harness:
https://github.com/qntic/VIctory/tree/hwtest/compute-lanes

**@⁠qntic** on GitHub · 2026-11-24 13:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7132821122) re-tested on the rebased head 54f97db on my rx 6600 xt. the mask spill test still produces correct values, but the select pattern after vcc_hi = 0 still silently produces incorrect values in 16 of 64 lanes. #660 is still needed to safely reject that pattern. harness: https://github.com/qntic/VIctory/tree/hwtest/compute-lanes
Author
Owner

@⁠rafaconvaitis on GitHub · 2026-11-24 18:36 UTC · original

I tested 54f97db independently on the 45 mesh programs that reached a lane-mask join of an untracked mask only after the narrow descriptor-field experiments in #798. The common base was #1269 8c3092f plus #953 c42cbb0, with the same experimental descriptor-bit and offline stride settings in both runs. The candidate applied only the official #298 patch. I matched the same program records across both conditions.

  • Control: the same lane-mask join refusal on all 45 mesh programs.
  • With 54f97db: all 45 passed Microsoft DXIL validation with the 1.8.2502.8 validator.

In one representative the two restored halves both trace to a single dominating conditional EXEC mask, saved in two constant lanes of the same VGPR. That matches the spill recovery this PR implements. I only tested these 45 offline. In-title binding, draws, and the separate high-half correctness case in the RX 6600 XT report remain unverified by this test.

AI-assisted testing. No title files, shader containers or disassembly are attached.

**@⁠rafaconvaitis** on GitHub · 2026-11-24 18:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7140873778) I tested `54f97db` independently on the 45 mesh programs that reached `a lane-mask join of an untracked mask` only after the narrow descriptor-field experiments in #798. The common base was #1269 `8c3092f` plus #953 `c42cbb0`, with the same experimental descriptor-bit and offline stride settings in both runs. The candidate applied only the official #298 patch. I matched the same program records across both conditions. - Control: the same lane-mask join refusal on all 45 mesh programs. - With `54f97db`: all 45 passed Microsoft DXIL validation with the 1.8.2502.8 validator. In one representative the two restored halves both trace to a single dominating conditional EXEC mask, saved in two constant lanes of the same VGPR. That matches the spill recovery this PR implements. I only tested these 45 offline. In-title binding, draws, and the separate high-half correctness case in the RX 6600 XT report remain unverified by this test. AI-assisted testing. No title files, shader containers or disassembly are attached.
Author
Owner

@⁠Sil3ntGam3r on GitHub · 2026-11-24 21:07 UTC · original

@⁠permadiego results for 54f97db on top of the #439 stack. It gains programs there too and loses none.

Tree: main + #180 aa69258 + #439 bf0f951 (with #223/#233/#320) + #431 + #876 + #334, then this PR, then #660 19b02ec. The merge conflicts were all additive: both sides' fields in lower.rs, and one duplicate paired_masks initialiser in structure.rs. All 433 tests pass. RTX 3070, driver 621.14, Windows 11, diag build.

Offline, victory translate --validate --host-lanes 32-32 over shaders.rpf, the stack without and with this PR:

without with this PR
vertex and pixel validated 12,288 12,315
compute validated 2,363 2,371
mesh validated 8,236 8,283

82 programs gain and 0 lose. Before this PR they stopped at:

reason before programs
a lane-mask join of an untracked mask 47 mesh, 15 pixel
an opaque lane mask 12 pixel
a program the console structure cannot hold 7 compute
a descriptor's address or format read as data 1 compute

On this stack, "a lane-mask join of an untracked mask" goes from 62 programs to 0. Your PR's own reason, "a lane mask holding lanes elsewhere read as data", stays at 4 both ways, so the stack already took most of those. The 47 mesh programs fit @⁠rafaconvaitis's 45 above. Adding #660 on top changes no program's outcome, as @⁠rpmaster2 found on main in #660.

The CS_RaytracingResolve variants on this stack: 27 move from "a lane mask read as data" to "a program the console structure cannot hold" (at 0x0). That refusal comes from #439's console flow, not from main. They are refused either way. With #180 on the stack, they don't reach "a descriptor read only as data" as they do on main.

In the title, Series X, cold cache, into the world until translation caught up:

  • 5 programs that were refused in the run before this merge now run: 3 pixel (b37565055f2f7d3b, cc6def9058a4bc0a, d642969b6ff7579e) and 2 compute (015832d72477fb26, e81277c8be37103b).
  • No program that translated in that run is refused now. The earlier run ended before translation caught up, so this covers only programs that have a result in both runs. The offline table covers everything.
  • What reaches the screen is unchanged: scenery in the G-buffer, no ground, roads or buildings. No device removal.

Not tested: AMD, a release build, this PR on plain main.

(AI-assisted: Claude Code ran the builds and compared both runs program by program.)

**@⁠Sil3ntGam3r** on GitHub · 2026-11-24 21:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/298#issuecomment-7144508298) @⁠permadiego results for `54f97db` on top of the #439 stack. It gains programs there too and loses none. Tree: `main` + #180 `aa69258` + #439 `bf0f951` (with #223/#233/#320) + #431 + #876 + #334, then this PR, then #660 `19b02ec`. The merge conflicts were all additive: both sides' fields in `lower.rs`, and one duplicate `paired_masks` initialiser in `structure.rs`. All 433 tests pass. RTX 3070, driver 621.14, Windows 11, diag build. **Offline**, `victory translate --validate --host-lanes 32-32` over `shaders.rpf`, the stack without and with this PR: | | without | with this PR | |---|---|---| | vertex and pixel validated | 12,288 | 12,315 | | compute validated | 2,363 | 2,371 | | mesh validated | 8,236 | 8,283 | 82 programs gain and 0 lose. Before this PR they stopped at: | reason before | programs | |---|---| | a lane-mask join of an untracked mask | 47 mesh, 15 pixel | | an opaque lane mask | 12 pixel | | a program the console structure cannot hold | 7 compute | | a descriptor's address or format read as data | 1 compute | On this stack, "a lane-mask join of an untracked mask" goes from 62 programs to 0. Your PR's own reason, "a lane mask holding lanes elsewhere read as data", stays at 4 both ways, so the stack already took most of those. The 47 mesh programs fit @⁠rafaconvaitis's 45 above. Adding #660 on top changes no program's outcome, as @⁠rpmaster2 found on `main` in #660. **The `CS_RaytracingResolve` variants on this stack:** 27 move from "a lane mask read as data" to "a program the console structure cannot hold" (at `0x0`). That refusal comes from #439's console flow, not from `main`. They are refused either way. With #180 on the stack, they don't reach "a descriptor read only as data" as they do on `main`. **In the title**, Series X, cold cache, into the world until translation caught up: - 5 programs that were refused in the run before this merge now run: 3 pixel (`b37565055f2f7d3b`, `cc6def9058a4bc0a`, `d642969b6ff7579e`) and 2 compute (`015832d72477fb26`, `e81277c8be37103b`). - No program that translated in that run is refused now. The earlier run ended before translation caught up, so this covers only programs that have a result in both runs. The offline table covers everything. - What reaches the screen is unchanged: scenery in the G-buffer, no ground, roads or buildings. No device removal. Not tested: AMD, a release build, this PR on plain `main`. (AI-assisted: Claude Code ran the builds and compared both runs program by program.)

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