Shaders: wave64 compute programs run in 32-lane halves on hosts of 32-lane waves #2631

Open
chippy01 wants to merge 24 commits from upstream-pr/2633 into main
chippy01 commented 2026-11-25 17:15:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-25T17:15:20Z.


The problem

A console wave64 compute program that needs the console's lanes (cross-lane reads, masks read as numbers, LDS one wave shares) declares WaveSize(64). NVIDIA and Intel run waves of at most 32 lanes (WaveLaneCountMax 32) and refuse it. On an RTX 3070 Ti the debug layer says:

Shader wants wave lane count of 64 but maximum wave lane count for device is 32 (id 622)

and the pipeline is refused with E_INVALIDARG. A Series S run to the loading screen refused 100 compute pipelines; 95 of them were for this reason.

The change

On such a host, a wave64 program that needs the console's lanes is translated for waves of 32 ("halves", emit::lower::halves, set by emit::Options::host_wave32). The thread relabelling gives each host wave a 32-aligned run of thread ids, so host wave 2w + h holds lanes 32h..32h + 31 of console wave w. What each cross-lane operation needs, and where the halves can meet, is in docs/wave64-on-32-lane-hosts.md.

Level 1, exact within a half (the first commits): DPP rows, ds_swizzle, and ds_bpermute_b32, which the console's wave64 permutes within each half on its own (RDNA2 ISA; measured on RDNA2 in #573). A lane's bit of a mask held as a number, v_writelane_b32, v_mbcnt and the row a DPP row mask names take the console lane. A first-lane read of a value proven the same in every lane of the console wave (halves::lane_uniform) is the host's. A group of 32 threads or fewer is one host wave, which holds its whole console wave.

Level 2, the halves trade where every thread meets (Lower::trade): each half writes its words to group-shared slots, a group barrier, each half reads both, a second barrier. Only at blocks every thread of the group reaches the same number of times (no lane-dependent branch has them in its region; in groups of several console waves, no branch at all), since a barrier one half skips hangs NVIDIA. Where the program's LDS takes the host's whole 32 KiB and leaves the slots no room, they are its first dwords, borrowed: saved before the trade and given back after, three barriers more for such programs only.

  • v_readlane_b32: the half holding the lane gives it.
  • v_readfirstlane_b32: each half's first lane in EXEC and whether it has one; the low half's if any.
  • Lane masks read as data: each half's ballot is one dword of the console's mask.
  • Whole-wave reductions and prefix sums: each half's part, combined low half first.
  • LDS of a group of one console wave (33-64 threads, which the console compiler leaves without barriers): group barriers put the two host waves in the console's order, before an access that may meet an earlier one and around regions only some lanes run.

Level 3, inside a branch or a loop only some lanes run (the per-lane form turns the console's wave-wide tests, s_cbranch_execz and s_cbranch_vccz on a ballot, into such branches and loops):

  • One half alone (emit::lower::confine): where a block's entry condition shows that only one half's lanes can run it (tid < 16 in an LDS tree step), that half's host wave runs it alone, in the console's order, and nothing crosses.
  • Wave-wide (emit::lower::wide): otherwise the region runs wave-wide (the blocks not every thread meets at, entered from one block and left to one or reaching the program's end): every thread runs every block of it, each block acting only in its own lanes (guards take the block's lanes in, join phis pick per lane by the edge it came by), so the halves trade and order LDS there. A branch the whole group takes together (a scalar compare in a group of one console wave, as the title's programs open with to skip their work) may also go around the region to its join, or into it past its head: the group then runs the region from its first block with every lane in the block it went to and none before, and a descriptor chosen by control flow where it goes in is the console wave's scalar, folded as below.
  • Wave-wide loops: a loop each lane leaves in its own round (the console's scalarization loops) runs as the console's wave runs it: every thread goes round while any lane of the group does, decided across every half of the group at the end of each round. A lane that leaves is out of the loop from then on, and what it holds (VGPRs by their guarded writes, compare bits kept per lane) stays as it left it.
  • Scalars are the console wave's. On the console a scalar belongs to the wave: after a branch or a loop only some lanes take, every lane holds what the last block the wave ran left, also a lane that skipped it or never entered the loop. In a wave-wide region a scalar phi takes the value of the last of its edges' blocks that some lane of the wave ran (each half's ballot of the block's lanes, traded), and a loop keeps a scalar read outside its block in every lane from the last round the wave ran that block (Lower::wide_fold, wide_keep_block). A join that reads a scalar whose value differs by the way a lane came, outside such a region, runs its region wave-wide on the next attempt (Lower::scalar_join).
  • Only where an attempt was refused for want of a meeting, or a join reads such a scalar: programs that need neither are lowered exactly as before, and should the attempt for a scalar fail, the one before it stands. Regions with scalar side effects or loops entered past their header are not taken.

First lanes alone bring a program into halves. A wave64 program whose only cross-lane read is the first lane of a value halves::lane_uniform does not prove alike in every lane now runs in halves too (halves::first_across); before, each 32-lane host wave read its own first lane (lane 32's in the upper half). Should every attempt in halves fail, it is lowered as before, each host wave reading its own first lane, which is exact for the compiler's scalarization loops and for values it keeps the same in every lane (one title program, a scalarization loop).

Sections the simulation cannot follow run step by step (halves::Literal): a whole-wave reduction the console compiler expands can leave a value whose lanes hold different things (each half's sum in some lanes, the wave's in others), which a later masked write keeps in the lanes it leaves out. Main keeps such a value as zero there; in halves, where every thread meets and the group is whole console waves, the section now runs instruction by instruction (DPP and the lane permutes within a half, its lane reads across the halves traded), so those lanes hold the console's values. In a block run wave-wide the steps run in every lane of the console wave and the section's lanes are the block's (a reduction there counted lanes that had left the loop), and a section where not every thread meets runs its region wave-wide. 16-bit sums run the same way, each step rounded as the console's. v_permlane16_b32 and v_permlanex16_b32 are lowered per instruction in compute on every host (before, only inside sections).

Still refused, each with a reason naming the host: a cross-half read in a region of neither shape (1), groups of several rows a host may tile (rows 32+ threads wide or not a power of two; measured here and in #2126; 6).

Two fixes to this PR's own earlier commits, found by the random tests: a loop's latch (and a loop of one block) counted as a point where every thread meets, so a trade there put barriers in a loop the two halves may go round different numbers of times, which hangs NVIDIA; and a value written in such a loop counted as the same in every lane after it, though each lane holds its own last round's (a first-lane read after the loop gave the upper half lane 32's value). No program of the title changed outcome.

victory-gpu asks the device once (D3D12_OPTIONS1) and translates for it. The shader cache keys on it, so entries made for 64-lane hosts are never read on a 32-lane one, or the other way round. victory translate --wave32 translates for such a host offline; with --pipelines it follows the GPU that makes them.

New code lives in emit/lower/halves.rs, confine.rs and wide.rs, with a few named hooks in lower.rs; lower.rs's unit tests move to lower/tests.rs (as #233 does), so lower.rs is 480,649 bytes, under the policy's 512 KiB cap.

Evidence

victory translate --list --wave32 --validate over shaders.rpf, the executable, XboxBvhBuilder.dll and amd_fidelityfx_upscaler_xbox.dll; compute programs emitted (of 2,763), commit by commit, none lost on the way:

Commit Compute emitted
halves, Level 1 (86a16dc) 2,369
groups of 32 threads or fewer 2,375
lane reads traded 2,421
one-wave LDS put in order 2,443
first lanes, masks, reductions traded 2,463
regions one half runs alone 2,485
wave-wide regions 2,542
a lane-dependent loop is no meeting point (the fixes) 2,542
wave-wide loops 2,650
regions to the program's end, loops of several console waves 2,697
sections step by step, lane permutes per instruction 2,704
regions a whole-group branch goes around or into 2,721
sections step by step in wave-wide blocks 2,723
scalars the console wave's, first lanes alone in halves 2,723
descriptors chosen where the whole group goes into a region 2,725
trades through slots borrowed from a full LDS 2,727
  • Every program gained validates but 12, which fail the validator's "incompatible with the shader stage" check as 735 compute programs did before this PR.
  • With --pipelines on the RTX 3070 Ti (driver 621.24): 2,727 of 2,727 compute pipelines made, none refused by the driver; vertex/pixel 14,258 and mesh 8,765 (25,750 in all). In the title's own pipeline pack, the compute pipelines skipped because their shader does not translate go from 292 (the stack before Level 3 loops) to 60.
  • Gained by Levels 2-3 include every temporal resolve (CS_ApplyTemporalAA, CS_SceneColorTemporalResolve*, CS_TemporalResolve*), the deferred gathers, screen-probe GI ray tracing, the ray pre-passes, the tiled shadow passes and cascades, shadow ray tracing and denoisers, the irradiance cache, volumetrics, prop and tree batch culling, the depth pyramids, the mip generators, the BVH builder's passes, particles, the tile classifiers and the LDS tree reductions.
  • 87 programs run in halves for their first-lane reads (one, a scalarization loop, falls back to the lowering before), and 16 run a region wave-wide for a scalar a join reads.
  • Still refused in halves: 1 mask (see above), 6 tiled group shapes.
  • Against #439 (head e2d3cfd, on the same main, same inputs): this translates 68 compute programs #439 refuses (44 in groups of more than 64 threads, 11 that reach title memory by address, 11 implicit-derivative samples, 2 lane permutes), and #439 translates 4 this refuses: the tiled group shapes, which in its split form give some threads another thread's id on NVIDIA (measured on the RTX 3070 Ti).

Lyrnc's fw64 cases (151 hand-written wave64 programs, gist, results of a gfx1036 running them in wave64 as the oracle; run here with a local harness, not committed), exact / differ / refused in halves, the same on the RTX 3070 Ti and the Radeon iGPU:

case kind n b32cef7 + sections in wave-wide blocks + scalars, first lanes main's form, native wave64 (Radeon)
reduction in a branch 40 8 / 32 / 0 8 / 32 / 0 40 / 0 / 0 8 / 32 / 0
v_readfirstlane in a branch 10 1 / 9 / 0 1 / 9 / 0 10 / 0 / 0 1 / 9 / 0
v_readlane in a branch 20 4 / 16 / 0 4 / 16 / 0 20 / 0 / 0 4 / 16 / 0
LDS min/max one wave shares 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
allocation idiom in a branch 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
v_writelane in a branch 18 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0
reduction in two nested branches 6 0 / 6 / 0 0 / 6 / 0 6 / 0 / 0 0 / 6 / 0
reduction in a loop lanes leave 3 0 / 3 / 0 0 / 3 / 0 3 / 0 / 0 0 / 3 / 0
reduction after an early-out 6 1 / 5 / 0 1 / 5 / 0 6 / 0 / 0 1 / 5 / 0
LDS written and read in a branch 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
vote loop and reduction in a branch 6 2 / 4 / 0 2 / 4 / 0 2 / 4 / 0 2 / 4 / 0
vote loop alone 5 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0
break loop (s_cbranch_scc0) 7 1 / 6 / 0 1 / 6 / 0 2 / 5 / 0 1 / 6 / 0
all 151 59 / 92 / 0 (4,791 wrong words) 59 / 92 / 0 (4,633 wrong words) 131 / 20 / 0 (867 wrong words) 59 / 92 / 0 (5,025 wrong words)

The 20 that still differ also differ in main's native wave64, in the same words, and halves is never wrong where it is right: v_writelane_b32 to a lane outside EXEC (8), the s_cbranch_vccz vote loops (7) and a loop-mask exit block the console runs with the last round's lanes only (5), which the per-lane form decides per lane (the console flow, #320, handles them).

Earlier, at the first commits, on the RTX 3070 Ti (driver 32.0.16.2124): main refused 405 compute pipelines (the driver), this PR none; in the title (Series S mode, to the loading screen) no pipeline refused (main: 100).

Tests

emit::halves_tests runs hand-encoded programs on every hardware adapter, in halves everywhere and as one wave64 where the adapter has 64-lane waves, against the console's results: an RTX 3070 Ti (halves) and the Radeon iGPU of a Ryzen 9 7900X (RDNA2, halves and wave64), 0 lanes differ.

  • Level 1: DPP, swizzles, permutes, v_mbcnt, v_writelane, constant masks, DPP row masks, first lanes kept, every thread's id in 4x4x4 to 64x1x4 groups (and tiled shapes refused).
  • Level 2: lane reads, first lanes (also under a narrowed EXEC), masks, sums and prefix sums in groups of 48, 64, 96 and 128; one-wave LDS across the halves, across a branch, and after a spin that only barriers keep in order (64 of 64 lanes wrong without them, on both GPUs).
  • Level 3: LDS tree steps in either half alone; branches of both halves run wave-wide with first lanes, masks, lane reads (including a lane outside the branch, which keeps its old value as on the console) and one-wave LDS written and read or written twice; each trade costs two barriers, a one-half region none. Loops each lane leaves in its own round (the halves going round 3 and 4 times), with first lanes, masks and LDS read across rounds, in groups of 48 to 128; a first-lane read after such a loop; lanes that end partway, then a mask and a first lane over those left.
  • Whole-group branches: lanes that end, a mask and a first lane, with a scalar branch taking the whole group around all of it or into the first-lane read with every lane, also with the stores' descriptor chosen where the group goes in, in groups of 48, 64 and 128 (the modules validate).
  • Sections step by step: the console compiler's wave64 sum whose lanes 32-63 hold twice the high half's, kept by lanes a later masked write leaves out, in groups of 64 and 128 (main's one-wave64 form stores 0 in 44 of 64 lanes there); a 16-bit wave sum. Both lane permutes with every lane and with half the lanes, plain, bound_ctrl and fi, in groups of 48, 64 and 128.
  • Scalars: a first-lane read in a branch of each of Lyrnc's masks (one half, the other, both, alternate, one lane in either half, lanes 31 and 32, none), stored inside the branch and by every lane after the join, in groups of 64 and 128, the program in halves for that read alone; a loop console lane t runs t rounds of (lane 0 none), reading lane 40 and counting rounds in scalars every lane stores after it, with an ordinary latch and with the read in a branch whose EXEC is joined again before the way back, in groups of 48, 64 and 128 (after pickles976's consumers of #439's lane_read_loop_tests); the console's wave64 sum run step by step in a wave-wide branch.
  • A trade beside LDS of the host's whole 32 KiB, through slots borrowed from it: every thread's LDS dword is the program's again after it (groups of 48, 64 and 128, the last in halves for its first-lane read alone).
  • Refusals name their reasons; a kept refused value refuses the write instead of storing 0; the hand-encoded words are checked against the disassembler.

emit::halves_random_tests generates random wave64 programs (cross-lane steps at the top level, in branches one inside another and in loops each lane leaves in its own round, LDS, scalar branches, lanes that end partway, whole-group branches around or into a lane branch) and runs each in halves on both GPUs and as one wave64 on the Radeon, lane by lane: 3,000 seeds, 2,999 compared, none refused in halves, 0 differ (seed 1922, which crashes the Radeon driver's compiler making the one-wave64 reference, is skipped). It found the kept-value bug and the two loop bugs above, each fixed in its own commit, a Radeon compiler fault after a loop with a second way out, which the loops avoid, and two places where a region that could run wave-wide was not asked for.

Checks: cargo clippy --workspace --all-targets --locked -- -D warnings and the same with --all-features: clean. cargo xtask policy: ok. cargo test -p victory-shader --lib -- --test-threads=1: 332 passed, 3 failed, the same 3 as on main on this NVIDIA machine (stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware); memory_tests::heap_direct_texture_reads_mark_their_heap_index crashes the test process on main here too and is skipped.

This overlaps #189, #192, #233/#320/#439, #1890, #2176, #2214, #2711 and #2925 (wave64 on 32-lane hosts) and #578 (refusing them). It differs in that cross-half reads are refused or traded at the site that makes them, with a reason (programs whose crossing value is unused still translate), the halves meet only where every thread provably does (wave-wide only where needed, instead of the console flow everywhere), and every form is checked against the console's own wave64 on an RDNA2 adapter in the same test. The cache-key idea is #2176's (n-romanovich). It does not change ds_bpermute_b32 for 64-lane hosts, which is #573's.

Credits

  • The approach of running console wave64 programs as two 32-lane host waves, with the thread relabelling into halves, follows DexNom's fork (DexNom/Victory, 5f4c3df, set_host_max_wave), which credits the victory-world-runtime line (ZSlayerHQ and contributors). Here it is written anew on main as a translation option.
  • Keying the shader cache on the host's wave width: #2176 (n-romanovich).
  • ds_bpermute_b32 within halves: #573 (banbanzhige) and the RDNA2 measurements in its thread.
  • Which values are the same in every lane of the console wave (halves::lane_uniform), and the first-lane bug report: justrealyme (chippy01/VIctory#1), ported from fxceless/victory-fork (#497 there).
  • The tests move out of lower.rs as in r4tedx's #233.
  • Lyrnc's fw64 cases and gfx1036 results, which found the scalar joins and the program left out of halves; pickles976's routing probe and lane-loop consumers (after #439's lane_read_loop_tests), ColorMeBoom's run that found the reduction counting lanes that had left a loop, and carlosmegino's and TaynanGT's matched controls. #269 (TheHoracio) gives scalars the same meaning in main's per-lane form on hosts whose waves are the console's.

AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5495834815 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T17:15:20Z. --- ## The problem A console wave64 compute program that needs the console's lanes (cross-lane reads, masks read as numbers, LDS one wave shares) declares `WaveSize(64)`. NVIDIA and Intel run waves of at most 32 lanes (`WaveLaneCountMax` 32) and refuse it. On an RTX 3070 Ti the debug layer says: > Shader wants wave lane count of 64 but maximum wave lane count for device is 32 (id 622) and the pipeline is refused with `E_INVALIDARG`. A Series S run to the loading screen refused 100 compute pipelines; 95 of them were for this reason. ## The change On such a host, a wave64 program that needs the console's lanes is translated for waves of 32 ("halves", `emit::lower::halves`, set by `emit::Options::host_wave32`). The thread relabelling gives each host wave a 32-aligned run of thread ids, so host wave `2w + h` holds lanes `32h..32h + 31` of console wave `w`. What each cross-lane operation needs, and where the halves can meet, is in `docs/wave64-on-32-lane-hosts.md`. **Level 1, exact within a half** (the first commits): DPP rows, `ds_swizzle`, and `ds_bpermute_b32`, which the console's wave64 permutes within each half on its own (RDNA2 ISA; measured on RDNA2 in #573). A lane's bit of a mask held as a number, `v_writelane_b32`, `v_mbcnt` and the row a DPP row mask names take the **console** lane. A first-lane read of a value proven the same in every lane of the console wave (`halves::lane_uniform`) is the host's. A group of 32 threads or fewer is one host wave, which holds its whole console wave. **Level 2, the halves trade where every thread meets** (`Lower::trade`): each half writes its words to group-shared slots, a group barrier, each half reads both, a second barrier. Only at blocks every thread of the group reaches the same number of times (no lane-dependent branch has them in its region; in groups of several console waves, no branch at all), since a barrier one half skips hangs NVIDIA. Where the program's LDS takes the host's whole 32 KiB and leaves the slots no room, they are its first dwords, borrowed: saved before the trade and given back after, three barriers more for such programs only. - `v_readlane_b32`: the half holding the lane gives it. - `v_readfirstlane_b32`: each half's first lane in EXEC and whether it has one; the low half's if any. - Lane masks read as data: each half's ballot is one dword of the console's mask. - Whole-wave reductions and prefix sums: each half's part, combined low half first. - LDS of a group of one console wave (33-64 threads, which the console compiler leaves without barriers): group barriers put the two host waves in the console's order, before an access that may meet an earlier one and around regions only some lanes run. **Level 3, inside a branch or a loop only some lanes run** (the per-lane form turns the console's wave-wide tests, `s_cbranch_execz` and `s_cbranch_vccz` on a ballot, into such branches and loops): - **One half alone** (`emit::lower::confine`): where a block's entry condition shows that only one half's lanes can run it (`tid < 16` in an LDS tree step), that half's host wave runs it alone, in the console's order, and nothing crosses. - **Wave-wide** (`emit::lower::wide`): otherwise the region runs wave-wide (the blocks not every thread meets at, entered from one block and left to one or reaching the program's end): every thread runs every block of it, each block acting only in its own lanes (guards take the block's lanes in, join phis pick per lane by the edge it came by), so the halves trade and order LDS there. A branch the whole group takes together (a scalar compare in a group of one console wave, as the title's programs open with to skip their work) may also go around the region to its join, or into it past its head: the group then runs the region from its first block with every lane in the block it went to and none before, and a descriptor chosen by control flow where it goes in is the console wave's scalar, folded as below. - **Wave-wide loops**: a loop each lane leaves in its own round (the console's scalarization loops) runs as the console's wave runs it: every thread goes round while any lane of the group does, decided across every half of the group at the end of each round. A lane that leaves is out of the loop from then on, and what it holds (VGPRs by their guarded writes, compare bits kept per lane) stays as it left it. - **Scalars are the console wave's.** On the console a scalar belongs to the wave: after a branch or a loop only some lanes take, every lane holds what the last block the wave ran left, also a lane that skipped it or never entered the loop. In a wave-wide region a scalar phi takes the value of the last of its edges' blocks that some lane of the wave ran (each half's ballot of the block's lanes, traded), and a loop keeps a scalar read outside its block in every lane from the last round the wave ran that block (`Lower::wide_fold`, `wide_keep_block`). A join that reads a scalar whose value differs by the way a lane came, outside such a region, runs its region wave-wide on the next attempt (`Lower::scalar_join`). - Only where an attempt was refused for want of a meeting, or a join reads such a scalar: programs that need neither are lowered exactly as before, and should the attempt for a scalar fail, the one before it stands. Regions with scalar side effects or loops entered past their header are not taken. **First lanes alone bring a program into halves.** A wave64 program whose only cross-lane read is the first lane of a value `halves::lane_uniform` does not prove alike in every lane now runs in halves too (`halves::first_across`); before, each 32-lane host wave read its own first lane (lane 32's in the upper half). Should every attempt in halves fail, it is lowered as before, each host wave reading its own first lane, which is exact for the compiler's scalarization loops and for values it keeps the same in every lane (one title program, a scalarization loop). **Sections the simulation cannot follow run step by step** (`halves::Literal`): a whole-wave reduction the console compiler expands can leave a value whose lanes hold different things (each half's sum in some lanes, the wave's in others), which a later masked write keeps in the lanes it leaves out. Main keeps such a value as zero there; in halves, where every thread meets and the group is whole console waves, the section now runs instruction by instruction (DPP and the lane permutes within a half, its lane reads across the halves traded), so those lanes hold the console's values. In a block run wave-wide the steps run in every lane of the console wave and the section's lanes are the block's (a reduction there counted lanes that had left the loop), and a section where not every thread meets runs its region wave-wide. 16-bit sums run the same way, each step rounded as the console's. `v_permlane16_b32` and `v_permlanex16_b32` are lowered per instruction in compute on every host (before, only inside sections). **Still refused**, each with a reason naming the host: a cross-half read in a region of neither shape (1), groups of several rows a host may tile (rows 32+ threads wide or not a power of two; measured here and in #2126; 6). **Two fixes to this PR's own earlier commits**, found by the random tests: a loop's latch (and a loop of one block) counted as a point where every thread meets, so a trade there put barriers in a loop the two halves may go round different numbers of times, which hangs NVIDIA; and a value written in such a loop counted as the same in every lane after it, though each lane holds its own last round's (a first-lane read after the loop gave the upper half lane 32's value). No program of the title changed outcome. `victory-gpu` asks the device once (`D3D12_OPTIONS1`) and translates for it. **The shader cache keys on it**, so entries made for 64-lane hosts are never read on a 32-lane one, or the other way round. `victory translate --wave32` translates for such a host offline; with `--pipelines` it follows the GPU that makes them. New code lives in `emit/lower/halves.rs`, `confine.rs` and `wide.rs`, with a few named hooks in `lower.rs`; `lower.rs`'s unit tests move to `lower/tests.rs` (as #233 does), so `lower.rs` is 480,649 bytes, under the policy's 512 KiB cap. ## Evidence `victory translate --list --wave32 --validate` over `shaders.rpf`, the executable, `XboxBvhBuilder.dll` and `amd_fidelityfx_upscaler_xbox.dll`; compute programs emitted (of 2,763), commit by commit, none lost on the way: | Commit | Compute emitted | |---|---| | halves, Level 1 (`86a16dc`) | 2,369 | | groups of 32 threads or fewer | 2,375 | | lane reads traded | 2,421 | | one-wave LDS put in order | 2,443 | | first lanes, masks, reductions traded | 2,463 | | regions one half runs alone | 2,485 | | wave-wide regions | 2,542 | | a lane-dependent loop is no meeting point (the fixes) | 2,542 | | wave-wide loops | 2,650 | | regions to the program's end, loops of several console waves | 2,697 | | sections step by step, lane permutes per instruction | 2,704 | | regions a whole-group branch goes around or into | 2,721 | | sections step by step in wave-wide blocks | 2,723 | | scalars the console wave's, first lanes alone in halves | 2,723 | | descriptors chosen where the whole group goes into a region | 2,725 | | trades through slots borrowed from a full LDS | **2,727** | - Every program gained validates but 12, which fail the validator's "incompatible with the shader stage" check as 735 compute programs did before this PR. - With `--pipelines` on the RTX 3070 Ti (driver 621.24): **2,727 of 2,727 compute pipelines made**, none refused by the driver; vertex/pixel 14,258 and mesh 8,765 (25,750 in all). In the title's own pipeline pack, the compute pipelines skipped because their shader does not translate go from 292 (the stack before Level 3 loops) to 60. - Gained by Levels 2-3 include every temporal resolve (CS_ApplyTemporalAA, CS_SceneColorTemporalResolve*, CS_TemporalResolve*), the deferred gathers, screen-probe GI ray tracing, the ray pre-passes, the tiled shadow passes and cascades, shadow ray tracing and denoisers, the irradiance cache, volumetrics, prop and tree batch culling, the depth pyramids, the mip generators, the BVH builder's passes, particles, the tile classifiers and the LDS tree reductions. - 87 programs run in halves for their first-lane reads (one, a scalarization loop, falls back to the lowering before), and 16 run a region wave-wide for a scalar a join reads. - Still refused in halves: 1 mask (see above), 6 tiled group shapes. - Against #439 (head `e2d3cfd`, on the same `main`, same inputs): this translates 68 compute programs #439 refuses (44 in groups of more than 64 threads, 11 that reach title memory by address, 11 implicit-derivative samples, 2 lane permutes), and #439 translates 4 this refuses: the tiled group shapes, which in its split form give some threads another thread's id on NVIDIA (measured on the RTX 3070 Ti). **Lyrnc's fw64 cases** (151 hand-written wave64 programs, [gist](https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131), results of a gfx1036 running them in wave64 as the oracle; run here with a local harness, not committed), exact / differ / refused in halves, the same on the RTX 3070 Ti and the Radeon iGPU: | case kind | n | `b32cef7` | + sections in wave-wide blocks | + scalars, first lanes | `main`'s form, native wave64 (Radeon) | |---|---|---|---|---|---| | reduction in a branch | 40 | 8 / 32 / 0 | 8 / 32 / 0 | **40 / 0 / 0** | 8 / 32 / 0 | | `v_readfirstlane` in a branch | 10 | 1 / 9 / 0 | 1 / 9 / 0 | **10 / 0 / 0** | 1 / 9 / 0 | | `v_readlane` in a branch | 20 | 4 / 16 / 0 | 4 / 16 / 0 | **20 / 0 / 0** | 4 / 16 / 0 | | LDS min/max one wave shares | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | allocation idiom in a branch | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `v_writelane` in a branch | 18 | 10 / 8 / 0 | 10 / 8 / 0 | 10 / 8 / 0 | 10 / 8 / 0 | | reduction in two nested branches | 6 | 0 / 6 / 0 | 0 / 6 / 0 | **6 / 0 / 0** | 0 / 6 / 0 | | reduction in a loop lanes leave | 3 | 0 / 3 / 0 | 0 / 3 / 0 | **3 / 0 / 0** | 0 / 3 / 0 | | reduction after an early-out | 6 | 1 / 5 / 0 | 1 / 5 / 0 | **6 / 0 / 0** | 1 / 5 / 0 | | LDS written and read in a branch | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | vote loop and reduction in a branch | 6 | 2 / 4 / 0 | 2 / 4 / 0 | 2 / 4 / 0 | 2 / 4 / 0 | | vote loop alone | 5 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | | break loop (`s_cbranch_scc0`) | 7 | 1 / 6 / 0 | 1 / 6 / 0 | **2 / 5 / 0** | 1 / 6 / 0 | | **all** | 151 | 59 / 92 / 0 (4,791 wrong words) | 59 / 92 / 0 (4,633 wrong words) | **131 / 20 / 0 (867 wrong words)** | 59 / 92 / 0 (5,025 wrong words) | The 20 that still differ also differ in `main`'s native wave64, in the same words, and halves is never wrong where it is right: `v_writelane_b32` to a lane outside EXEC (8), the `s_cbranch_vccz` vote loops (7) and a loop-mask exit block the console runs with the last round's lanes only (5), which the per-lane form decides per lane (the console flow, #320, handles them). Earlier, at the first commits, on the RTX 3070 Ti (driver 32.0.16.2124): main refused 405 compute pipelines (the driver), this PR none; in the title (Series S mode, to the loading screen) no pipeline refused (main: 100). ## Tests `emit::halves_tests` runs hand-encoded programs on **every hardware adapter**, in halves everywhere and as one wave64 where the adapter has 64-lane waves, against the console's results: an RTX 3070 Ti (halves) and the Radeon iGPU of a Ryzen 9 7900X (RDNA2, halves and wave64), 0 lanes differ. - Level 1: DPP, swizzles, permutes, `v_mbcnt`, `v_writelane`, constant masks, DPP row masks, first lanes kept, every thread's id in 4x4x4 to 64x1x4 groups (and tiled shapes refused). - Level 2: lane reads, first lanes (also under a narrowed EXEC), masks, sums and prefix sums in groups of 48, 64, 96 and 128; one-wave LDS across the halves, across a branch, and after a spin that only barriers keep in order (64 of 64 lanes wrong without them, on both GPUs). - Level 3: LDS tree steps in either half alone; branches of both halves run wave-wide with first lanes, masks, lane reads (including a lane outside the branch, which keeps its old value as on the console) and one-wave LDS written and read or written twice; each trade costs two barriers, a one-half region none. Loops each lane leaves in its own round (the halves going round 3 and 4 times), with first lanes, masks and LDS read across rounds, in groups of 48 to 128; a first-lane read after such a loop; lanes that end partway, then a mask and a first lane over those left. - Whole-group branches: lanes that end, a mask and a first lane, with a scalar branch taking the whole group around all of it or into the first-lane read with every lane, also with the stores' descriptor chosen where the group goes in, in groups of 48, 64 and 128 (the modules validate). - Sections step by step: the console compiler's wave64 sum whose lanes 32-63 hold twice the high half's, kept by lanes a later masked write leaves out, in groups of 64 and 128 (main's one-wave64 form stores 0 in 44 of 64 lanes there); a 16-bit wave sum. Both lane permutes with every lane and with half the lanes, plain, `bound_ctrl` and `fi`, in groups of 48, 64 and 128. - Scalars: a first-lane read in a branch of each of Lyrnc's masks (one half, the other, both, alternate, one lane in either half, lanes 31 and 32, none), stored inside the branch and by every lane after the join, in groups of 64 and 128, the program in halves for that read alone; a loop console lane t runs t rounds of (lane 0 none), reading lane 40 and counting rounds in scalars every lane stores after it, with an ordinary latch and with the read in a branch whose EXEC is joined again before the way back, in groups of 48, 64 and 128 (after pickles976's consumers of #439's `lane_read_loop_tests`); the console's wave64 sum run step by step in a wave-wide branch. - A trade beside LDS of the host's whole 32 KiB, through slots borrowed from it: every thread's LDS dword is the program's again after it (groups of 48, 64 and 128, the last in halves for its first-lane read alone). - Refusals name their reasons; a kept refused value refuses the write instead of storing 0; the hand-encoded words are checked against the disassembler. `emit::halves_random_tests` generates random wave64 programs (cross-lane steps at the top level, in branches one inside another and in loops each lane leaves in its own round, LDS, scalar branches, lanes that end partway, whole-group branches around or into a lane branch) and runs each in halves on both GPUs and as one wave64 on the Radeon, lane by lane: 3,000 seeds, 2,999 compared, none refused in halves, 0 differ (seed 1922, which crashes the Radeon driver's compiler making the one-wave64 reference, is skipped). It found the kept-value bug and the two loop bugs above, each fixed in its own commit, a Radeon compiler fault after a loop with a second way out, which the loops avoid, and two places where a region that could run wave-wide was not asked for. Checks: `cargo clippy --workspace --all-targets --locked -- -D warnings` and the same with `--all-features`: clean. `cargo xtask policy`: ok. `cargo test -p victory-shader --lib -- --test-threads=1`: 332 passed, 3 failed, the **same 3** as on `main` on this NVIDIA machine (`stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`); `memory_tests::heap_direct_texture_reads_mark_their_heap_index` crashes the test process on `main` here too and is skipped. ## Related pull requests This overlaps #189, #192, #233/#320/#439, #1890, #2176, #2214, #2711 and #2925 (wave64 on 32-lane hosts) and #578 (refusing them). It differs in that cross-half reads are refused or traded at the site that makes them, with a reason (programs whose crossing value is unused still translate), the halves meet only where every thread provably does (wave-wide only where needed, instead of the console flow everywhere), and every form is checked against the console's own wave64 on an RDNA2 adapter in the same test. The cache-key idea is #2176's (n-romanovich). It does not change `ds_bpermute_b32` for 64-lane hosts, which is #573's. ## Credits - The approach of running console wave64 programs as two 32-lane host waves, with the thread relabelling into halves, follows DexNom's fork ([DexNom/Victory](https://github.com/DexNom/Victory), `5f4c3df`, `set_host_max_wave`), which credits the victory-world-runtime line (ZSlayerHQ and contributors). Here it is written anew on main as a translation option. - Keying the shader cache on the host's wave width: #2176 (n-romanovich). - `ds_bpermute_b32` within halves: #573 (banbanzhige) and the RDNA2 measurements in its thread. - Which values are the same in every lane of the console wave (`halves::lane_uniform`), and the first-lane bug report: justrealyme (chippy01/VIctory#1), ported from fxceless/victory-fork (#497 there). - The tests move out of `lower.rs` as in r4tedx's #233. - Lyrnc's fw64 cases and gfx1036 results, which found the scalar joins and the program left out of halves; pickles976's routing probe and lane-loop consumers (after #439's `lane_read_loop_tests`), ColorMeBoom's run that found the reduction counting lanes that had left a loop, and carlosmegino's and TaynanGT's matched controls. #269 (TheHoracio) gives scalars the same meaning in `main`'s per-lane form on hosts whose waves are the console's. AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.
Aniseto commented 2026-11-25 18:02:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Aniseto on 2026-11-25T17:17:28Z.


Ran the new halves tests at a7e78c1 (clean PR head on main 13f91ca):

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB), driver 32.0.16.2124
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: Rust 1.98.1 (pinned by rust-toolchain.toml), MSVC 14.44.35207, DXIL validator from the Windows SDK default path (this filter does not print its version), debug build

Results

  • cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1 --nocapture: 5 passed, 0 failed, 0 ignored, 273 filtered out (exit 0)
  • wave64_programs_in_halves_match_the_console_on_every_gpu printed: NVIDIA GeForce RTX 5070 Ti (halves): 0 lanes of 64 differ from the console, and NVIDIA GeForce RTX 5070 Ti (wave64): no pipeline for 64-lane waves; skipped, twice (both adapters in the host list).

What this adds
The author's hardware evidence in the thread is an Ampere RTX 3070 Ti plus an RDNA2 iGPU. This adds a Blackwell wave32 part: the GPU parity test ran here and all 64 lanes matched the console's result in the halves form, while the 64-lane form was refused by the adapter as expected. The other four halves tests also pass.

Not tested
The whole victory-shader library (the description lists three pre-existing failures on NVIDIA), victory-gpu, the retail shader-pack census, a title run, the console compiler, release profile, Intel GPUs and native-wave64 hardware.

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

Update (25/11, after the head moved to 25db879): relative to the head I tested (a7e78c1), the new commit only changes README.md; no shader code changed. Re-ran the same command at 25db879:

cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1 --nocapture
5 passed; 0 failed; 0 ignored; 273 filtered out      (exit 0)

Same GPU output: NVIDIA GeForce RTX 5070 Ti (halves): 0 lanes of 64 differ from the console, and the 64-lane form skipped because this adapter has no 64-lane waves.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7169285954 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7169285954). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-25T17:17:28Z. --- Ran the new halves tests at `a7e78c1` (clean PR head on `main` `13f91ca`): **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB), driver 32.0.16.2124 - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: Rust 1.98.1 (pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXIL validator from the Windows SDK default path (this filter does not print its version), debug build **Results** - `cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1 --nocapture`: 5 passed, 0 failed, 0 ignored, 273 filtered out (exit 0) - `wave64_programs_in_halves_match_the_console_on_every_gpu` printed: `NVIDIA GeForce RTX 5070 Ti (halves): 0 lanes of 64 differ from the console`, and `NVIDIA GeForce RTX 5070 Ti (wave64): no pipeline for 64-lane waves; skipped`, twice (both adapters in the host list). **What this adds** The author's hardware evidence in the thread is an Ampere RTX 3070 Ti plus an RDNA2 iGPU. This adds a Blackwell wave32 part: the GPU parity test ran here and all 64 lanes matched the console's result in the halves form, while the 64-lane form was refused by the adapter as expected. The other four halves tests also pass. **Not tested** The whole `victory-shader` library (the description lists three pre-existing failures on NVIDIA), `victory-gpu`, the retail shader-pack census, a title run, the console compiler, release profile, Intel GPUs and native-wave64 hardware. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. Update (25/11, after the head moved to `25db879`): relative to the head I tested (`a7e78c1`), the new commit only changes README.md; no shader code changed. Re-ran the same command at `25db879`: ``` cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1 --nocapture 5 passed; 0 failed; 0 ignored; 273 filtered out (exit 0) ``` Same GPU output: `NVIDIA GeForce RTX 5070 Ti (halves): 0 lanes of 64 differ from the console`, and the 64-lane form skipped because this adapter has no 64-lane waves.
kotekompotek commented 2026-11-25 18:02:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:49:44Z.


Heads-up: the README hunk contains a committed merge conflict — <<<<<<< HEAD / ======= / >>>>>>> a7e78c1 markers are in the diff (GPU: world + Shaders table rows). The branch needs a rebase resolving that hunk (keep the new wave64-halves text), otherwise the table renders the raw markers.

The actual change — --wave32 translate flag conflicting with --cache, wave64 split halves on 32-lane hosts — looks right otherwise; CI green.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170056983 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7170056983). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:49:44Z. --- Heads-up: the README hunk contains a committed merge conflict — `<<<<<<< HEAD` / `=======` / `>>>>>>> a7e78c1` markers are in the diff (GPU: world + Shaders table rows). The branch needs a rebase resolving that hunk (keep the new wave64-halves text), otherwise the table renders the raw markers. The actual change — `--wave32` translate flag conflicting with `--cache`, wave64 split halves on 32-lane hosts — looks right otherwise; CI green.
chippy01 commented 2026-11-25 18:02:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-25T17:56:10Z.


Heads-up: the README hunk contains a committed merge conflict — <<<<<<< HEAD / ======= / >>>>>>> a7e78c1 markers are in the diff (GPU: world + Shaders table rows). The branch needs a rebase resolving that hunk (keep the new wave64-halves text), otherwise the table renders the raw markers.

The actual change — --wave32 translate flag conflicting with --cache, wave64 split halves on 32-lane hosts — looks right otherwise; CI green.

My bad, I just fixed it

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170206837 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7170206837). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T17:56:10Z. --- > Heads-up: the README hunk contains a committed merge conflict — `<<<<<<< HEAD` / `=======` / `>>>>>>> a7e78c1` markers are in the diff (GPU: world + Shaders table rows). The branch needs a rebase resolving that hunk (keep the new wave64-halves text), otherwise the table renders the raw markers. > > The actual change — `--wave32` translate flag conflicting with `--cache`, wave64 split halves on 32-lane hosts — looks right otherwise; CI green. My bad, I just fixed it
sergiocr06 commented 2026-11-25 18:02:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sergiocr06 on 2026-11-25T18:01:49Z.


Ran the halves tests on a machine that has both kinds of host, a 32-lane NVIDIA dGPU and an RDNA3 iGPU with native wave64, so wave64_programs_in_halves_match_the_console_on_every_gpu checks all three paths on one box. PR head 25db879 on main 13f91ca.

System: RTX 5060 Laptop GPU 8 GB (Blackwell, driver 610.47) + Radeon 780M (RDNA3 iGPU, driver 32.0.31018.1), Ryzen 7 260, 32 GB, Windows 11 build 26300, Rust 1.98.1, debug build, validator from Windows SDK 10.0.26100.

NVIDIA GeForce RTX 5060 Laptop GPU (halves): 0 lanes of 64 differ from the console
NVIDIA GeForce RTX 5060 Laptop GPU (wave64): no pipeline for 64-lane waves; skipped
AMD Radeon 780M Graphics (halves): 0 lanes of 64 differ from the console
AMD Radeon 780M Graphics (wave64): 0 lanes of 64 differ from the console

Full victory-shader --lib:

main 13f91ca this PR
RTX 5060 (--skip heap_direct_texture_reads_mark_their_heap_index, #2571) 266 passed, 3 failed 271 passed, same 3 failed
Radeon 780M 270 passed, 0 failed 275 passed, 0 failed

The 3 are the known NVIDIA failures (#1835): stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware. No regression on either GPU.

Note for hybrid-laptop testers: Host::new in the test host takes the first adapter with dedicated memory. On this laptop that is the 780M (it reports a 417 MB carve-out), so a plain cargo test runs the single-adapter hardware tests on the iGPU, not the NVIDIA card. I forced the dGPU with a per-exe GPU preference (HKCU\Software\Microsoft\DirectX\UserGpuPreferences, GpuPreference=2;) and confirmed with nvidia-smi that the test process was on it.

AI-assisted (Claude Code); the runs were done on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170338846 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7170338846). Originally posted by [sergiocr06](https://github.com/sergiocr06) on 2026-11-25T18:01:49Z. --- Ran the halves tests on a machine that has both kinds of host, a 32-lane NVIDIA dGPU and an RDNA3 iGPU with native wave64, so `wave64_programs_in_halves_match_the_console_on_every_gpu` checks all three paths on one box. PR head `25db879` on `main` `13f91ca`. **System:** RTX 5060 Laptop GPU 8 GB (Blackwell, driver 610.47) + Radeon 780M (RDNA3 iGPU, driver 32.0.31018.1), Ryzen 7 260, 32 GB, Windows 11 build 26300, Rust 1.98.1, debug build, validator from Windows SDK 10.0.26100. ``` NVIDIA GeForce RTX 5060 Laptop GPU (halves): 0 lanes of 64 differ from the console NVIDIA GeForce RTX 5060 Laptop GPU (wave64): no pipeline for 64-lane waves; skipped AMD Radeon 780M Graphics (halves): 0 lanes of 64 differ from the console AMD Radeon 780M Graphics (wave64): 0 lanes of 64 differ from the console ``` Full `victory-shader --lib`: | | main `13f91ca` | this PR | |---|---|---| | RTX 5060 (`--skip heap_direct_texture_reads_mark_their_heap_index`, #2571) | 266 passed, 3 failed | 271 passed, same 3 failed | | Radeon 780M | 270 passed, 0 failed | 275 passed, 0 failed | The 3 are the known NVIDIA failures (#1835): `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`. No regression on either GPU. **Note for hybrid-laptop testers:** `Host::new` in the test host takes the first adapter with dedicated memory. On this laptop that is the 780M (it reports a 417 MB carve-out), so a plain `cargo test` runs the single-adapter hardware tests on the iGPU, not the NVIDIA card. I forced the dGPU with a per-exe GPU preference (`HKCU\Software\Microsoft\DirectX\UserGpuPreferences`, `GpuPreference=2;`) and confirmed with `nvidia-smi` that the test process was on it. AI-assisted (Claude Code); the runs were done on my machine.
justrealyme commented 2026-11-25 19:06:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by justrealyme on 2026-11-25T18:09:38Z.


Tested this on an RTX 5070 Ti (driver 621.40, Windows 11). The halves tests pass here too. I found one wrong result, though: v_readfirstlane_b32 in halves reads the host wave's first lane, which is console lane 32 for the upper half. Dispatched in halves (with v_mbcnt so the program has console lanes), v_readfirstlane_b32 s12, v0 gives 32 in all 32 upper lanes; the console gives 0.

Fix with tests: chippy01/VIctory#1 (onto this branch, rebased on 360f8aa). It keeps the first-lane read only for values proven alike across the console wave, ported from the analysis in fxceless/victory-fork, and refuses the rest with a reason. Offline over the title, 12 of 2,372 compute programs drop out with that reason; nothing else changes. On the GPU, alike values give 0 of 128 lanes wrong on the 5070 Ti and the Intel iGPU.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170523156 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7170523156). Originally posted by [justrealyme](https://github.com/justrealyme) on 2026-11-25T18:09:38Z. --- Tested this on an RTX 5070 Ti (driver 621.40, Windows 11). The halves tests pass here too. I found one wrong result, though: `v_readfirstlane_b32` in halves reads the **host** wave's first lane, which is console lane 32 for the upper half. Dispatched in halves (with `v_mbcnt` so the program has console lanes), `v_readfirstlane_b32 s12, v0` gives 32 in all 32 upper lanes; the console gives 0. Fix with tests: chippy01/VIctory#1 (onto this branch, rebased on `360f8aa`). It keeps the first-lane read only for values proven alike across the console wave, ported from the analysis in fxceless/victory-fork, and refuses the rest with a reason. Offline over the title, 12 of 2,372 compute programs drop out with that reason; nothing else changes. On the GPU, alike values give 0 of 128 lanes wrong on the 5070 Ti and the Intel iGPU. AI-assisted (Claude Code); no game data.
KainanP commented 2026-11-25 19:06:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T18:17:02Z.


On a machine that also has a 16-lane Intel iGPU (UHD 8086:a78b, WaveLaneCount 16..16), wave64_programs_in_halves_match_the_console_on_every_gpu fails with Intel(R) UHD Graphics (halves): no pipeline, because each_hardware() lists the iGPU and that driver refuses WaveSize(32) too. On that device the PR also keeps WaveSize(64), which is refused. On the RTX 4060 the halves form is exact (0 of 64 lanes differ). Details and table: https://github.com/Marvisak/VIctory/issues/2220#issuecomment-7170692046

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170696403 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7170696403). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-25T18:17:02Z. --- On a machine that also has a 16-lane Intel iGPU (UHD `8086:a78b`, `WaveLaneCount` 16..16), `wave64_programs_in_halves_match_the_console_on_every_gpu` fails with `Intel(R) UHD Graphics (halves): no pipeline`, because `each_hardware()` lists the iGPU and that driver refuses `WaveSize(32)` too. On that device the PR also keeps `WaveSize(64)`, which is refused. On the RTX 4060 the halves form is exact (0 of 64 lanes differ). Details and table: https://github.com/Marvisak/VIctory/issues/2220#issuecomment-7170692046 _AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this._
Mericas77 commented 2026-11-25 19:06:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Mericas77 on 2026-11-25T18:51:57Z.


Tested on NVIDIA: RTX 4070 (the only adapter), driver 621.01, Windows 11, rustc 1.98.1. Head 360f8aa against main 13f91ca. That's an Ada card, a generation after the 3070 Ti in the description.

  • halves_tests (--test-threads=1): 5/5 pass. wave64_programs_in_halves_match_the_console_on_every_gpu prints (halves): 0 lanes of 64 differ from the console and (wave64): no pipeline for 64-lane waves; skipped, which is the expected result on a 32-lane host.
  • victory-shader --lib (with --skip heap_direct_texture_reads_mark_their_heap_index, #2571): 271 passed / 3 failed. That's main's 266 plus the 5 new tests, and the same 3 known NVIDIA failures (a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gathers_at_a_level_match_the_hardware).
  • victory-gpu: 193 passed / 2 failed, the same as main (the two 1,000,000-view heap-cap tests).

No regression on Ada. No game data; the title was not run.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171508517 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7171508517). Originally posted by [Mericas77](https://github.com/Mericas77) on 2026-11-25T18:51:57Z. --- Tested on NVIDIA: RTX 4070 (the only adapter), driver 621.01, Windows 11, rustc 1.98.1. Head `360f8aa` against `main` `13f91ca`. That's an Ada card, a generation after the 3070 Ti in the description. - `halves_tests` (`--test-threads=1`): **5/5 pass**. `wave64_programs_in_halves_match_the_console_on_every_gpu` prints `(halves): 0 lanes of 64 differ from the console` and `(wave64): no pipeline for 64-lane waves; skipped`, which is the expected result on a 32-lane host. - `victory-shader --lib` (with `--skip heap_direct_texture_reads_mark_their_heap_index`, #2571): 271 passed / 3 failed. That's `main`'s 266 plus the 5 new tests, and the same 3 known NVIDIA failures (`a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `gathers_at_a_level_match_the_hardware`). - `victory-gpu`: 193 passed / 2 failed, the same as `main` (the two 1,000,000-view heap-cap tests). No regression on Ada. No game data; the title was not run. AI-assisted.
chippy01 commented 2026-11-25 19:06:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-25T18:37:31Z.


If this PR gets merged, I'll follow up by working on a way to implement Selective Cross-Wave Communication or, alternatively, a Hybrid Wave64 (32 physical + 32 virtual lanes) approach. The goal would be to allow the compiler to correctly execute instructions that require communication between lanes 0–31 and lanes 32–63.
In my opinion, addressing the underlying problem at its root is a better approach than introducing workarounds to bypass its limitations.
If this PR doesn't get merged, I'll still try to pursue at least one of these approaches, applying it to whichever alternative PR gets merged.
If anyone has any ideas or suggestions, I'll be glad to listen.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171167126 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7171167126). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T18:37:31Z. --- If this PR gets merged, I'll follow up by working on a way to implement Selective Cross-Wave Communication or, alternatively, a Hybrid Wave64 (32 physical + 32 virtual lanes) approach. The goal would be to allow the compiler to correctly execute instructions that require communication between lanes 0–31 and lanes 32–63. In my opinion, addressing the underlying problem at its root is a better approach than introducing workarounds to bypass its limitations. If this PR doesn't get merged, I'll still try to pursue at least one of these approaches, applying it to whichever alternative PR gets merged. If anyone has any ideas or suggestions, I'll be glad to listen.
TaynanGT commented 2026-11-25 21:03:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-25T20:15:08Z.


Independent run on another machine: Ryzen 9 9950X3D with an RTX 4090 (driver 32.0.16.2140) and the CPU's Radeon iGPU (RDNA2, driver 32.0.21045.29003), Windows 11 26H2.

victory translate --list --pipelines over the same four inputs as in the description, main 13f91ca against this PR 360f8aa, pipelines made on the RTX 4090:

main this PR
compute programs emitted 2,733 2,372
compute pipelines made 2,328 2,372
refused by the driver 405 0
vertex/pixel, mesh pipelines 14,254 / 8,765 14,254 / 8,765

Every pipeline made on main (25,347) is made here too, and 44 are new. The programs this PR refuses give their reason: 192 LDS in a one-wave group, 107 ballots, 48 lane reads across halves, 20 reductions.

halves_tests with --nocapture, which lists both adapters:

NVIDIA GeForce RTX 4090 (halves): 0 lanes of 64 differ from the console
NVIDIA GeForce RTX 4090 (wave64): no pipeline for 64-lane waves; skipped
AMD Radeon(TM) Graphics (halves): 0 lanes of 64 differ from the console
AMD Radeon(TM) Graphics (wave64): 0 lanes of 64 differ from the console

cargo test --release -p victory-shader --lib -- --test-threads=1, skipping memory_tests::heap_direct_texture_reads_mark_their_heap_index as in the description: main 266 passed and 3 failed, this PR 271 passed and the same 3 failed (stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7173396819 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7173396819). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-25T20:15:08Z. --- Independent run on another machine: Ryzen 9 9950X3D with an RTX 4090 (driver 32.0.16.2140) and the CPU's Radeon iGPU (RDNA2, driver 32.0.21045.29003), Windows 11 26H2. `victory translate --list --pipelines` over the same four inputs as in the description, `main` 13f91ca against this PR 360f8aa, pipelines made on the RTX 4090: | | `main` | this PR | |---|---:|---:| | compute programs emitted | 2,733 | 2,372 | | compute pipelines made | 2,328 | **2,372** | | refused by the driver | 405 | **0** | | vertex/pixel, mesh pipelines | 14,254 / 8,765 | 14,254 / 8,765 | Every pipeline made on `main` (25,347) is made here too, and 44 are new. The programs this PR refuses give their reason: 192 LDS in a one-wave group, 107 ballots, 48 lane reads across halves, 20 reductions. `halves_tests` with `--nocapture`, which lists both adapters: ``` NVIDIA GeForce RTX 4090 (halves): 0 lanes of 64 differ from the console NVIDIA GeForce RTX 4090 (wave64): no pipeline for 64-lane waves; skipped AMD Radeon(TM) Graphics (halves): 0 lanes of 64 differ from the console AMD Radeon(TM) Graphics (wave64): 0 lanes of 64 differ from the console ``` `cargo test --release -p victory-shader --lib -- --test-threads=1`, skipping `memory_tests::heap_direct_texture_reads_mark_their_heap_index` as in the description: `main` 266 passed and 3 failed, this PR 271 passed and the same 3 failed (`stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`).
qtLkz commented 2026-11-25 21:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by qtLkz on 2026-11-25T20:53:54Z.


Tested on NVIDIA Ada, a 32-lane-only host: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR merged onto main 13f91ca (clean merge).

cargo test -p victory-shader --lib --locked -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index
(The skipped test crashes the NVIDIA driver on main, #2571. The fix is in #2596 / #2587.)

All 5 new tests pass:

  • halves_tests::wave64_programs_in_halves_match_the_console_on_every_gpu ... ok
  • halves_tests::a_wave64_program_reading_lanes_declares_32_lane_waves_in_halves ... ok
  • halves_tests::reads_across_32_lane_halves_are_refused_with_their_reason ... ok
  • halves_tests::lds_of_a_one_wave64_group_is_refused_in_halves ... ok
  • halves_tests::the_test_program_is_what_its_comments_say ... ok

Whole lib: 271 passed, 3 failed, 3 ignored. The 3 failures (stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware) fail the same way on plain main on this card (#2317). Nothing new from this PR.

So in addition to the RTX 3070 Ti (Ampere) in the description, the halves path checks out on Ada.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174337746 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7174337746). Originally posted by [qtLkz](https://github.com/qtLkz) on 2026-11-25T20:53:54Z. --- Tested on NVIDIA Ada, a 32-lane-only host: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR merged onto main `13f91ca` (clean merge). `cargo test -p victory-shader --lib --locked -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index` (The skipped test crashes the NVIDIA driver on main, #2571. The fix is in #2596 / #2587.) All 5 new tests pass: - `halves_tests::wave64_programs_in_halves_match_the_console_on_every_gpu ... ok` - `halves_tests::a_wave64_program_reading_lanes_declares_32_lane_waves_in_halves ... ok` - `halves_tests::reads_across_32_lane_halves_are_refused_with_their_reason ... ok` - `halves_tests::lds_of_a_one_wave64_group_is_refused_in_halves ... ok` - `halves_tests::the_test_program_is_what_its_comments_say ... ok` Whole lib: 271 passed, 3 failed, 3 ignored. The 3 failures (`stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`) fail the same way on plain main on this card (#2317). Nothing new from this PR. So in addition to the RTX 3070 Ti (Ampere) in the description, the halves path checks out on Ada. AI-assisted (Claude).
chippy01 commented 2026-11-25 21:03:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-25T20:59:39Z.


Pushed a second commit with two fixes. Both were wrong results in the upper host wave (console lanes 32-63), and both now have tests:

  1. First-lane reads. Thanks @justrealyme for the report and the fix in chippy01/VIctory#1; it's folded into this commit with you as co-author. v_readfirstlane_b32 read the host wave's first lane, which for the upper half is console lane 32. Reproduced here on the RTX 3070 Ti and the Radeon iGPU: the first lane of the thread id gave 32 in lanes 32-63, where the console gives 0. The Radeon's own wave64 form gave 0. A first-lane read is now kept only for values proven the same in every lane of the console wave. The analysis gains two cases:

    • buffer loads at alike addresses through a scalar descriptor (how the compiler reads one element of a typed buffer)
    • groups of 32 threads or fewer, where one host wave holds the whole console wave

    Every other first-lane read is refused with its reason. Offline over the title, compute programs emitted go from 2,372 to 2,369. The 3 dropped read values that can really differ between halves: the cloud multiple-scattering cache, for example, reads a value joined from a branch on a per-lane compare.

  2. DPP row masks. The row came from the host lane (0-1), so the upper half applied row_mask bits 0-1 to console rows 2-3. With row_mask:0xc, lanes 32-63 kept their old value on both GPUs (32 of 64 lanes wrong); now 0 are. No program in this title uses such a mask in halves, so none of its translations change.

New GPU tests: dpp_row_masks_name_the_console_rows_on_every_gpu and first_lanes_kept_in_halves_match_the_console_on_every_gpu. The refusal cases are in reads_across_32_lane_halves_are_refused_with_their_reason. victory-shader --lib: 273 passed, with the same 3 NVIDIA failures as main. Clippy (both runs) and cargo xtask policy are clean.

The refused first-lane reads come back exactly once the two host waves can exchange values, which is the follow-up mentioned above.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174465246 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7174465246). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T20:59:39Z. --- Pushed a second commit with two fixes. Both were wrong results in the upper host wave (console lanes 32-63), and both now have tests: 1. **First-lane reads.** Thanks @justrealyme for the report and the fix in chippy01/VIctory#1; it's folded into this commit with you as co-author. `v_readfirstlane_b32` read the host wave's first lane, which for the upper half is console lane 32. Reproduced here on the RTX 3070 Ti and the Radeon iGPU: the first lane of the thread id gave 32 in lanes 32-63, where the console gives 0. The Radeon's own wave64 form gave 0. A first-lane read is now kept only for values proven the same in every lane of the console wave. The analysis gains two cases: - buffer loads at alike addresses through a scalar descriptor (how the compiler reads one element of a typed buffer) - groups of 32 threads or fewer, where one host wave holds the whole console wave Every other first-lane read is refused with its reason. Offline over the title, compute programs emitted go from 2,372 to 2,369. The 3 dropped read values that can really differ between halves: the cloud multiple-scattering cache, for example, reads a value joined from a branch on a per-lane compare. 2. **DPP row masks.** The row came from the host lane (0-1), so the upper half applied `row_mask` bits 0-1 to console rows 2-3. With `row_mask:0xc`, lanes 32-63 kept their old value on both GPUs (32 of 64 lanes wrong); now 0 are. No program in this title uses such a mask in halves, so none of its translations change. New GPU tests: `dpp_row_masks_name_the_console_rows_on_every_gpu` and `first_lanes_kept_in_halves_match_the_console_on_every_gpu`. The refusal cases are in `reads_across_32_lane_halves_are_refused_with_their_reason`. `victory-shader --lib`: 273 passed, with the same 3 NVIDIA failures as `main`. Clippy (both runs) and `cargo xtask policy` are clean. The refused first-lane reads come back exactly once the two host waves can exchange values, which is the follow-up mentioned above.
TaynanGT commented 2026-11-25 22:04:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-25T21:16:58Z.


Thanks, @qtLkz, for running the five tests on the RTX 4070 Ti, and @chippy01 for the first-lane and DPP row-mask fixes. My RTX 4090 results above are from 360f8aa, before the follow-up. The 2,372 compute programs in that table are from that earlier revision.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174864136 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7174864136). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-25T21:16:58Z. --- Thanks, @qtLkz, for running the five tests on the RTX 4070 Ti, and @chippy01 for the first-lane and DPP row-mask fixes. My RTX 4090 results above are from `360f8aa`, before the follow-up. The 2,372 compute programs in that table are from that earlier revision.
Marvisak commented 2026-11-25 23:06:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:16:15Z.


Automated triage for the maintainers.

Needs the maintainer's decision, plus one small fix. The rebase merges cleanly and CI check is passing. The approach is gated by emit::Options::host_wave32, which is set from Host::wave32 (D3D12_OPTIONS1, at most 32 lanes with 32 among them). It runs console wave64 compute programs as two 32-lane host waves. Reads across halves, LDS in one-wave groups, unproven first-lane reads, and tile-prone group shapes are refused with reasons in emit/lower/halves.rs. The shader cache key in crates/victory-gpu/src/shader_cache.rs now includes the wave width. Several testers report the halves tests exact on NVIDIA Ampere/Ada/Blackwell and on RDNA2/RDNA3 (where they also match the native wave64 form).

  • Fix: wave64_programs_in_halves_match_the_console_on_every_gpu (and every_thread_keeps_its_own_id_in_halves_on_every_gpu) in emit/halves_tests.rs iterate Host::each_hardware(), which also lists 16-lane-only adapters. There both forms are refused and the assert!(*form == "wave64" && wave32, ...) fires, as reported in the thread on an Intel UHD iGPU. Please skip adapters where the halves form cannot be made, the same way the 64-lane form is skipped.
  • Maintainer: this is one of several open approaches to wave64 on 32-lane hosts (#189, #192, #233, #1960, #2176; #578 refuses them instead). Choosing between them is the maintainer's call.

On your reply: the third commit's refusal of group shapes a host wave may tile, and the merge of main (using #573's ds_bpermute_b32 within halves), read correctly.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176150922 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7176150922). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:16:15Z. --- <!-- victory-triage v1 head=86a16dcefb757c7b97d6afd6c1e76ed9fb80cd19 verdict=needs-work at=2026-11-26T00:24:40Z --> Automated triage for the maintainers. Needs the maintainer's decision, plus one small fix. The rebase merges cleanly and CI `check` is passing. The approach is gated by `emit::Options::host_wave32`, which is set from `Host::wave32` (`D3D12_OPTIONS1`, at most 32 lanes with 32 among them). It runs console wave64 compute programs as two 32-lane host waves. Reads across halves, LDS in one-wave groups, unproven first-lane reads, and tile-prone group shapes are refused with reasons in `emit/lower/halves.rs`. The shader cache key in `crates/victory-gpu/src/shader_cache.rs` now includes the wave width. Several testers report the halves tests exact on NVIDIA Ampere/Ada/Blackwell and on RDNA2/RDNA3 (where they also match the native wave64 form). - **Fix:** `wave64_programs_in_halves_match_the_console_on_every_gpu` (and `every_thread_keeps_its_own_id_in_halves_on_every_gpu`) in `emit/halves_tests.rs` iterate `Host::each_hardware()`, which also lists 16-lane-only adapters. There both forms are refused and the `assert!(*form == "wave64" && wave32, ...)` fires, as reported in the thread on an Intel UHD iGPU. Please skip adapters where the halves form cannot be made, the same way the 64-lane form is skipped. - **Maintainer:** this is one of several open approaches to wave64 on 32-lane hosts (#189, #192, #233, #1960, #2176; #578 refuses them instead). Choosing between them is the maintainer's call. On your reply: the third commit's refusal of group shapes a host wave may tile, and the merge of `main` (using #573's `ds_bpermute_b32` within halves), read correctly. --- _Generated by [Claude Code](https://claude.ai/code)_
davesousa commented 2026-11-26 00:03:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by davesousa on 2026-11-25T23:22:05Z.


First run in the world with this PR, on the same Ampere card as the description: RTX 3070 Ti 8 GB, driver 621.40, Windows 11 26200, 32 GB RAM. diag build, VICTORY_D3D12_DRED=1. The base is 13f91ca + #2319 + #1906 + #2178 (without those, this card does not get through the world on NVIDIA; #1906 is in main now). This PR at b15a57b; the only conflict there was shader_cache.rs against #2178 (each adds a key parameter; I kept both). Cache and pipelines rebuilt for each build. These runs are of your two commits before your merge of main (f60027f); the conflict resolution in that merge is not covered here.

Offline (translate --cache --pipelines, same four inputs), on the base and then with this PR:

base + this PR
pipelines refused by the host 397 1
containers refused by the translator 233 597
pipelines made or already in the library 26,736 26,777

In the title, two 15-minute runs from the start screen through the world and the intro cutscene, one per build. The script stopped both; neither had a device removal:

base + this PR
compute programs refused by the host (unique) 170 0
programs dropped in total (host or translator, unique) 178 170
dropped on the base, running here 9
running on the base, dropped here 0 (one program refused here was not requested in the base run)
host submissions in the slow log / longest 92 / 0.68 s 13 / 0.99 s
world frame time, median of 10-s samples 0.84 s 0.83 s

The 170 dropped here all give a reason. The ones I could classify: 76 for LDS one console wave64 shares without barriers, 18 for lane masks or lane reads across halves, 11 for reductions over both halves, 7 for first-lane reads of values that may differ between the halves. emit::halves_tests passes 7/7 here: (halves) 0 lanes of 64 differ from the console, and the wave64 form is skipped as expected. victory-shader --lib and victory-gpu --lib show no new failures against the base.

I did not compare images, so this says nothing yet about whether the 9 programs that run now draw correctly.

AI-assisted (Claude Code); the runs are on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7177463486 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7177463486). Originally posted by [davesousa](https://github.com/davesousa) on 2026-11-25T23:22:05Z. --- First run in the world with this PR, on the same Ampere card as the description: RTX 3070 Ti 8 GB, driver 621.40, Windows 11 26200, 32 GB RAM. `diag` build, `VICTORY_D3D12_DRED=1`. The base is `13f91ca` + #2319 + #1906 + #2178 (without those, this card does not get through the world on NVIDIA; #1906 is in `main` now). This PR at `b15a57b`; the only conflict there was `shader_cache.rs` against #2178 (each adds a key parameter; I kept both). Cache and pipelines rebuilt for each build. These runs are of your two commits before your merge of `main` (`f60027f`); the conflict resolution in that merge is not covered here. Offline (`translate --cache --pipelines`, same four inputs), on the base and then with this PR: | | base | + this PR | |---|---|---| | pipelines refused by the host | 397 | 1 | | containers refused by the translator | 233 | 597 | | pipelines made or already in the library | 26,736 | 26,777 | In the title, two 15-minute runs from the start screen through the world and the intro cutscene, one per build. The script stopped both; neither had a device removal: | | base | + this PR | |---|---|---| | compute programs refused by the host (unique) | 170 | 0 | | programs dropped in total (host or translator, unique) | 178 | 170 | | dropped on the base, running here | | 9 | | running on the base, dropped here | | 0 (one program refused here was not requested in the base run) | | host submissions in the slow log / longest | 92 / 0.68 s | 13 / 0.99 s | | world frame time, median of 10-s samples | 0.84 s | 0.83 s | The 170 dropped here all give a reason. The ones I could classify: 76 for LDS one console wave64 shares without barriers, 18 for lane masks or lane reads across halves, 11 for reductions over both halves, 7 for first-lane reads of values that may differ between the halves. `emit::halves_tests` passes 7/7 here: (halves) 0 lanes of 64 differ from the console, and the wave64 form is skipped as expected. `victory-shader --lib` and `victory-gpu --lib` show no new failures against the base. I did not compare images, so this says nothing yet about whether the 9 programs that run now draw correctly. AI-assisted (Claude Code); the runs are on my machine.
TaynanGT commented 2026-11-26 00:03:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-25T23:23:37Z.


Thanks for running this in-game, @davesousa. The drop from 170 host refusals to zero on the 3070 Ti lines up with what I saw offline on the 4090. The median world frame time barely moved, even with fewer slow submissions.

Your numbers give us a baseline for b15a57b on the stack you listed. A matched run on f60027f with screenshots would show whether those results held after the merge and what the nine newly running programs actually draw.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7177498239 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7177498239). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-25T23:23:37Z. --- Thanks for running this in-game, @davesousa. The drop from 170 host refusals to zero on the 3070 Ti lines up with what I saw offline on the 4090. The median world frame time barely moved, even with fewer slow submissions. Your numbers give us a baseline for `b15a57b` on the stack you listed. A matched run on `f60027f` with screenshots would show whether those results held after the merge and what the nine newly running programs actually draw.
chippy01 commented 2026-11-26 00:03:36 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-25T23:45:30Z.


Merged main (842b0cb) in f60027f. main's own ds_bpermute_b32 lowering from #573 already reads within the reader's half, so it replaces the halves-only permute_lanes. The Host test helpers now sit on main's shared WARP device. Nothing measured changes.

Then pushed a third commit: halves now refuse group shapes that a 32-lane host wave may tile.

The relabelling gives a thread the first flat id of its host wave, rounded down to 32, plus its host lane. That is right only while every host wave holds a run of consecutive ids. I ran a program in halves that stores 1 at its own id, on the RTX 3070 Ti and the Radeon iGPU. 32x2, 32x8, 64x4, 32x32 and 32x2x2 groups store half their ids on both GPUs, because the host gives a wave a 16x2 tile of the group. 8x4, 4x4, 8x8, 16x2, 16x4, 8x16, 16x16, 4x4x4, 2x2x16, 8x8x4 and one-row groups store all of them. #2126 found the same tiling on an RTX 5070 Ti for main's 32-lane programs.

No program the title translates in halves uses such a group; they are 8x8, 8x4, 4x4 or one row, so 2,369 are still emitted. Its 32x2, 32x32 and 6x6 programs were refused already, and they would have run wrongly once the exchanges arrive. When #2126's per-wave tickets land, halves can take its ids from them and drop this refusal.

New tests: groups_a_host_wave_may_tile_are_refused_in_halves and every_thread_keeps_its_own_id_in_halves_on_every_gpu. victory-shader --lib: 307 passed on the merged head, with the same 3 NVIDIA failures as main.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7178007936 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7178007936). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T23:45:30Z. --- Merged `main` (`842b0cb`) in `f60027f`. `main`'s own `ds_bpermute_b32` lowering from #573 already reads within the reader's half, so it replaces the halves-only `permute_lanes`. The `Host` test helpers now sit on `main`'s shared WARP device. Nothing measured changes. Then pushed a third commit: halves now refuse group shapes that a 32-lane host wave may tile. The relabelling gives a thread the first flat id of its host wave, rounded down to 32, plus its host lane. That is right only while every host wave holds a run of consecutive ids. I ran a program in halves that stores 1 at its own id, on the RTX 3070 Ti and the Radeon iGPU. 32x2, 32x8, 64x4, 32x32 and 32x2x2 groups store **half** their ids on both GPUs, because the host gives a wave a 16x2 tile of the group. 8x4, 4x4, 8x8, 16x2, 16x4, 8x16, 16x16, 4x4x4, 2x2x16, 8x8x4 and one-row groups store all of them. #2126 found the same tiling on an RTX 5070 Ti for `main`'s 32-lane programs. No program the title translates in halves uses such a group; they are 8x8, 8x4, 4x4 or one row, so 2,369 are still emitted. Its 32x2, 32x32 and 6x6 programs were refused already, and they would have run wrongly once the exchanges arrive. When #2126's per-wave tickets land, halves can take its ids from them and drop this refusal. New tests: `groups_a_host_wave_may_tile_are_refused_in_halves` and `every_thread_keeps_its_own_id_in_halves_on_every_gpu`. `victory-shader --lib`: 307 passed on the merged head, with the same 3 NVIDIA failures as `main`.
TaynanGT commented 2026-11-26 00:03:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-25T23:53:23Z.


Thanks for testing those group shapes on both adapters, @chippy01. The store-at-own-ID test shows where the flat-ID assumption breaks: a 16×2 tile crosses rows, and the wider groups lose half their writes.

The unchanged count of 2,369 gives us a reference for 86a16dc. A matched run of that head and b15a57b can check whether the picture and frame times still agree after the merge and the new guard.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7178172216 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7178172216). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-25T23:53:23Z. --- Thanks for testing those group shapes on both adapters, @chippy01. The store-at-own-ID test shows where the flat-ID assumption breaks: a 16×2 tile crosses rows, and the wider groups lose half their writes. The unchanged count of 2,369 gives us a reference for `86a16dc`. A matched run of that head and `b15a57b` can check whether the picture and frame times still agree after the merge and the new guard.
steven-seagull27 commented 2026-11-26 03:05:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T02:20:58Z.


I tested the single-half case on 86a16dc. A 32-thread group fits entirely inside one Wave32. The guest compares the thread ID, saves and narrows EXEC, runs v_readfirstlane_b32 s12, v0, restores EXEC, and writes the scalar from all 32 threads. There is no branch or second half. The four masks select lane 0, lane 7, lane 31, or no lanes (the lane-zero fallback).

Wrong output dwords out of 128 This PR This PR merged locally with #2830 (36eb5f6)
RTX 5080, Wave32 64 0
WARP 1.0.22, Wave32 64 0
WARP 1.0.22, Wave64 64 64

Both Wave32 runs returned zero for the lane-7 and lane-31 masks before #2830. The two PR heads merge cleanly. Windows' built-in WARP advertises Wave4 only here and skipped both requested widths.

I also compiled a standalone HLSL shader with DXC to check the remaining WARP result. With [WaveSize(64)], 32 threads per group, and tid = SV_GroupIndex, thread 7 reported an all-zero WaveActiveBallot(tid >= 7). A direct WaveReadLaneAt(100 + tid, 7) in the same shader returned 107. Changing only the group size to 64 produced ballot words ffffff80 ffffffff and elected lane 7. A native Wave64 Radeon readback on the 32-thread fixture would help distinguish the WARP result.

Test-only commit a5a1999. To run from the head of this PR:

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2633-masked-first-lane
git cherry-pick a5a1999
cargo test -p victory-shader --lib first_lane_of_a_small_group_respects_guest_exec -- --nocapture
<!-- greyfinch-sync:Marvisak/VIctory:comment:7180718024 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7180718024). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-26T02:20:58Z. --- I tested the single-half case on `86a16dc`. A 32-thread group fits entirely inside one Wave32. The guest compares the thread ID, saves and narrows EXEC, runs `v_readfirstlane_b32 s12, v0`, restores EXEC, and writes the scalar from all 32 threads. There is no branch or second half. The four masks select lane 0, lane 7, lane 31, or no lanes (the lane-zero fallback). | Wrong output dwords out of 128 | This PR | This PR merged locally with #2830 (`36eb5f6`) | |---|---:|---:| | RTX 5080, Wave32 | 64 | 0 | | WARP 1.0.22, Wave32 | 64 | 0 | | WARP 1.0.22, Wave64 | 64 | 64 | Both Wave32 runs returned zero for the lane-7 and lane-31 masks before #2830. The two PR heads merge cleanly. Windows' built-in WARP advertises Wave4 only here and skipped both requested widths. I also compiled a standalone HLSL shader with DXC to check the remaining WARP result. With `[WaveSize(64)]`, 32 threads per group, and `tid = SV_GroupIndex`, thread 7 reported an all-zero `WaveActiveBallot(tid >= 7)`. A direct `WaveReadLaneAt(100 + tid, 7)` in the same shader returned 107. Changing only the group size to 64 produced ballot words `ffffff80 ffffffff` and elected lane 7. A native Wave64 Radeon readback on the 32-thread fixture would help distinguish the WARP result. [Test-only commit a5a1999](https://github.com/steven-seagull27/VIctory/commit/a5a19991047a54263aa11aa9c1e27eb8dc5aa604). To run from the head of this PR: ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2633-masked-first-lane git cherry-pick a5a1999 cargo test -p victory-shader --lib first_lane_of_a_small_group_respects_guest_exec -- --nocapture ```
TaynanGT commented 2026-11-26 03:05:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T02:24:34Z.


Thanks for the minimal repro, @steven-seagull27. The 32-thread fixture reproduces the lane 7 and 31 failures within a single half, and both Wave32 runs go from 64 wrong dwords to zero with #2830. I can use a5a1999 for the same comparison on my 4090.

I'd still like to see a native Wave64 Radeon run of the 32-thread fixture, especially whether the ballot is zero when the direct lane read returns 107.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180777634 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7180777634). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T02:24:34Z. --- Thanks for the minimal repro, @steven-seagull27. The 32-thread fixture reproduces the lane 7 and 31 failures within a single half, and both Wave32 runs go from 64 wrong dwords to zero with #2830. I can use `a5a1999` for the same comparison on my 4090. I'd still like to see a native Wave64 Radeon run of the 32-thread fixture, especially whether the ballot is zero when the direct lane read returns 107.
steven-seagull27 commented 2026-11-26 03:05:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T02:35:41Z.


@TaynanGT I put both comparisons on one branch at 34c8e1c. It contains this PR, #2830 and the guest fixture, plus a separate HLSL shader compiled by the Windows SDK's PC DXC. It prints the actual adapter, selected wave width, ballot words, elected read, and direct read from lane 7.

@zed6000 Thanks for the native Wave64 result on #1737. If your 7900 XTX is available for this one, could you post the Radeon lines for the 32-thread group and the 64-thread control? From an existing clone, the following creates a separate worktree:

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2633-radeon-comparison
git worktree add --detach ../victory-2633-radeon FETCH_HEAD
cd ../victory-2633-radeon
cargo test -p victory-shader --lib first_lane_of_a_small_group_respects_guest_exec -- --nocapture
cargo test -p victory-shader --lib native_ballot_in_a_partial_wave -- --ignored --nocapture

In the standalone test on WARP 1.0.22, 25 of the 32 threads had their own predicate missing from the Wave64 ballot. Thread 7 read 100 through the elected lane and 107 directly from lane 7. Increasing only the group size to 64 gave 107 both ways and 0/64 wrong. On the RTX 5080, Wave32 had zero wrong for both group sizes. The standalone test prints all adapter/width results before reporting any mismatches.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180946016 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7180946016). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-26T02:35:41Z. --- @TaynanGT I put both comparisons on [one branch at 34c8e1c](https://github.com/steven-seagull27/VIctory/commit/34c8e1cc84348df602fb9ef0899574849de8fcb6). It contains this PR, #2830 and the guest fixture, plus a separate HLSL shader compiled by the Windows SDK's PC DXC. It prints the actual adapter, selected wave width, ballot words, elected read, and direct read from lane 7. @zed6000 Thanks for the native Wave64 result on #1737. If your 7900 XTX is available for this one, could you post the Radeon lines for the 32-thread group and the 64-thread control? From an existing clone, the following creates a separate worktree: ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2633-radeon-comparison git worktree add --detach ../victory-2633-radeon FETCH_HEAD cd ../victory-2633-radeon cargo test -p victory-shader --lib first_lane_of_a_small_group_respects_guest_exec -- --nocapture cargo test -p victory-shader --lib native_ballot_in_a_partial_wave -- --ignored --nocapture ``` In the standalone test on WARP 1.0.22, 25 of the 32 threads had their own predicate missing from the Wave64 ballot. Thread 7 read `100` through the elected lane and `107` directly from lane 7. Increasing only the group size to 64 gave `107` both ways and 0/64 wrong. On the RTX 5080, Wave32 had zero wrong for both group sizes. The standalone test prints all adapter/width results before reporting any mismatches.
TaynanGT commented 2026-11-26 03:05:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T02:38:21Z.


Thanks for putting both fixtures on 34c8e1c, @steven-seagull27. I can use that head for the 4090 check and report the actual wave width with the ballot and both reads.

I'd look for whether Radeon also gets 100 from the elected lane and 107 from lane 7 with 32 threads, then 107 both ways with 64. That would show whether the WARP result also reproduces on native Wave64 hardware.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180986259 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7180986259). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T02:38:21Z. --- Thanks for putting both fixtures on `34c8e1c`, @steven-seagull27. I can use that head for the 4090 check and report the actual wave width with the ballot and both reads. I'd look for whether Radeon also gets `100` from the elected lane and `107` from lane 7 with 32 threads, then `107` both ways with 64. That would show whether the WARP result also reproduces on native Wave64 hardware.
TaynanGT commented 2026-11-26 03:05:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T02:46:55Z.


@steven-seagull27 I ran both tests on 34c8e1c. The guest first-lane test matched all four masks on the RTX 4090 in Wave32 and on the Ryzen 9 9950X3D's integrated Radeon in Wave32 and native Wave64.

Standalone DXC run 32 threads 64 threads
RTX 4090 (621.40), Wave32 0/32 wrong 0/64 wrong
Radeon iGPU (32.0.21045.29003), Wave32 0/32 wrong 0/64 wrong
Radeon iGPU, native Wave64 0/32 wrong 0/64 wrong

For thread 7, the 4090's Wave32 ballot was ffffff80 00000000 with either group size. On the Radeon in Wave64, it was ffffff80 00000000 with 32 threads and ffffff80 ffffffff with 64. In all of those runs, lane 7 was elected and both reads returned 107.

The built-in WARP adapter reported Wave4 and skipped Wave32 and Wave64.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181113589 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7181113589). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T02:46:55Z. --- @steven-seagull27 I ran both tests on `34c8e1c`. The guest first-lane test matched all four masks on the RTX 4090 in Wave32 and on the Ryzen 9 9950X3D's integrated Radeon in Wave32 and native Wave64. | Standalone DXC run | 32 threads | 64 threads | | --- | ---: | ---: | | RTX 4090 (621.40), Wave32 | 0/32 wrong | 0/64 wrong | | Radeon iGPU (32.0.21045.29003), Wave32 | 0/32 wrong | 0/64 wrong | | Radeon iGPU, native Wave64 | 0/32 wrong | 0/64 wrong | For thread 7, the 4090's Wave32 ballot was `ffffff80 00000000` with either group size. On the Radeon in Wave64, it was `ffffff80 00000000` with 32 threads and `ffffff80 ffffffff` with 64. In all of those runs, lane 7 was elected and both reads returned `107`. The built-in WARP adapter reported Wave4 and skipped Wave32 and Wave64.
chippy01 commented 2026-11-26 10:05:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-26T09:14:50Z.


@TaynanGT here is the matched comparison. Same card as davesousa's, an RTX 3070 Ti 8 GB, but on driver 621.24 (theirs was 621.40). Ryzen 9 7900X, 32 GB RAM, Windows 11 26200, TDR delay at the default 2 s. diag builds, VICTORY_D3D12_DRED=1, --console series-x. b15a57b is on davesousa's stack (+ #2319 + #1906 + #2178). 86a16dc has #2319 + #2178; #1906 comes with the merge. shader_cache.rs keeps both key parameters, as davesousa did. Cache and pipelines were rebuilt for each build.

Offline, translate --cache --pipelines on the same four inputs:

b15a57b 86a16dc
containers refused by the translator 597 593
pipelines refused by the host 1 1
pipelines made or already in the library 26,777 26,779

b15a57b reproduces davesousa's column exactly.

translate --list --wave32 on the same inputs, program by program:

b15a57b 86a16dc
compute programs emitted (in halves) 2,369 of 2,763 2,369 of 2,763
vertex and pixel programs emitted 14,254 of 14,259 14,258 of 14,259
mesh programs emitted 8,765 of 8,765 8,765 of 8,765

No compute program changes outcome. The guard refuses two programs, both of which b15a57b already refused for a lane mask read as data. The guard now stops them before that check. The other halves reasons have the same counts on both builds: 192 LDS, 48 lane reads across halves, 20 reductions, 17 first-lane reads. Four pixel programs change outcome: b15a57b refused them for a lane mask read as data, and they translate after the merge.

In the title I couldn't get the 15-minute runs. Both builds stopped in the world, the same way:

b15a57b 86a16dc
world's first frame 2.4 min 3.7 min
run ended 8.5 min 5.2 min
compute programs refused by the host 0 0

Once the world loaded, the emulator's working set reached 20-22 GB, VRAM sat at 7.0-7.2 of 8 GB, and about 1 GB of RAM was left. Frames took seconds each (up to 15 s). Then no frame came for about a minute, and the title's own crash handler ended it ("Game Running" in its report). Both builds did this, even with most apps closed, so I read it as a limit of this machine rather than of either commit. The page file and the game data are both on a nearly full QLC SSD. davesousa's runs got through 15 minutes with the same card and RAM. Frame times from these runs aren't meaningful.

In the part both runs covered, no program ran on one build and was dropped on the other. The 43 programs 86a16dc refused in its run all give halves reasons; none of them is the new tile-prone-group refusal.

The captures can't answer the picture question on NVIDIA yet. In both builds the world frames show only the cutscene's subtitles and letterboxing over a flat background. Both runs log the same host refusal of a 2560x1440 texture (#797), which looks like the scene target.

One more thing about b15a57b's stack. Its first boot on a fresh library hung for 28 s shortly after a library save, and the title crashed itself in "Game Init". b15a57b doesn't have #2179, so a pipeline load waits while a save serialises the whole ~1 GB library. 86a16dc gets #2179 with the merge. The hang didn't happen on every first boot. To keep the two builds alike, each got one throwaway boot on its fresh library before its run.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7187653617 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7187653617). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-26T09:14:50Z. --- @TaynanGT here is the matched comparison. Same card as davesousa's, an RTX 3070 Ti 8 GB, but on driver 621.24 (theirs was 621.40). Ryzen 9 7900X, 32 GB RAM, Windows 11 26200, TDR delay at the default 2 s. `diag` builds, `VICTORY_D3D12_DRED=1`, `--console series-x`. `b15a57b` is on davesousa's stack (+ #2319 + #1906 + #2178). `86a16dc` has #2319 + #2178; #1906 comes with the merge. `shader_cache.rs` keeps both key parameters, as davesousa did. Cache and pipelines were rebuilt for each build. **Offline**, `translate --cache --pipelines` on the same four inputs: | | `b15a57b` | `86a16dc` | |---|---:|---:| | containers refused by the translator | 597 | 593 | | pipelines refused by the host | 1 | 1 | | pipelines made or already in the library | 26,777 | 26,779 | `b15a57b` reproduces davesousa's column exactly. `translate --list --wave32` on the same inputs, program by program: | | `b15a57b` | `86a16dc` | |---|---:|---:| | compute programs emitted (in halves) | 2,369 of 2,763 | 2,369 of 2,763 | | vertex and pixel programs emitted | 14,254 of 14,259 | 14,258 of 14,259 | | mesh programs emitted | 8,765 of 8,765 | 8,765 of 8,765 | No compute program changes outcome. The guard refuses two programs, both of which `b15a57b` already refused for a lane mask read as data. The guard now stops them before that check. The other halves reasons have the same counts on both builds: 192 LDS, 48 lane reads across halves, 20 reductions, 17 first-lane reads. Four pixel programs change outcome: `b15a57b` refused them for a lane mask read as data, and they translate after the merge. **In the title** I couldn't get the 15-minute runs. Both builds stopped in the world, the same way: | | `b15a57b` | `86a16dc` | |---|---:|---:| | world's first frame | 2.4 min | 3.7 min | | run ended | 8.5 min | 5.2 min | | compute programs refused by the host | 0 | 0 | Once the world loaded, the emulator's working set reached 20-22 GB, VRAM sat at 7.0-7.2 of 8 GB, and about 1 GB of RAM was left. Frames took seconds each (up to 15 s). Then no frame came for about a minute, and the title's own crash handler ended it ("Game Running" in its report). Both builds did this, even with most apps closed, so I read it as a limit of this machine rather than of either commit. The page file and the game data are both on a nearly full QLC SSD. davesousa's runs got through 15 minutes with the same card and RAM. Frame times from these runs aren't meaningful. In the part both runs covered, no program ran on one build and was dropped on the other. The 43 programs `86a16dc` refused in its run all give halves reasons; none of them is the new tile-prone-group refusal. The captures can't answer the picture question on NVIDIA yet. In both builds the world frames show only the cutscene's subtitles and letterboxing over a flat background. Both runs log the same host refusal of a 2560x1440 texture (#797), which looks like the scene target. One more thing about `b15a57b`'s stack. Its first boot on a fresh library hung for 28 s shortly after a library save, and the title crashed itself in "Game Init". `b15a57b` doesn't have #2179, so a pipeline load waits while a save serialises the whole ~1 GB library. `86a16dc` gets #2179 with the merge. The hang didn't happen on every first boot. To keep the two builds alike, each got one throwaway boot on its fresh library before its run.
TaynanGT commented 2026-11-26 10:05:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T09:21:05Z.


Thanks for running both builds, @chippy01. The 2,369 compute programs on each build answer my question about the guard. It rejects the same two programs earlier, and the merge gets four more pixel programs through translation.

The picture and frame-time comparison is still open. Both runs hit the same 2560×1440 texture refusal and ended before 15 minutes. Could you share the HRESULT and the format and flags for texture #797 if they're in the log? The 28-second fresh-library stall also fits the save/load contention that #2179 addresses.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7187833144 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7187833144). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T09:21:05Z. --- Thanks for running both builds, @chippy01. The 2,369 compute programs on each build answer my question about the guard. It rejects the same two programs earlier, and the merge gets four more pixel programs through translation. The picture and frame-time comparison is still open. Both runs hit the same 2560×1440 texture refusal and ended before 15 minutes. Could you share the HRESULT and the format and flags for texture `#797` if they're in the log? The 28-second fresh-library stall also fits the save/load contention that #2179 addresses.
chippy01 commented 2026-11-26 10:05:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-26T09:48:27Z.


@TaynanGT it's in the logs. Both builds write the same pair of lines once per run, at the cutscene (b15a57b at 08:40:10, 86a16dc at 08:52:16):

WARN victory_gpu::resource: the host refuses castable formats: textures of one memory in other formats get their own host texture error=Parametro non corretto. (0x80070057) desc=ResourceDesc { dimension: 3, alignment: 0, width: 2560, height: 1440, depth_or_array_size: 1, mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 }
WARN victory_gpu::resource: no host texture error=Parametro non corretto. (0x80070057) desc=ResourceDesc { dimension: 3, alignment: 0, width: 2560, height: 1440, depth_or_array_size: 1, mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 }
  • HRESULT 0x80070057 (E_INVALIDARG; "Parametro non corretto" is the Italian system text). It comes back on both tries: first with castable formats, then as a plain texture.
  • TEXTURE2D, 2560x1440, 1 mip, 1 slice, 1 sample. format: 115 is DXGI_FORMAT_B4G4R4A4_UNORM and flags: 1 is D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET.
  • The D3D12 debug layer was off for these runs, so there's no message saying which part it objects to. I can rerun with VICTORY_D3D12_DEBUG=1 if you want the debug layer's own reason.

That's one of the two textures in #797. The other one (format: 86, B5G5R5A1_UNORM, flags: 5) is created in both runs now. main makes it without unordered access; the log line just before the refusal is no unordered access for this format: textures are made without it, their unordered views are refused format=86. So on this card only the 115 texture is still refused.

On the 28 s stall: agreed, that's the save/load contention #2179 removes. It's why each build got one throwaway boot before its measured run.

@steven-seagull27 thanks for the masked first-lane fixture. The wrong lanes come from main's lowering, not from the halves. An instruction with a scalar destination drops its EXEC guard, so under a narrowed EXEC v_readfirstlane_b32 reads the host wave's lane 0 on any host. #2830 fixes that on main, and with it the halves path matches (TaynanGT's run on the 4090 and the Radeon iGPU at 34c8e1c). I'll leave that fix to #2830 rather than duplicate it here.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7188500068 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7188500068). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-26T09:48:27Z. --- @TaynanGT it's in the logs. Both builds write the same pair of lines once per run, at the cutscene (`b15a57b` at 08:40:10, `86a16dc` at 08:52:16): ``` WARN victory_gpu::resource: the host refuses castable formats: textures of one memory in other formats get their own host texture error=Parametro non corretto. (0x80070057) desc=ResourceDesc { dimension: 3, alignment: 0, width: 2560, height: 1440, depth_or_array_size: 1, mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 } WARN victory_gpu::resource: no host texture error=Parametro non corretto. (0x80070057) desc=ResourceDesc { dimension: 3, alignment: 0, width: 2560, height: 1440, depth_or_array_size: 1, mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 } ``` - HRESULT `0x80070057` (`E_INVALIDARG`; "Parametro non corretto" is the Italian system text). It comes back on both tries: first with castable formats, then as a plain texture. - `TEXTURE2D`, 2560x1440, 1 mip, 1 slice, 1 sample. `format: 115` is `DXGI_FORMAT_B4G4R4A4_UNORM` and `flags: 1` is `D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET`. - The D3D12 debug layer was off for these runs, so there's no message saying which part it objects to. I can rerun with `VICTORY_D3D12_DEBUG=1` if you want the debug layer's own reason. That's one of the two textures in #797. The other one (`format: 86`, `B5G5R5A1_UNORM`, `flags: 5`) is created in both runs now. `main` makes it without unordered access; the log line just before the refusal is `no unordered access for this format: textures are made without it, their unordered views are refused format=86`. So on this card only the 115 texture is still refused. On the 28 s stall: agreed, that's the save/load contention #2179 removes. It's why each build got one throwaway boot before its measured run. @steven-seagull27 thanks for the masked first-lane fixture. The wrong lanes come from `main`'s lowering, not from the halves. An instruction with a scalar destination drops its EXEC guard, so under a narrowed EXEC `v_readfirstlane_b32` reads the host wave's lane 0 on any host. #2830 fixes that on `main`, and with it the halves path matches (TaynanGT's run on the 4090 and the Radeon iGPU at `34c8e1c`). I'll leave that fix to #2830 rather than duplicate it here.
TaynanGT commented 2026-11-26 10:05:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T09:50:27Z.


Yes, please try VICTORY_D3D12_DEBUG=1 on 86a16dc, @chippy01. A run to the cutscene is enough. Could you paste the debug-layer message ID and text for the plain creation of the B4G4R4A4_UNORM render target?

Thanks for checking both formats. Format 86 now creates without the UAV flag, and 115 still returns E_INVALIDARG on the plain path. If you already have a format-support dump, could you include the D3D12_FORMAT_SUPPORT1_RENDER_TARGET bit for 115?

<!-- greyfinch-sync:Marvisak/VIctory:comment:7188545972 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7188545972). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T09:50:27Z. --- Yes, please try `VICTORY_D3D12_DEBUG=1` on `86a16dc`, @chippy01. A run to the cutscene is enough. Could you paste the debug-layer message ID and text for the plain creation of the `B4G4R4A4_UNORM` render target? Thanks for checking both formats. Format 86 now creates without the UAV flag, and 115 still returns `E_INVALIDARG` on the plain path. If you already have a format-support dump, could you include the `D3D12_FORMAT_SUPPORT1_RENDER_TARGET` bit for 115?
chippy01 commented 2026-11-26 13:04:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-26T12:56:21Z.


@TaynanGT the debug layer can't get this title to the cutscene on this PC. With VICTORY_D3D12_DEBUG=1, 86a16dc (the same diag build and stack as the matched run) stopped in Game Init. The boot's descriptor work went several times slower than without the debug layer: a few thousand title-slot warnings per 10 s instead of 40,000-85,000. The title's own watchdog ended the run at 79 s. Its deliberate write at +0x2215c35 left a crash report that says Game State: Game Init, Frame: 0. Without the debug layer the emulator gets to that texture at 81 s.

So I repeated the two calls make_texture makes for that texture outside the emulator, with the debug layer on. The arguments are the same: 2560x1440, 1 mip, B4G4R4A4_UNORM, ALLOW_RENDER_TARGET, default heap. The castable list is what castable(115) gives (formats 49-52, 54, 56-59, 68, 69, 85, 86).

call RTX 3070 Ti Radeon iGPU (Ryzen 9 7900X)
CreateCommittedResource3 with those castable formats and a clear value in format 115 E_INVALIDARG, ID 817 made
CreateCommittedResource3 with the same castable formats, no clear value made made
CreateCommittedResource (plain), with or without that clear value E_INVALIDARG, ID 599 made

ID 599 is D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS (severity ERROR, category STATE_CREATION):

ID3D12Device::CreateCommittedResource: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_RESOURCE_DESC::Format is B4G4R4A4_UNORM.

ID 817 is D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT:

ID3D12Device::CreateCommittedResource3: When D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET is set in D3D12_RESOURCE_DESC::Flags, D3D12_CLEAR_VALUE::Format must be valid to be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_CLEAR_VALUE::Format is B4G4R4A4_UNORM.

In the runs the castable try failed as well. Outside the emulator it only fails with a clear value in format 115, so the title most likely passes one. The emulator then falls back to the plain creation, which fails with 599.

Format support (CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)):

RTX 3070 Ti, driver 621.24 Radeon iGPU
115 B4G4R4A4_UNORM, Support1 0x008413f0, RENDER_TARGET clear 0x02e4d3f0, RENDER_TARGET set
86 B5G5R5A1_UNORM, Support1 0x00e4d3f0, RENDER_TARGET set 0x02e4d3f0, RENDER_TARGET set

Both adapters report RelaxedFormatCastingSupported. So on this card 115 can never be a render target format, but the castable texture is accepted once the clear value in 115 is left out. I haven't tested whether its render target views work in one of the castable formats.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7192658146 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7192658146). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-26T12:56:21Z. --- @TaynanGT the debug layer can't get this title to the cutscene on this PC. With `VICTORY_D3D12_DEBUG=1`, `86a16dc` (the same diag build and stack as the matched run) stopped in Game Init. The boot's descriptor work went several times slower than without the debug layer: a few thousand title-slot warnings per 10 s instead of 40,000-85,000. The title's own watchdog ended the run at 79 s. Its deliberate write at `+0x2215c35` left a crash report that says `Game State: Game Init`, `Frame: 0`. Without the debug layer the emulator gets to that texture at 81 s. So I repeated the two calls `make_texture` makes for that texture outside the emulator, with the debug layer on. The arguments are the same: 2560x1440, 1 mip, `B4G4R4A4_UNORM`, `ALLOW_RENDER_TARGET`, default heap. The castable list is what `castable(115)` gives (formats 49-52, 54, 56-59, 68, 69, 85, 86). | call | RTX 3070 Ti | Radeon iGPU (Ryzen 9 7900X) | |---|---|---| | `CreateCommittedResource3` with those castable formats and a clear value in format 115 | `E_INVALIDARG`, ID 817 | made | | `CreateCommittedResource3` with the same castable formats, no clear value | made | made | | `CreateCommittedResource` (plain), with or without that clear value | `E_INVALIDARG`, ID 599 | made | ID 599 is `D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS` (severity `ERROR`, category `STATE_CREATION`): ``` ID3D12Device::CreateCommittedResource: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_RESOURCE_DESC::Format is B4G4R4A4_UNORM. ``` ID 817 is `D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT`: ``` ID3D12Device::CreateCommittedResource3: When D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET is set in D3D12_RESOURCE_DESC::Flags, D3D12_CLEAR_VALUE::Format must be valid to be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_CLEAR_VALUE::Format is B4G4R4A4_UNORM. ``` In the runs the castable try failed as well. Outside the emulator it only fails with a clear value in format 115, so the title most likely passes one. The emulator then falls back to the plain creation, which fails with 599. Format support (`CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)`): | | RTX 3070 Ti, driver 621.24 | Radeon iGPU | |---|---|---| | 115 `B4G4R4A4_UNORM`, `Support1` | `0x008413f0`, `RENDER_TARGET` clear | `0x02e4d3f0`, `RENDER_TARGET` set | | 86 `B5G5R5A1_UNORM`, `Support1` | `0x00e4d3f0`, `RENDER_TARGET` set | `0x02e4d3f0`, `RENDER_TARGET` set | Both adapters report `RelaxedFormatCastingSupported`. So on this card 115 can never be a render target format, but the castable texture is accepted once the clear value in 115 is left out. I haven't tested whether its render target views work in one of the castable formats.
chippy01 commented 2026-11-26 14:02:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-26T14:01:42Z.


@TaynanGT the debug layer can't get this title to the cutscene on this PC. With VICTORY_D3D12_DEBUG=1, 86a16dc (the same diag build and stack as the matched run) stopped in Game Init. The boot's descriptor work went several times slower than without the debug layer: a few thousand title-slot warnings per 10 s instead of 40,000-85,000. The title's own watchdog ended the run at 79 s. Its deliberate write at +0x2215c35 left a crash report that says Game State: Game Init, Frame: 0. Without the debug layer the emulator gets to that texture at 81 s.

So I repeated the two calls make_texture makes for that texture outside the emulator, with the debug layer on. The arguments are the same: 2560x1440, 1 mip, B4G4R4A4_UNORM, ALLOW_RENDER_TARGET, default heap. The castable list is what castable(115) gives (formats 49-52, 54, 56-59, 68, 69, 85, 86).

call RTX 3070 Ti Radeon iGPU (Ryzen 9 7900X)
CreateCommittedResource3 with those castable formats and a clear value in format 115 E_INVALIDARG, ID 817 made
CreateCommittedResource3 with the same castable formats, no clear value made made
CreateCommittedResource (plain), with or without that clear value E_INVALIDARG, ID 599 made

ID 599 is D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS (severity ERROR, category STATE_CREATION):

ID3D12Device::CreateCommittedResource: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_RESOURCE_DESC::Format is B4G4R4A4_UNORM.

ID 817 is D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT:

ID3D12Device::CreateCommittedResource3: When D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET is set in D3D12_RESOURCE_DESC::Flags, D3D12_CLEAR_VALUE::Format must be valid to be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_CLEAR_VALUE::Format is B4G4R4A4_UNORM.

In the runs the castable try failed as well. Outside the emulator it only fails with a clear value in format 115, so the title most likely passes one. The emulator then falls back to the plain creation, which fails with 599.

Format support (CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)):

RTX 3070 Ti, driver 621.24 Radeon iGPU
115 B4G4R4A4_UNORM, Support1 0x008413f0, RENDER_TARGET clear 0x02e4d3f0, RENDER_TARGET set
86 B5G5R5A1_UNORM, Support1 0x00e4d3f0, RENDER_TARGET set 0x02e4d3f0, RENDER_TARGET set

Both adapters report RelaxedFormatCastingSupported. So on this card 115 can never be a render target format, but the castable texture is accepted once the clear value in 115 is left out. I haven't tested whether its render target views work in one of the castable formats.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7194172665 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7194172665). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-26T14:01:42Z. --- @TaynanGT the debug layer can't get this title to the cutscene on this PC. With `VICTORY_D3D12_DEBUG=1`, `86a16dc` (the same diag build and stack as the matched run) stopped in Game Init. The boot's descriptor work went several times slower than without the debug layer: a few thousand title-slot warnings per 10 s instead of 40,000-85,000. The title's own watchdog ended the run at 79 s. Its deliberate write at `+0x2215c35` left a crash report that says `Game State: Game Init`, `Frame: 0`. Without the debug layer the emulator gets to that texture at 81 s. So I repeated the two calls `make_texture` makes for that texture outside the emulator, with the debug layer on. The arguments are the same: 2560x1440, 1 mip, `B4G4R4A4_UNORM`, `ALLOW_RENDER_TARGET`, default heap. The castable list is what `castable(115)` gives (formats 49-52, 54, 56-59, 68, 69, 85, 86). | call | RTX 3070 Ti | Radeon iGPU (Ryzen 9 7900X) | |---|---|---| | `CreateCommittedResource3` with those castable formats and a clear value in format 115 | `E_INVALIDARG`, ID 817 | made | | `CreateCommittedResource3` with the same castable formats, no clear value | made | made | | `CreateCommittedResource` (plain), with or without that clear value | `E_INVALIDARG`, ID 599 | made | ID 599 is `D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS` (severity `ERROR`, category `STATE_CREATION`): ``` ID3D12Device::CreateCommittedResource: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_RESOURCE_DESC::Format is B4G4R4A4_UNORM. ``` ID 817 is `D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT`: ``` ID3D12Device::CreateCommittedResource3: When D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET is set in D3D12_RESOURCE_DESC::Flags, D3D12_CLEAR_VALUE::Format must be valid to be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_CLEAR_VALUE::Format is B4G4R4A4_UNORM. ``` In the runs the castable try failed as well. Outside the emulator it only fails with a clear value in format 115, so the title most likely passes one. The emulator then falls back to the plain creation, which fails with 599. Format support (`CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)`): | | RTX 3070 Ti, driver 621.24 | Radeon iGPU | |---|---|---| | 115 `B4G4R4A4_UNORM`, `Support1` | `0x008413f0`, `RENDER_TARGET` clear | `0x02e4d3f0`, `RENDER_TARGET` set | | 86 `B5G5R5A1_UNORM`, `Support1` | `0x00e4d3f0`, `RENDER_TARGET` set | `0x02e4d3f0`, `RENDER_TARGET` set | Both adapters report `RelaxedFormatCastingSupported`. So on this card 115 can never be a render target format, but the castable texture is accepted once the clear value in 115 is left out. I haven't tested whether its render target views work in one of the castable formats.
TaynanGT commented 2026-11-26 20:03:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-26T20:03:52Z.


Thanks for isolating both calls, @chippy01. I reproduced the format 115 result on an RTX 4090 (621.40) with a standalone D3D12 test using the same 2560×1440 texture, render-target flag and castable list. With GPU-based validation enabled, CreateCommittedResource3 returned E_INVALIDARG (817) with a B4G4R4A4_UNORM optimized clear and succeeded without it. The 4090 reported Support1=0x008413f0, with RENDER_TARGET clear.

I also created a B5G5R5A1_UNORM render-target view of the successful allocation and submitted a ClearRenderTargetView. The GPU completed it and the debug layer reported zero errors. The Ryzen 9 9950X3D’s Radeon iGPU (32.0.21045.29003) accepted both creation calls and the same view and clear.

That gives us a test for a separate texture fix. The title’s actual view format and the cutscene still need an in-game check.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7202253378 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7202253378). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-26T20:03:52Z. --- Thanks for isolating both calls, @chippy01. I reproduced the format 115 result on an RTX 4090 (621.40) with a standalone D3D12 test using the same 2560×1440 texture, render-target flag and castable list. With GPU-based validation enabled, `CreateCommittedResource3` returned `E_INVALIDARG` (817) with a `B4G4R4A4_UNORM` optimized clear and succeeded without it. The 4090 reported `Support1=0x008413f0`, with `RENDER_TARGET` clear. I also created a `B5G5R5A1_UNORM` render-target view of the successful allocation and submitted a `ClearRenderTargetView`. The GPU completed it and the debug layer reported zero errors. The Ryzen 9 9950X3D’s Radeon iGPU (`32.0.21045.29003`) accepted both creation calls and the same view and clear. That gives us a test for a separate texture fix. The title’s actual view format and the cutscene still need an in-game check.
Lyrnc commented 2026-11-27 00:46:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Lyrnc on 2026-11-27T00:46:09Z.


Wave64 hardware check of c5ab088 (merged with main 63bcca4, a README-only merge) on a 32-lane host (RTX 5080).

Setup. Windows 11, an RTX 5080 (32..32) and the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA 2, 32..64) in one machine. 231 hand-written GFX10 wave64 compute programs, our own code (no game files):

  • 151 in one 64-thread group: 13 kinds of construct, each under up to 10 EXEC masks;
  • 15 f32 wave sums;
  • 65 of the programs in 128-thread groups (two console waves that branch differently).

In most cases a value set inside the branch, a scalar or a lane result, is also read by every lane after the join, as compiled code does with a reduction's result.

Expected values: the same code run natively in wave64 on the gfx1036. An independent Python model agrees with the hardware on every case. Each program goes through emit_with(.., Options { host_wave32: true, .. }), dxil.dll validation and a D3D12 dispatch, comparing every output of every lane. For reference, the last column is main run with WaveSize(64) natively on the Radeon. That is the per-lane form on a host that runs the console's wave size, and host_wave32: false on this branch gives exactly the same results.

Results (exact / differ / refused):

case kind n main (5080) #2633 (5080) #2633 (Radeon, same translation) main, native wave64 (Radeon)
wave reduction in a branch 40 0 / 0 / 40 8 / 32 / 0 8 / 32 / 0 8 / 32 / 0
v_readfirstlane in a branch 10 1 / 9 / 0 1 / 9 / 0 1 / 9 / 0 1 / 9 / 0
v_readlane in a branch 20 0 / 0 / 20 4 / 16 / 0 4 / 16 / 0 4 / 16 / 0
LDS min/max one wave shares, no barrier 10 0 / 0 / 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
allocation idiom in a branch 10 0 / 0 / 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
v_writelane in a branch 18 0 / 0 / 18 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0
reduction in two nested branches 6 0 / 0 / 6 0 / 6 / 0 0 / 6 / 0 0 / 6 / 0
reduction in a loop lanes leave one by one 3 0 / 0 / 3 0 / 0 / 3 0 / 0 / 3 0 / 3 / 0
reduction after an early-out (v_cmpx) 6 0 / 0 / 6 1 / 5 / 0 1 / 5 / 0 1 / 5 / 0
LDS written and read in one branch 10 0 / 0 / 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
vote loop + reduction in a branch 6 0 / 0 / 6 0 / 0 / 6 0 / 0 / 6 2 / 4 / 0
vote loop (s_cbranch_vccz) alone 5 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0
break loop (s_cbranch_scc0) 7 0 / 0 / 7 0 / 0 / 7 0 / 0 / 7 1 / 6 / 0
f32 wave sums 15 0 / 0 / 15 1 / 12 / 2 3 / 10 / 2 5 / 10 / 0
128-thread groups 65 1 / 9 / 55 12 / 42 / 11 12 / 42 / 11 13 / 52 / 0
all 231 4 / 21 / 206 69 / 133 / 29 71 / 131 / 29 77 / 154 / 0

What it means.

The halves themselves hold up. No pipeline is refused by the driver (main: every one of its 206 refusals is the driver refusing WaveSize(64)), 29 programs are refused by the translator with a reason, and LDS one wave shares is exact (30 of 30: min/max, write and read in one branch, the allocation idiom). Lane reads of a lane outside the branch also come back right where main in native wave64 reads 0: mask lanes 32-63, v_readlane of lane 0, lane 32 gets 0x5 here and 0x0 on main.

The differences are the per-lane form's, not the halves'. 131 of the 133 cases that differ on the 5080 also differ on main in native wave64 on the Radeon. The other 2 are f32 sums that differ by 1 ulp on NVIDIA only; the same translation is exact for them on the Radeon. No case is exact here and wrong on main natively. By kind:

  1. A scalar set inside a per-lane branch and read after the join keeps the old value in the lanes that skipped the branch (32 + 16 + 6 + 5 of the integer cases, most of the f32 and 128-thread ones). Reduction under mask lanes 32-63, then v_mov_b32 v11, s38 after the join: lane 0 gets 0x5555, the hardware gives 0x1270 (the reduction, since the wave ran the branch). On the console a scalar belongs to the wave. Here the join's phi picks the value per lane by the edge the lane came by, for SGPR phis too (wide.rs module note: "Scalar code runs in every lane ... which keeps each lane's values"; wide_phi, wide.rs:300-325). Outside wave-wide regions the per-lane form does the same, which is the subject of #269.
  2. v_writelane to a lane outside the branch is dropped (8): mask lanes 0-31, v_writelane lane 33, read back with v_readlane gives 0x1234 where the hardware gives 0x777. The select is written inside the per-lane branch (lower.rs:6737-6751). The console's v_writelane ignores EXEC; #320 handles this in the console flow.
  3. A first-lane read as the program's only lane operation (9, and 6 of 128 threads): no console lanes, so the program is not in halves. It runs per host wave (lower.rs:6769-6772, "shortcut: without console lanes"). Mask all: lane 32 reads 0x65 instead of 0x5. Counting a first-lane read whose value halves::lane_uniform cannot prove the same as needing the console's lanes would bring these programs into halves, but they would then hit item 1 for the value read after the join.
  4. The vote loop alone runs per lane (structure.rs:1352, s_cbranch_vccz by the lane's own bit), as on main.
  5. Refused (29): a wave reduction over both 32-lane halves where not every thread of the group meets, for every reduction inside a loop with a lane-dependent exit (vote loop, break loop, loops lanes leave). This is the case the description lists as remaining.
  6. f32 sums also differ by 1 ulp on the 5080 where only one half takes part (mask lanes 0-31: hw 0x44B8CD7E, translation 0x44B8CD7F). That is the host's waveActiveOp order inside a 32-lane wave.

For comparison, the console-flow stack (#320 + #439, with #2214 for 128-thread groups) gives 139 of the 151 one-wave cases and 56 of the 65 two-wave cases exact on the same 5080, because there every lane runs every block and scalars are the wave's.

Not tested: the title; halves_random_tests (not run here).

AI use: Claude Code (Claude Opus 5.5) wrote the cases, the harness and this report, and ran them on the GPUs named here; the numbers come from those runs.


Float wave sums on the same branch

Setup. Hand-written console wave64 compute programs, one 64-thread group each, translated with Options { host_wave32: true }, validated by dxil.dll and run through D3D12 on an RTX 5080 and on the Radeon iGPU (gfx1036). The reference is the same instructions run natively in wave64 on that gfx1036. The cases are 34 whole-wave f32 sums and 20 f64 sums in the compiler's WaveActiveSum shape: DPP8 [1,0,3,2,5,4,7,6] / [2,2,0,0,6,6,4,4] / [4,4,4,4,0,0,0,0], row_mirror bound_ctrl:1, v_permlanex16_b32 0, 0, v_readlane_b32 32 and 0. They sit inside per-lane branches: v10 = the sum in the branch, v12 = the same scalar after the join, preset to 0x5555.

54 cases exact differ refused
RTX 5080 6 28 20
Radeon iGPU 12 22 20
  • The 20 refusals are the f64 sums: a whole-wave section step the simulation does not follow.
  • 14 differences (5080 only) are the order of the f32 sum. The result is exactly what adding lanes 16 apart first in each 32-lane half gives (WaveActiveSum on NVIDIA). Example, every lane, +-2^24 terms: hardware 86.0 (0x42ac0000), 5080 86.1632 (0x42ac5390).
  • 14 on the 5080 and 22 on the Radeon are a different issue: after the join, lanes outside the branch still read the old scalar. Example: f32/hash/hi32, v12 lane 0: hardware 0x44b88648 (the sum the lanes 32..63 made), translator 0x5555. In every one of these the sum inside the branch is right.
  • 5 more sums in uniform control flow (no branch), 5080: 1 exact, 2 differ in the sum's order, 2 f64 refused.

Meaning. The halves form takes the sum, but adds within each host wave in the driver's order. A tree of partner-lane reads from bit 0 (lane ^ 1, 2, 4, 8, 16) before joining the halves makes these sums exact (measured in the fork's version: 59 of 59 on the 5080). Separately, a scalar the branch writes does not reach lanes that skipped the branch.

AI use: Claude Code (Claude Opus 5.5) wrote the cases and the harness and ran them on this PC. The numbers come from those runs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7206737113 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7206737113). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-27T00:46:09Z. --- Wave64 hardware check of `c5ab088` (merged with main `63bcca4`, a README-only merge) on a 32-lane host (RTX 5080). **Setup.** Windows 11, an RTX 5080 (32..32) and the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA 2, 32..64) in one machine. 231 hand-written GFX10 wave64 compute programs, our own code (no game files): - 151 in one 64-thread group: 13 kinds of construct, each under up to 10 EXEC masks; - 15 f32 wave sums; - 65 of the programs in 128-thread groups (two console waves that branch differently). In most cases a value set inside the branch, a scalar or a lane result, is also read by every lane after the join, as compiled code does with a reduction's result. Expected values: the same code run natively in wave64 on the gfx1036. An independent Python model agrees with the hardware on every case. Each program goes through `emit_with(.., Options { host_wave32: true, .. })`, `dxil.dll` validation and a D3D12 dispatch, comparing every output of every lane. For reference, the last column is main run with `WaveSize(64)` natively on the Radeon. That is the per-lane form on a host that runs the console's wave size, and `host_wave32: false` on this branch gives exactly the same results. **Results** (exact / differ / refused): | case kind | n | main (5080) | #2633 (5080) | #2633 (Radeon, same translation) | main, native wave64 (Radeon) | |---|---|---|---|---|---| | wave reduction in a branch | 40 | 0 / 0 / 40 | 8 / **32** / 0 | 8 / 32 / 0 | 8 / 32 / 0 | | `v_readfirstlane` in a branch | 10 | 1 / 9 / 0 | 1 / **9** / 0 | 1 / 9 / 0 | 1 / 9 / 0 | | `v_readlane` in a branch | 20 | 0 / 0 / 20 | 4 / **16** / 0 | 4 / 16 / 0 | 4 / 16 / 0 | | LDS min/max one wave shares, no barrier | 10 | 0 / 0 / 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | allocation idiom in a branch | 10 | 0 / 0 / 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `v_writelane` in a branch | 18 | 0 / 0 / 18 | 10 / **8** / 0 | 10 / 8 / 0 | 10 / 8 / 0 | | reduction in two nested branches | 6 | 0 / 0 / 6 | 0 / **6** / 0 | 0 / 6 / 0 | 0 / 6 / 0 | | reduction in a loop lanes leave one by one | 3 | 0 / 0 / 3 | 0 / 0 / 3 | 0 / 0 / 3 | 0 / 3 / 0 | | reduction after an early-out (`v_cmpx`) | 6 | 0 / 0 / 6 | 1 / **5** / 0 | 1 / 5 / 0 | 1 / 5 / 0 | | LDS written and read in one branch | 10 | 0 / 0 / 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | vote loop + reduction in a branch | 6 | 0 / 0 / 6 | 0 / 0 / 6 | 0 / 0 / 6 | 2 / 4 / 0 | | vote loop (`s_cbranch_vccz`) alone | 5 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | | break loop (`s_cbranch_scc0`) | 7 | 0 / 0 / 7 | 0 / 0 / 7 | 0 / 0 / 7 | 1 / 6 / 0 | | f32 wave sums | 15 | 0 / 0 / 15 | 1 / 12 / 2 | 3 / 10 / 2 | 5 / 10 / 0 | | 128-thread groups | 65 | 1 / 9 / 55 | 12 / 42 / 11 | 12 / 42 / 11 | 13 / 52 / 0 | | **all** | 231 | 4 / 21 / 206 | **69 / 133 / 29** | 71 / 131 / 29 | 77 / 154 / 0 | **What it means.** The halves themselves hold up. No pipeline is refused by the driver (main: every one of its 206 refusals is the driver refusing `WaveSize(64)`), 29 programs are refused by the translator with a reason, and LDS one wave shares is exact (30 of 30: min/max, write and read in one branch, the allocation idiom). Lane reads of a lane outside the branch also come back right where main in native wave64 reads 0: mask lanes 32-63, `v_readlane` of lane 0, lane 32 gets 0x5 here and 0x0 on main. The differences are the per-lane form's, not the halves'. 131 of the 133 cases that differ on the 5080 also differ on main in native wave64 on the Radeon. The other 2 are f32 sums that differ by 1 ulp on NVIDIA only; the same translation is exact for them on the Radeon. No case is exact here and wrong on main natively. By kind: 1. **A scalar set inside a per-lane branch and read after the join keeps the old value in the lanes that skipped the branch** (32 + 16 + 6 + 5 of the integer cases, most of the f32 and 128-thread ones). Reduction under mask lanes 32-63, then `v_mov_b32 v11, s38` after the join: lane 0 gets 0x5555, the hardware gives 0x1270 (the reduction, since the wave ran the branch). On the console a scalar belongs to the wave. Here the join's phi picks the value per lane by the edge the lane came by, for SGPR phis too (`wide.rs` module note: "Scalar code runs in every lane ... which keeps each lane's values"; `wide_phi`, `wide.rs:300-325`). Outside wave-wide regions the per-lane form does the same, which is the subject of #269. 2. **`v_writelane` to a lane outside the branch is dropped** (8): mask lanes 0-31, `v_writelane` lane 33, read back with `v_readlane` gives 0x1234 where the hardware gives 0x777. The select is written inside the per-lane branch (lower.rs:6737-6751). The console's `v_writelane` ignores EXEC; #320 handles this in the console flow. 3. **A first-lane read as the program's only lane operation** (9, and 6 of 128 threads): no console lanes, so the program is not in halves. It runs per host wave (lower.rs:6769-6772, "shortcut: without console lanes"). Mask all: lane 32 reads 0x65 instead of 0x5. Counting a first-lane read whose value `halves::lane_uniform` cannot prove the same as needing the console's lanes would bring these programs into halves, but they would then hit item 1 for the value read after the join. 4. The vote loop alone runs per lane (structure.rs:1352, `s_cbranch_vccz` by the lane's own bit), as on main. 5. Refused (29): `a wave reduction over both 32-lane halves where not every thread of the group meets`, for every reduction inside a loop with a lane-dependent exit (vote loop, break loop, loops lanes leave). This is the case the description lists as remaining. 6. f32 sums also differ by 1 ulp on the 5080 where only one half takes part (mask lanes 0-31: hw 0x44B8CD7E, translation 0x44B8CD7F). That is the host's `waveActiveOp` order inside a 32-lane wave. For comparison, the console-flow stack (#320 + #439, with #2214 for 128-thread groups) gives 139 of the 151 one-wave cases and 56 of the 65 two-wave cases exact on the same 5080, because there every lane runs every block and scalars are the wave's. **Not tested:** the title; `halves_random_tests` (not run here). **AI use:** Claude Code (Claude Opus 5.5) wrote the cases, the harness and this report, and ran them on the GPUs named here; the numbers come from those runs. --- **Float wave sums on the same branch** **Setup.** Hand-written console wave64 compute programs, one 64-thread group each, translated with `Options { host_wave32: true }`, validated by dxil.dll and run through D3D12 on an RTX 5080 and on the Radeon iGPU (gfx1036). The reference is the same instructions run natively in wave64 on that gfx1036. The cases are 34 whole-wave f32 sums and 20 f64 sums in the compiler's `WaveActiveSum` shape: DPP8 `[1,0,3,2,5,4,7,6]` / `[2,2,0,0,6,6,4,4]` / `[4,4,4,4,0,0,0,0]`, `row_mirror bound_ctrl:1`, `v_permlanex16_b32 0, 0`, `v_readlane_b32` 32 and 0. They sit inside per-lane branches: v10 = the sum in the branch, v12 = the same scalar after the join, preset to 0x5555. | 54 cases | exact | differ | refused | |---|---|---|---| | RTX 5080 | 6 | 28 | 20 | | Radeon iGPU | 12 | 22 | 20 | - The 20 refusals are the f64 sums: `a whole-wave section step the simulation does not follow`. - 14 differences (5080 only) are the order of the f32 sum. The result is exactly what adding lanes 16 apart first in each 32-lane half gives (`WaveActiveSum` on NVIDIA). Example, every lane, +-2^24 terms: hardware 86.0 (0x42ac0000), 5080 86.1632 (0x42ac5390). - 14 on the 5080 and 22 on the Radeon are a different issue: after the join, lanes outside the branch still read the old scalar. Example: `f32/hash/hi32`, v12 lane 0: hardware 0x44b88648 (the sum the lanes 32..63 made), translator 0x5555. In every one of these the sum inside the branch is right. - 5 more sums in uniform control flow (no branch), 5080: 1 exact, 2 differ in the sum's order, 2 f64 refused. **Meaning.** The halves form takes the sum, but adds within each host wave in the driver's order. A tree of partner-lane reads from bit 0 (lane ^ 1, 2, 4, 8, 16) before joining the halves makes these sums exact (measured in the fork's version: 59 of 59 on the 5080). Separately, a scalar the branch writes does not reach lanes that skipped the branch. AI use: Claude Code (Claude Opus 5.5) wrote the cases and the harness and ran them on this PC. The numbers come from those runs.
pickles976 commented 2026-11-27 01:12:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T01:12:41Z.


Post-prologue Wine/NVIDIA refusal census — a new local verification target, not a #2633 regression claim

The copy-only scoped-XMem/paging integration has finally passed this16 GiB host's previous loading-RAM stop. A guarded180 s trial reached “VICE CITY, TWO YEARS AGO” at120 s, then black at175 s; minimum availableRAM3669.3 MiB, GPU peak4557 MiB. No controllable3D gameplay. Memory/provenance report: https://github.com/Marvisak/VIctory/pull/2519#issuecomment-7205904648.

The translator in that dirty mixed stack is #189 3e39e34037915da6d0f10b58b2872799bd9f3ca8, on base 3ed7d725f6895fe1a235eb6fa8ff2485261ca151, preserving its automatic preferred Emulate mode and refusal paths. It is not #2633. The first formerly refused compute pipelines now create, but the later stage exposes43 new translation refusals:

Diagnostic Count Example program hash
64-lane ballot in divergent control flow 14 02384a60fda6f2d0
LDS accesses without a uniform LDS fence in split wave64 23 339d476c267c03c7
Wave reduction in divergent control flow 3 bfad8c6743ac5977
Cross-lane read in divergent control flow 3 c4183d3cbee28e8e

The LDS wording means this analysis could not establish a safe fence; it does not by itself characterize every actual control-flow path. First two examples report offsets0x288 and0x204 respectively. The same run has refused texture formats67/115/86, so the black frame's sole cause is not isolated. Zero ERROR-level or literal no host pipeline: lines must not be reported as shader success: these translation refusals are WARN-level.

Hardware: RTX4060 Laptop8 GiB, NVIDIA590.48.1, Wine11, Linux6.17,15693 MiB RAM. vkd3d-proton is the disclosed diagnostic-relaxed 2576c0b4adfae4a+, not stock certification; NVIDIA masking disabled. Requested mode1920x1080 still produced a3840x2160 swapchain, so no1080p performance claim. No guard raised, forced Wave32, skipped-refusal workaround or new unchanged title retry.

This makes the divergent scalar/EXEC behavior covered in https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7206737113 a concrete next gate for this machine, not just pipeline-creation coverage. Suggested owner acceptance cases: branch-produced SGPR results consumed after the join; ballot low/high words used as data; lane reads/writes across active/inactive halves; and LDS read→write/write→read ordering with equal barrier reachability. Preserve refusal where those properties cannot be established. A lowered/validated pipeline alone is insufficient; compare all lane outputs against a native-Wave64 or independently justified semantic oracle.

Local evidence: .compat-runtime/logs/20261127T004545Z-console.log, 20261127T004545Z-resources.csv and scoped-paged-trial-20261127T004545Z/. Only hashes/diagnostics are shared; title bytes and captures stay local. I have not run #2633's current head or claimed that it fixes these43 shaders.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7207103851 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7207103851). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T01:12:41Z. --- ### Post-prologue Wine/NVIDIA refusal census — a new local verification target, not a #2633 regression claim The copy-only scoped-XMem/paging integration has finally passed this16 GiB host's previous loading-RAM stop. A guarded180 s trial reached “VICE CITY, TWO YEARS AGO” at120 s, then black at175 s; minimum availableRAM3669.3 MiB, GPU peak4557 MiB. No controllable3D gameplay. Memory/provenance report: https://github.com/Marvisak/VIctory/pull/2519#issuecomment-7205904648. The translator in that **dirty mixed stack** is #189 `3e39e34037915da6d0f10b58b2872799bd9f3ca8`, on base `3ed7d725f6895fe1a235eb6fa8ff2485261ca151`, preserving its automatic preferred `Emulate` mode and refusal paths. It is **not #2633**. The first formerly refused compute pipelines now create, but the later stage exposes43 new translation refusals: |Diagnostic|Count|Example program hash| |---|---:|---| |64-lane ballot in divergent control flow|14|`02384a60fda6f2d0`| |LDS accesses without a uniform LDS fence in split wave64|23|`339d476c267c03c7`| |Wave reduction in divergent control flow|3|`bfad8c6743ac5977`| |Cross-lane read in divergent control flow|3|`c4183d3cbee28e8e`| The LDS wording means this analysis could not establish a safe fence; it does not by itself characterize every actual control-flow path. First two examples report offsets0x288 and0x204 respectively. The same run has refused texture formats67/115/86, so the black frame's sole cause is **not isolated**. Zero ERROR-level or literal `no host pipeline:` lines must not be reported as shader success: these translation refusals are WARN-level. Hardware: RTX4060 Laptop8 GiB, NVIDIA590.48.1, Wine11, Linux6.17,15693 MiB RAM. vkd3d-proton is the disclosed diagnostic-relaxed `2576c0b4adfae4a+`, not stock certification; NVIDIA masking disabled. Requested mode1920x1080 still produced a3840x2160 swapchain, so no1080p performance claim. No guard raised, forced Wave32, skipped-refusal workaround or new unchanged title retry. This makes the divergent scalar/EXEC behavior covered in https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7206737113 a concrete next gate for this machine, not just pipeline-creation coverage. Suggested owner acceptance cases: branch-produced SGPR results consumed after the join; ballot low/high words used as data; lane reads/writes across active/inactive halves; and LDS read→write/write→read ordering with equal barrier reachability. Preserve refusal where those properties cannot be established. A lowered/validated pipeline alone is insufficient; compare all lane outputs against a native-Wave64 or independently justified semantic oracle. Local evidence: `.compat-runtime/logs/20261127T004545Z-console.log`, `20261127T004545Z-resources.csv` and `scoped-paged-trial-20261127T004545Z/`. Only hashes/diagnostics are shared; title bytes and captures stay local. I have not run #2633's current head or claimed that it fixes these43 shaders.
TaynanGT commented 2026-11-27 01:27:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T01:27:43Z.


Thanks, @Lyrnc, for checking the lane outputs against native Wave64. The fact that 131 of the 133 differences on the 5080 also show up on native Wave64 in main helps narrow this down. The case where a scalar is set inside a branch and read by lanes that skipped it looks especially useful as a regression test. Is that fixture or harness available to run on the 4090 and the Radeon iGPU here? My earlier 4090 results in this thread were from an older revision.

@pickles976, thanks for including the exact stack and the warning counts. The 43 refusals came from #189 on the Wine/4060 Laptop run, so they give us cases to compare once the same shaders are run on #2633. The texture warnings also leave the cause of the black screen open. I agree that pipeline creation alone can't establish correctness here. I'd want to compare the ballot words, lane reads and writes, and LDS ordering against native Wave64 or a reference with known outputs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7207306394 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7207306394). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:27:43Z. --- Thanks, @Lyrnc, for checking the lane outputs against native Wave64. The fact that 131 of the 133 differences on the 5080 also show up on native Wave64 in `main` helps narrow this down. The case where a scalar is set inside a branch and read by lanes that skipped it looks especially useful as a regression test. Is that fixture or harness available to run on the 4090 and the Radeon iGPU here? My earlier 4090 results in this thread were from an older revision. @pickles976, thanks for including the exact stack and the warning counts. The 43 refusals came from #189 on the Wine/4060 Laptop run, so they give us cases to compare once the same shaders are run on #2633. The texture warnings also leave the cause of the black screen open. I agree that pipeline creation alone can't establish correctness here. I'd want to compare the ballot words, lane reads and writes, and LDS ordering against native Wave64 or a reference with known outputs.
Lyrnc commented 2026-11-27 04:31:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Lyrnc on 2026-11-27T04:31:27Z.


@TaynanGT yes, here it is: https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131

  • fw64_cases.py: the 151 cases. The scalar-set-in-a-branch case is firstlane_branch/*.
  • oracle_fw64.json: the gfx1036 wave64 results per lane.
  • fw64_ref.py: an independent model, which agrees on 151/151.
  • fw64_local_tests.rs: the local Rust test, written against fxceless/victory-fork 52ac4ec. It needs small path and API changes for this branch.
  • fw64_compare.py: the comparer.

The README in the gist has the steps. Everything in it is hand-written, with no game data. On the Radeon iGPU, the f32 sums came out exact and the integer cases matched the 5080 counts. I'd be glad to see the 4090 numbers.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7209865414 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7209865414). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-27T04:31:27Z. --- @TaynanGT yes, here it is: https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131 - `fw64_cases.py`: the 151 cases. The scalar-set-in-a-branch case is `firstlane_branch/*`. - `oracle_fw64.json`: the gfx1036 wave64 results per lane. - `fw64_ref.py`: an independent model, which agrees on 151/151. - `fw64_local_tests.rs`: the local Rust test, written against fxceless/victory-fork 52ac4ec. It needs small path and API changes for this branch. - `fw64_compare.py`: the comparer. The README in the gist has the steps. Everything in it is hand-written, with no game data. On the Radeon iGPU, the f32 sums came out exact and the integer cases matched the 5080 counts. I'd be glad to see the 4090 numbers.
TaynanGT commented 2026-11-27 04:35:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T04:35:22Z.


Thanks for posting the cases and the per-lane Radeon results, @Lyrnc. I’ll start with firstlane_branch/* on c5ab088 and compare the RTX 4090 Wave32 output against the same oracle.

Could you share the generated fw64_data.rs for this gist revision? The generator calls your local hw_oracle.assemble, and the generated file would let me use the exact same instruction words.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7209921524 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7209921524). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:35:22Z. --- Thanks for posting the cases and the per-lane Radeon results, @Lyrnc. I’ll start with `firstlane_branch/*` on `c5ab088` and compare the RTX 4090 Wave32 output against the same oracle. Could you share the generated `fw64_data.rs` for this gist revision? The generator calls your local `hw_oracle.assemble`, and the generated file would let me use the exact same instruction words.
Lyrnc commented 2026-11-27 04:38:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Lyrnc on 2026-11-27T04:38:02Z.


@TaynanGT added: fw64_data.rs is now in the gist, generated from the same fw64_cases.py revision, with the exact instruction words that ran on the gfx1036.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7209959690 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7209959690). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-27T04:38:02Z. --- @TaynanGT added: `fw64_data.rs` is now in the gist, generated from the same `fw64_cases.py` revision, with the exact instruction words that ran on the gfx1036.
TaynanGT commented 2026-11-27 04:42:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T04:42:22Z.


Thanks for adding the generated file, @Lyrnc. I found all ten firstlane_branch/* cases in the updated gist. I’ll use those exact words for the first RTX 4090 comparison on c5ab088, with the gfx1036 lane outputs as the reference.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7210027185 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7210027185). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:42:22Z. --- Thanks for adding the generated file, @Lyrnc. I found all ten `firstlane_branch/*` cases in the updated gist. I’ll use those exact words for the first RTX 4090 comparison on `c5ab088`, with the gfx1036 lane outputs as the reference.
TaynanGT commented 2026-11-27 04:48:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T04:48:04Z.


@Lyrnc I ran all ten firstlane_branch/* cases from your generated file on c5ab088, using native D3D12 on the RTX 4090 (621.40) with host_wave32=true. All ten passed DXIL validation and dispatched. Nine differed from the gfx1036 reference, for 508 differing dwords out of 10,240. The second run produced byte-for-byte identical output.

Mask Different dwords
all 64
lo32, hi32 32 each
alt 64
lane0, lane40, lane63 63 each
l31_32 64
sparse 63
none 0

For all, v10 at lane 32 was 0x65 on the 4090 and 0x05 on gfx1036. For lo32, v11 at lane 32 kept 0x5555 on the 4090 where gfx1036 returned 0x05. The baseline comparison is still open.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7210105016 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7210105016). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:48:04Z. --- @Lyrnc I ran all ten `firstlane_branch/*` cases from your generated file on `c5ab088`, using native D3D12 on the RTX 4090 (621.40) with `host_wave32=true`. All ten passed DXIL validation and dispatched. Nine differed from the gfx1036 reference, for 508 differing dwords out of 10,240. The second run produced byte-for-byte identical output. | Mask | Different dwords | | --- | ---: | | `all` | 64 | | `lo32`, `hi32` | 32 each | | `alt` | 64 | | `lane0`, `lane40`, `lane63` | 63 each | | `l31_32` | 64 | | `sparse` | 63 | | `none` | 0 | For `all`, `v10` at lane 32 was `0x65` on the 4090 and `0x05` on gfx1036. For `lo32`, `v11` at lane 32 kept `0x5555` on the 4090 where gfx1036 returned `0x05`. The baseline comparison is still open.
TaynanGT commented 2026-11-27 04:58:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T04:58:12Z.


@Lyrnc I ran the same ten cases on the Radeon iGPU (driver 32.0.21045.29003) at both 63bcca4 and c5ab088. With the default wave size, both Radeon runs produced the same 10,240 outputs as the RTX 4090 run.

I then added a WaveSize(64) requirement in the isolated Radeon test on each revision and verified it in the emitted metadata. Both revisions still produced identical outputs. Compared with the gfx1036 reference, eight cases differed, with 406 differences, all in v11 after EXEC is restored. v10 matched across all ten masks, and both all and none matched in full.

For lo32, lane 32’s v11 stayed at 0x5555 on both translated revisions and read 0x05 on gfx1036. That post-branch discrepancy already reproduces on the base 63bcca4.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7210240833 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7210240833). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:58:12Z. --- @Lyrnc I ran the same ten cases on the Radeon iGPU (driver `32.0.21045.29003`) at both `63bcca4` and `c5ab088`. With the default wave size, both Radeon runs produced the same 10,240 outputs as the RTX 4090 run. I then added a `WaveSize(64)` requirement in the isolated Radeon test on each revision and verified it in the emitted metadata. Both revisions still produced identical outputs. Compared with the gfx1036 reference, eight cases differed, with 406 differences, all in `v11` after EXEC is restored. `v10` matched across all ten masks, and both `all` and `none` matched in full. For `lo32`, lane 32’s `v11` stayed at `0x5555` on both translated revisions and read `0x05` on gfx1036. That post-branch discrepancy already reproduces on the base `63bcca4`.
pickles976 commented 2026-11-27 11:05:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T11:05:29Z.


Linux/Wine RTX 4060 Laptop verification of exact production head 706c006ca9a9ee525b64114831e1dd418b198ba4 (2026-11-27).

Hardware/stack: RTX4060Laptop8GiB,16GiB systemRAM,NVIDIA590.48.1,Wine11.0; diagnostic vkd3d2576c0b4adfae4a+ with the previously disclosed relaxed-vtable build, not stock-stack certification. NVIDIA vendor masking disabled. One experiment at a time; unchanged6000MiB globalGPU/2048MiB availableRAM/10GiB user-disk guards and9GiB/512MiB scope.

  1. victory-shader --lib emit::halves_tests -- --nocapture --test-threads=1: 24 passed,0failed,0ignored,29.02s after fresh7.35s compilation from this checkout. Test-only changes replace both absent-hardware skips with assertions and require a complete output buffer before the per-lane comparison; production unchanged.53 logged NVIDIA halves readback legs report zero mismatches, including multi-console-wave divergent loops, early ends, first-lane-after-loop and LDS ordering. NativeWave64 controls correctly refuse on this32-lane GPU; this is not nativeWave64/WARP coverage.

  2. Same original XboxBvhBuilder.dll, translate ... --pipelines --validate --list --jobs 1: 52/52 native compute pipelines created,52/52 validated,50.51s guarded command including fresh45.96s release compilation. Host automatically detected32-lane maximum; SDKdxil.dll validator loaded. All seven containers refused by our previous#439 mixed stack now pass: two64-thread address/LDS programs at0x25c40/0x28770, and five256/512-thread programs at0x93220/0x95220/0x99160/0x9a830/0x9be80. Their native hashes respectively28918b7150a7aad5,caa78b8ca62bc3d6,14394a322f6dd5c2,e63d22c4def9ba6a,9fc111d3be79364f,77360df21e12ea43,39321a95223001ed.

This is a useful exact compiler/admission-gate advance, not actual BVH execution or a rendered-title claim. Our prior mixed runtime holds the entire builder at53pipelines/46made/7refused; we keep that all-or-none guard. The two64-thread native programs contain repeated LDS writes/cross-half lane reads without native barriers; a compact computed-address + divergent-LDS + post-reconvergence scalar readback against an independent nativeWave64 oracle remains valuable. No original program/assets/captures uploaded.

Local reproducibility logs: .compat-runtime/logs/verify-pr2633-halves-20261127T105728Z/ and verify-pr2633-builder-20261127T105909Z/ (command,exactref/dirty disclosure,console,timing,resource samples). This is not a matched-parent performance comparison or certification of untested shaders.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7216667308 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7216667308). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T11:05:29Z. --- Linux/Wine RTX 4060 Laptop verification of exact production head `706c006ca9a9ee525b64114831e1dd418b198ba4` (2026-11-27). Hardware/stack: RTX4060Laptop8GiB,16GiB systemRAM,NVIDIA590.48.1,Wine11.0; diagnostic vkd3d2576c0b4adfae4a+ with the previously disclosed relaxed-vtable build, not stock-stack certification. NVIDIA vendor masking disabled. One experiment at a time; unchanged6000MiB globalGPU/2048MiB availableRAM/10GiB user-disk guards and9GiB/512MiB scope. 1. `victory-shader --lib emit::halves_tests -- --nocapture --test-threads=1`: **24 passed,0failed,0ignored**,29.02s after fresh7.35s compilation from this checkout. Test-only changes replace both absent-hardware skips with assertions and require a complete output buffer before the per-lane comparison; production unchanged.53 logged NVIDIA halves readback legs report zero mismatches, including multi-console-wave divergent loops, early ends, first-lane-after-loop and LDS ordering. NativeWave64 controls correctly refuse on this32-lane GPU; this is not nativeWave64/WARP coverage. 2. Same original `XboxBvhBuilder.dll`, `translate ... --pipelines --validate --list --jobs 1`: **52/52 native compute pipelines created,52/52 validated**,50.51s guarded command including fresh45.96s release compilation. Host automatically detected32-lane maximum; SDKdxil.dll validator loaded. All seven containers refused by our previous#439 mixed stack now pass: two64-thread address/LDS programs at0x25c40/0x28770, and five256/512-thread programs at0x93220/0x95220/0x99160/0x9a830/0x9be80. Their native hashes respectively28918b7150a7aad5,caa78b8ca62bc3d6,14394a322f6dd5c2,e63d22c4def9ba6a,9fc111d3be79364f,77360df21e12ea43,39321a95223001ed. This is a useful **exact compiler/admission-gate advance**, not actual BVH execution or a rendered-title claim. Our prior mixed runtime holds the entire builder at53pipelines/46made/7refused; we keep that all-or-none guard. The two64-thread native programs contain repeated LDS writes/cross-half lane reads without native barriers; a compact computed-address + divergent-LDS + post-reconvergence scalar readback against an independent nativeWave64 oracle remains valuable. No original program/assets/captures uploaded. Local reproducibility logs: `.compat-runtime/logs/verify-pr2633-halves-20261127T105728Z/` and `verify-pr2633-builder-20261127T105909Z/` (command,exactref/dirty disclosure,console,timing,resource samples). This is not a matched-parent performance comparison or certification of untested shaders.
TaynanGT commented 2026-11-27 11:16:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T11:16:45Z.


@pickles976 The 24 readback tests and the 52 accepted compute pipelines on 706c006 give us a clear result for that diagnostic Wine stack. Keep the builder’s all-or-none guard for the runtime check. Pipeline creation and lane readback are useful evidence for that step, while the title still needs its own matched run with the builder active.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7216888840 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7216888840). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T11:16:45Z. --- @pickles976 The 24 readback tests and the 52 accepted compute pipelines on `706c006` give us a clear result for that diagnostic Wine stack. Keep the builder’s all-or-none guard for the runtime check. Pipeline creation and lane readback are useful evidence for that step, while the title still needs its own matched run with the builder active.
pickles976 commented 2026-11-27 11:17:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T11:17:00Z.


Important additional gate: the independent published native-gfx1036 firstlane_branch oracle still finds wrong results at exact706c006. Ten no-loop programs, actual NVIDIA32-lane dispatch, mandatory DXIL validation, complete1024-word readbacks per case. Nine cases differ,total508/10240words; none-mask passes. For all-mask, high-half v10/v11 gets101 rather than5; for lo32 the inactive high half retains s38=0x5555 after reconvergence instead of5. These are separate from the passing24owner tests and52nativePSO admissions. Same oldc5ab088 symptom, not established706 regression. Initial local harness compile/layout mistakes were corrected before this verdict; raw outputs independently re-compared using documented register-major index(64*register+lane). Prior#439+Wine single-latch control is running. Runtime promotion of the integrated backend is held pending this check; do not equate PSO creation with Wave64 correctness. Public fixture https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131 ; valid evidence verify-pr2633-native-oracle-layout-20261127T111306Z/.

Matched control now completed: prior#439 e2d3cfd507 plus its previously installed Wine single-latch normalization produces byte-for-byte identical10240 outputwords, including the same508mismatches. No difference in these10programs attributable to#2633. This is not a clean immediate-parent comparison. Control .compat-runtime/logs/verify-pr439-native-oracle-20261127T111546Z/,6.31s freshcompile/0.96stest; head6.40s/1.01s. Suggest checking whether firstlane-only programs select the cross-half path at all, in addition to post-join scalar state. No title-causality claim.

Routing isolation (local probe, now restored): adding only v_readfirstlane_b32 to Lower::new's console_lanes instruction predicate reduces mismatches 508→406, without changing any program words, expected outputs or guards. The full/all mask now agrees completely; in-branch v10 readbacks all match. All406 remaining differences are in v11 after reconvergence: lanes inactive in the branch keep old scalar0x5555 instead of the scalar assigned by the executing console wave. This separates (1) omitted firstlane-only wave admission from (2) post-join scalar preservation; the one-line change is not a complete fix and was not title-trialled or retained in production. Log verify-pr2633-firstlane-routing-probe-20261127T111827Z/; fresh6.42scompile/1.08stest. Please retain both in-branch and post-join outputs in the regression, including disjoint low/high masks and one active lane. No new PR or game data uploaded.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7216893556 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7216893556). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T11:17:00Z. --- Important additional gate: the independent published native-gfx1036 firstlane_branch oracle still finds wrong results at exact706c006. Ten no-loop programs, actual NVIDIA32-lane dispatch, mandatory DXIL validation, complete1024-word readbacks per case. Nine cases differ,total508/10240words; none-mask passes. For all-mask, high-half v10/v11 gets101 rather than5; for lo32 the inactive high half retains s38=0x5555 after reconvergence instead of5. These are separate from the passing24owner tests and52nativePSO admissions. Same oldc5ab088 symptom, not established706 regression. Initial local harness compile/layout mistakes were corrected before this verdict; raw outputs independently re-compared using documented register-major index(64*register+lane). Prior#439+Wine single-latch control is running. Runtime promotion of the integrated backend is held pending this check; do not equate PSO creation with Wave64 correctness. Public fixture https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131 ; valid evidence verify-pr2633-native-oracle-layout-20261127T111306Z/. Matched control now completed: prior#439 e2d3cfd50715954fb89ff462edb37a0c4395ecd0 plus its previously installed Wine single-latch normalization produces **byte-for-byte identical10240 outputwords**, including the same508mismatches. No difference in these10programs attributable to#2633. This is not a clean immediate-parent comparison. Control `.compat-runtime/logs/verify-pr439-native-oracle-20261127T111546Z/`,6.31s freshcompile/0.96stest; head6.40s/1.01s. Suggest checking whether firstlane-only programs select the cross-half path at all, in addition to post-join scalar state. No title-causality claim. Routing isolation (local probe, now restored): adding only `v_readfirstlane_b32` to `Lower::new`'s `console_lanes` instruction predicate reduces mismatches **508→406**, without changing any program words, expected outputs or guards. The full/all mask now agrees completely; in-branch v10 readbacks all match. All406 remaining differences are in **v11 after reconvergence**: lanes inactive in the branch keep old scalar0x5555 instead of the scalar assigned by the executing console wave. This separates (1) omitted firstlane-only wave admission from (2) post-join scalar preservation; the one-line change is **not a complete fix** and was not title-trialled or retained in production. Log `verify-pr2633-firstlane-routing-probe-20261127T111827Z/`; fresh6.42scompile/1.08stest. Please retain both in-branch and post-join outputs in the regression, including disjoint low/high masks and one active lane. No new PR or game data uploaded.
chippy01 commented 2026-11-27 11:29:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-27T11:29:35Z.


Does anyone have CPU usage metrics for a running version of the port?

If specific instructions translate poorly to Wave32, I'm considering testing a fallback path to the RDNA iGPU on Ryzen CPUs. However, I'm worried the added synchronization and transfer overhead will outweigh any minor quality gains.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217136887 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217136887). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-27T11:29:35Z. --- Does anyone have CPU usage metrics for a running version of the port? If specific instructions translate poorly to Wave32, I'm considering testing a fallback path to the RDNA iGPU on Ryzen CPUs. However, I'm worried the added synchronization and transfer overhead will outweigh any minor quality gains.
TaynanGT commented 2026-11-27 11:30:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T11:30:19Z.


@pickles976 The 406 post-join differences match the WaveSize(64) Radeon control I posted above: v10 agrees and v11 keeps the old scalar in the previously inactive lanes. That gives us a separate scalar merge to test after adding first-lane routing. The byte-identical #439 comparison puts the same defect in that control. Keep the all-or-none builder guard and hold runtime promotion. The regression should check both outputs for disjoint halves, one active lane, and the all/none controls before a title run.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217150960 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217150960). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T11:30:19Z. --- @pickles976 The 406 post-join differences match the WaveSize(64) Radeon control I posted above: `v10` agrees and `v11` keeps the old scalar in the previously inactive lanes. That gives us a separate scalar merge to test after adding first-lane routing. The byte-identical #439 comparison puts the same defect in that control. Keep the all-or-none builder guard and hold runtime promotion. The regression should check both outputs for disjoint halves, one active lane, and the all/none controls before a title run.
pickles976 commented 2026-11-27 11:31:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T11:31:01Z.


Matched consumer regression isolated outside the mixed integration (Linux/Wine11, physical RTX4060 Laptop8GiB, NVIDIA590.48.1, 16GiB RAM, diagnostic relaxed-vkd3d2576c0b4adfae4a+; not stock-Windows certification):

I replayed the unchanged instruction words from #439's emit/lane_read_loop_tests.rs on exact #2633 production 706c006ca9a9ee525b64114831e1dd418b198ba4 and the previously verified #439 e2d3cfd50715954fb89ff462edb37a0c4395ecd0 + our disclosed Wine single-latch normalization. Only test-harness API adaptation, mandatory DXIL validation, NVIDIA vendor/32-lane assertions and complete readbacks differ. This is not an immediate-parent regression comparison.

Program #439 control wrong words #2633 wrong words
wave32, read lane20, ordinary latch 0/32 12/32
wave64, read lane40, ordinary latch 0/64 1/64
wave64, read lane40, joined EXEC backedge 0/64 1/64

Lane t runs t iterations; each iteration reads the named lane's unchanged thread ID into scalar s9; after restoring EXEC it stores t+s9. Expected outputs are20..51 or40..103. In #2633's wave32 case, lane0 returns0 instead20 and lanes21..31 return21..31 instead41..51. Both wave64 cases return0 instead40 only for lane0. All three translated, validated and created native PSOs; failures are actual returned GPU data. The control matched all160words. This is distinct from the shared firstlane_branch defect reported above.

Suggested owner gate: retain the existing #439 lane-loop consumer fixtures when replacing the backend, including native-wave32 and a lane that never enters the loop. Check inactive source-lane reads and wave-scalar updates across loop exit/reconvergence; do not fix this by weakening expected outputs or forcing Wave32 for Wave64 programs. These fixtures use no game assets.

Logs: .compat-runtime/logs/verify-pr439-lane-loop-control-20261127T112940Z/ (fresh6.30scompile,0.79stest) and verify-pr2633-lane-loop-owner-20261127T112948Z/ (fresh6.48scompile,0.77stest). Strict local fixture lab_lane_loop_consumer_readbacks; one thread, same resource guards. Our mixed integration also fails these consumers; no title launch on this port. The earlier24owner tests and52builder PSO admissions remain valid but are not sufficient runtime clearance. No claim that this proves the cause of the title's black HDR frame.

Source pointer for the wave64 lane0 result: emit/lower/wide.rs:597-622 explicitly seeds wide_keep with zero and selects on ? x : held per lane; its comment assumes a lane that never ran the block reads none of that value. wide_keep_block at650-688 applies this to non-VGPR definitions, including scalars. The fixture's restored-EXEC post-loop s9 read is a concrete counterexample to that assumption. A fix needs to distinguish logical-wave scalar state from lane-local VGPR/EXEC bookkeeping, and preserve independent logical waves that have finished; blindly removing all retention would not be safe. Native-wave32's inactive-source case is an additional control-flow gate, not demonstrated fixed by a halves-only scalar change.

Follow-up: retention alone is not a sufficient fix. A bounded local production probe changed only numeric SGPR retention inside widened loops to use a logical-wave predicate: host ballot of the block's active lanes, trade with that console wave's paired half (not a whole-group vote), retain the old scalar only when neither half participates. VGPR/mask retention and phi selection were unchanged. All three programs still validated, created PSOs and executed, with exactly the same14 wrong words (12/32,1/64,1/64); fresh6.51s compile,0.81s test. Evidence verify-pr2633-scalar-wave-probe-20261127T114600Z/. Both production files were restored exactly afterward; no title run.

Therefore the wide_keep observation above is not proof of the sole cause, and changing it alone is not a working patch. fill_phis also sends numeric SGPR joins through wide_phi/wide_pick's per-lane edge selection. The required fix must account for original scalar control flow at joins as well as retention; naively applying any() to every incoming edge is not sufficient (the complement/skip edge is a wave-wide decision too). This refinement leaves the matched GPU failure and runtime hold unchanged.

Update (2026-11-27): an owned fix for the divergent-scalar-join class now exists and passes the physical-GPU gates. r4tedx/VIctory#14 head d21eb16 (base c734600, the #439 lineage rather than this port) fixes the shared 508-word firstlane oracle mismatch by routing divergent_scalar_joins programs through console flow with a per-lane fallback, instead of retaining per-lane scalar state. Matched A/B on the same RTX 4060 Laptop host: base 508/10,240 words wrong (9/10 cases) → head 10/10 cases exact, lane-loop consumers 0/160 on both. This PR's own wide_keep lane-loop regression (14/160 vs 0/160 on the #439 control) is a separate defect of the paired-halves port and remains open. If patching wide_keep retention proves difficult, adopting the same console-flow routing for divergent scalar joins is a working alternative with hardware evidence: https://github.com/r4tedx/VIctory/pull/14#issuecomment-7219801493

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217164469 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217164469). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T11:31:01Z. --- Matched consumer regression isolated outside the mixed integration (Linux/Wine11, physical RTX4060 Laptop8GiB, NVIDIA590.48.1, 16GiB RAM, diagnostic relaxed-vkd3d2576c0b4adfae4a+; not stock-Windows certification): I replayed the unchanged instruction words from #439's `emit/lane_read_loop_tests.rs` on exact #2633 production `706c006ca9a9ee525b64114831e1dd418b198ba4` and the previously verified #439 `e2d3cfd50715954fb89ff462edb37a0c4395ecd0` + our disclosed Wine single-latch normalization. Only test-harness API adaptation, mandatory DXIL validation, NVIDIA vendor/32-lane assertions and complete readbacks differ. This is **not** an immediate-parent regression comparison. | Program | #439 control wrong words | #2633 wrong words | |---|---:|---:| | wave32, read lane20, ordinary latch | 0/32 | 12/32 | | wave64, read lane40, ordinary latch | 0/64 | 1/64 | | wave64, read lane40, joined EXEC backedge | 0/64 | 1/64 | Lane t runs t iterations; each iteration reads the named lane's unchanged thread ID into scalar s9; after restoring EXEC it stores t+s9. Expected outputs are20..51 or40..103. In #2633's wave32 case, lane0 returns0 instead20 and lanes21..31 return21..31 instead41..51. Both wave64 cases return0 instead40 only for lane0. All three translated, validated and created native PSOs; failures are actual returned GPU data. The control matched all160words. This is distinct from the shared firstlane_branch defect reported above. Suggested owner gate: retain the existing #439 lane-loop consumer fixtures when replacing the backend, including native-wave32 and a lane that never enters the loop. Check inactive source-lane reads and wave-scalar updates across loop exit/reconvergence; do not fix this by weakening expected outputs or forcing Wave32 for Wave64 programs. These fixtures use no game assets. Logs: `.compat-runtime/logs/verify-pr439-lane-loop-control-20261127T112940Z/` (fresh6.30scompile,0.79stest) and `verify-pr2633-lane-loop-owner-20261127T112948Z/` (fresh6.48scompile,0.77stest). Strict local fixture `lab_lane_loop_consumer_readbacks`; one thread, same resource guards. Our mixed integration also fails these consumers; no title launch on this port. The earlier24owner tests and52builder PSO admissions remain valid but are not sufficient runtime clearance. No claim that this proves the cause of the title's black HDR frame. Source pointer for the wave64 lane0 result: `emit/lower/wide.rs:597-622` explicitly seeds `wide_keep` with zero and selects `on ? x : held` per lane; its comment assumes a lane that never ran the block reads none of that value. `wide_keep_block` at650-688 applies this to non-VGPR definitions, including scalars. The fixture's restored-EXEC post-loop s9 read is a concrete counterexample to that assumption. A fix needs to distinguish logical-wave scalar state from lane-local VGPR/EXEC bookkeeping, and preserve independent logical waves that have finished; blindly removing all retention would not be safe. Native-wave32's inactive-source case is an additional control-flow gate, not demonstrated fixed by a halves-only scalar change. **Follow-up: retention alone is not a sufficient fix.** A bounded local production probe changed only numeric SGPR retention inside widened loops to use a logical-wave predicate: host ballot of the block's active lanes, trade with that console wave's paired half (not a whole-group vote), retain the old scalar only when neither half participates. VGPR/mask retention and phi selection were unchanged. All three programs still validated, created PSOs and executed, with exactly the same14 wrong words (12/32,1/64,1/64); fresh6.51s compile,0.81s test. Evidence `verify-pr2633-scalar-wave-probe-20261127T114600Z/`. Both production files were restored exactly afterward; no title run. Therefore the `wide_keep` observation above is not proof of the sole cause, and changing it alone is not a working patch. `fill_phis` also sends numeric SGPR joins through `wide_phi`/`wide_pick`'s **per-lane edge selection**. The required fix must account for original scalar control flow at joins as well as retention; naively applying `any()` to every incoming edge is not sufficient (the complement/skip edge is a wave-wide decision too). This refinement leaves the matched GPU failure and runtime hold unchanged. **Update (2026-11-27): an owned fix for the divergent-scalar-join class now exists and passes the physical-GPU gates.** [r4tedx/VIctory#14](https://github.com/r4tedx/VIctory/pull/14) head `d21eb16` (base `c734600`, the #439 lineage rather than this port) fixes the shared 508-word firstlane oracle mismatch by routing `divergent_scalar_joins` programs through console flow with a per-lane fallback, instead of retaining per-lane scalar state. Matched A/B on the same RTX 4060 Laptop host: base 508/10,240 words wrong (9/10 cases) → head **10/10 cases exact**, lane-loop consumers 0/160 on both. This PR's own `wide_keep` lane-loop regression (14/160 vs 0/160 on the #439 control) is a separate defect of the paired-halves port and remains open. If patching `wide_keep` retention proves difficult, adopting the same console-flow routing for divergent scalar joins is a working alternative with hardware evidence: https://github.com/r4tedx/VIctory/pull/14#issuecomment-7219801493
TaynanGT commented 2026-11-27 11:42:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T11:42:29Z.


@pickles976 The 12/32 native-Wave32 differences and the Wave64 lane-zero cases need their own gate alongside the first-lane fixture. The lane that skips the loop still needs the scalar value from its logical wave when EXEC is restored. Keep the consumer fixture and the all-or-none guard through the immediate-parent check.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217382944 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217382944). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T11:42:29Z. --- @pickles976 The 12/32 native-Wave32 differences and the Wave64 lane-zero cases need their own gate alongside the first-lane fixture. The lane that skips the loop still needs the scalar value from its logical wave when EXEC is restored. Keep the consumer fixture and the all-or-none guard through the immediate-parent check.
TaynanGT commented 2026-11-27 11:42:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T11:42:32Z.


@chippy01 I found a process CPU measurement in our Series S baseline. The 9950X3D and RTX 4090 run on bc090416 used 624 process CPU-seconds per minute, or 10.4 logical CPUs on average across the process threads. That covers the session, including loading. For the iGPU test I’d still start with one self-contained compute pass and measure the copies, queue waits and shader time against that same pass on the discrete GPU.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217383720 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217383720). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T11:42:32Z. --- @chippy01 I found a process CPU measurement in our [Series S baseline](https://github.com/TaynanGT/Vice-Tay/blob/3c66032c6dad327466ed2da1e7d13ac198687863/docs/measurements.md#series-s-baseline). The 9950X3D and RTX 4090 run on `bc090416` used 624 process CPU-seconds per minute, or 10.4 logical CPUs on average across the process threads. That covers the session, including loading. For the iGPU test I’d still start with one self-contained compute pass and measure the copies, queue waits and shader time against that same pass on the discrete GPU.
carlosmegino commented 2026-11-27 13:29:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T13:29:01Z.


@chippy01 @TaynanGT @pickles976 — continuing our existing NEW-354 claim, I am making the exact paired control a9ef792f6d516ee6200f4fedeb061a25153d48fd publicly fetchable in response to https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7217327296. It will be distinguished from PiloteCode 140958f and the later partial-paired b3060be, with original attribution and reproducible synthetic fixtures.

My complementary scope is provenance and matched synthetic diagnosis, not a parallel scalar-flow fix. I have read the current 706c006 head and your reports: 508 firstlane_branch mismatches separate into routing and 406 shared post-join scalar differences; the lane-loop consumers give 14/160 wrong words, including native Wave32 and the lane that never enters. The unsuccessful retention-only probe is not a fix or proof of a sole cause. I will preserve both in-branch and post-join outputs, exact guest words and each backend's identity when comparing the archived paired control. Please flag any existing owner work or regression revisions so our report can feed that work without duplicating it. No title run or runtime clearance is inferred.

AI-assisted with OpenAI Codex; synthetic inputs only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219531743 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7219531743). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T13:29:01Z. --- @chippy01 @TaynanGT @pickles976 — continuing our existing NEW-354 claim, I am making the exact paired control a9ef792f6d516ee6200f4fedeb061a25153d48fd publicly fetchable in response to https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7217327296. It will be distinguished from PiloteCode 140958f and the later partial-paired b3060be, with original attribution and reproducible synthetic fixtures. My complementary scope is provenance and matched synthetic diagnosis, not a parallel scalar-flow fix. I have read the current 706c006 head and your reports: 508 firstlane_branch mismatches separate into routing and 406 shared post-join scalar differences; the lane-loop consumers give 14/160 wrong words, including native Wave32 and the lane that never enters. The unsuccessful retention-only probe is not a fix or proof of a sole cause. I will preserve both in-branch and post-join outputs, exact guest words and each backend's identity when comparing the archived paired control. Please flag any existing owner work or regression revisions so our report can feed that work without duplicating it. No title run or runtime clearance is inferred. AI-assisted with OpenAI Codex; synthetic inputs only.
TaynanGT commented 2026-11-27 13:37:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T13:37:28Z.


@carlosmegino Please link the exact archived paired control once it’s fetchable. Preserve the in-branch and post-join outputs and identify the native-Wave32 consumer separately. On my side, #208 is reserved for the matched water comparison, so the synthetic scalar-flow diagnosis can stay with the upstream owners.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219728774 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7219728774). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T13:37:28Z. --- @carlosmegino Please link the exact archived paired control once it’s fetchable. Preserve the in-branch and post-join outputs and identify the native-Wave32 consumer separately. On my side, #208 is reserved for the matched water comparison, so the synthetic scalar-flow diagnosis can stay with the upstream owners.
ColorMeBoom commented 2026-11-27 13:59:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-27T13:59:07Z.


@Lyrnc's 151 fw64 cases on a second AMD architecture: RX 5700 XT (RDNA1, gfx1010, 32–64 lanes), driver 32.0.21045.29003, Windows 11 26200, Rust 1.98.1. Your gist's fw64_data.rs and oracle_fw64.json are unchanged. The harness is fw64_local_tests.rs adapted to upstream (ir::build + emit_with(.., Options), no other change), with dxil.dll validation and a native D3D12 dispatch, compared on all 16 outputs × 64 lanes. Three translations: main 63bcca4, and this PR at 706c006 (merged onto main) with host_wave32: false and true.

case kind n main, native Wave64 #2633 host_wave32: false #2633 host_wave32: true (halves)
red_branch 40 8 / 32 / 0 8 / 32 / 0 8 / 32 / 0
firstlane_branch 10 1 / 9 / 0 1 / 9 / 0 1 / 9 / 0
readlane_branch 20 4 / 16 / 0 4 / 16 / 0 4 / 16 / 0
lds_minmax 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
alloc_branch 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
writelane_branch 18 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0
red_nested 6 0 / 6 / 0 0 / 6 / 0 0 / 6 / 0
red_loop 3 0 / 3 / 0 0 / 3 / 0 0 / 3 / 0
red_earlyout 6 1 / 5 / 0 1 / 5 / 0 1 / 5 / 0
lds_region 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
vote_loop_branch 6 2 / 4 / 0 2 / 4 / 0 2 / 4 / 0
vote_loop 5 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0
break_loop 7 1 / 6 / 0 1 / 6 / 0 1 / 6 / 0
all 151 59 / 92 / 0 59 / 92 / 0 59 / 92 / 0

(exact / differ / refused against the gfx1036 oracle)

  • Native Wave64 on RDNA1 gives exactly your gfx1036 "main, native wave64" column for these 13 kinds, kind by kind. main and host_wave32: false give byte-identical outputs in 151 of 151 cases. So a second AMD architecture finds the same 92 differences, which supports them being the translation's per-lane form and not one GPU's behaviour.
  • Halves at 706c006 translate everything: 136 programs carry PSV0 lanes 32..32, so this card runs them at 32 lanes, and the other 15 have no wave size. The 16 programs your c5ab088 table had refused (red_loop 3, vote_loop_branch 6, break_loop 7) now emit, validate and run.
  • firstlane_branch in halves: 508 of 10,240 words wrong, the same count @pickles976 got on the RTX 4060 at this head; 457 of them are in v11. Native Wave64 here is also 508.
  • Halves and native differ in 16 cases, all with the same exact/differ counts per kind:
    • readlane_branch ×10: halves is closer to the oracle (e.g. 0/hi32: 32 wrong words against 96 native, */lane40: 63 against 65).
    • break_loop ×6: halves is worse, with a new error in v11. v11 is the sum over rounds of whole_wave("add_nc_u32") over the lanes still in the loop. Native gets every lane right. In halves, each round's sum is the first round's, i.e. the lanes that already left (by v_cmpx + s_andn2_b64 of the loop mask) are still counted. break_loop/all, lane 1 (two rounds): oracle 0x2ef8, halves 0x31c0 (= 2 × 0x18e0, the first round's sum); lane 31: 0x73e0 against 0xc700. v11 is wrong in 56 lanes of break_loop/all (168 wrong words in total, against 112 native), and in 32, 32, 32, 1 and 5 lanes of lo32/hi32/alt/lane40/sparse; native has v11 right in all of them. v12/v13 differ the same way in both forms.
  • Totals: halves 4,791 wrong words, native 5,025, of 154,624.

The 15 f32 sums and the 65 128-thread programs aren't in the gist's fw64_data.rs, so they aren't covered here. Outputs are register-major (64 * register + lane), as in your comparer.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220187436 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7220187436). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-27T13:59:07Z. --- **@Lyrnc's 151 fw64 cases on a second AMD architecture: RX 5700 XT** (RDNA1, gfx1010, 32–64 lanes), driver 32.0.21045.29003, Windows 11 26200, Rust 1.98.1. [Your gist](https://gist.github.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131)'s `fw64_data.rs` and `oracle_fw64.json` are unchanged. The harness is `fw64_local_tests.rs` adapted to upstream (`ir::build` + `emit_with(.., Options)`, no other change), with `dxil.dll` validation and a native D3D12 dispatch, compared on all 16 outputs × 64 lanes. Three translations: `main` `63bcca4`, and this PR at `706c006` (merged onto `main`) with `host_wave32: false` and `true`. | case kind | n | `main`, native Wave64 | #2633 `host_wave32: false` | #2633 `host_wave32: true` (halves) | | --- | --- | --- | --- | --- | | `red_branch` | 40 | 8 / 32 / 0 | 8 / 32 / 0 | 8 / 32 / 0 | | `firstlane_branch` | 10 | 1 / 9 / 0 | 1 / 9 / 0 | 1 / 9 / 0 | | `readlane_branch` | 20 | 4 / 16 / 0 | 4 / 16 / 0 | 4 / 16 / 0 | | `lds_minmax` | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `alloc_branch` | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `writelane_branch` | 18 | 10 / 8 / 0 | 10 / 8 / 0 | 10 / 8 / 0 | | `red_nested` | 6 | 0 / 6 / 0 | 0 / 6 / 0 | 0 / 6 / 0 | | `red_loop` | 3 | 0 / 3 / 0 | 0 / 3 / 0 | 0 / 3 / 0 | | `red_earlyout` | 6 | 1 / 5 / 0 | 1 / 5 / 0 | 1 / 5 / 0 | | `lds_region` | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `vote_loop_branch` | 6 | 2 / 4 / 0 | 2 / 4 / 0 | 2 / 4 / 0 | | `vote_loop` | 5 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | | `break_loop` | 7 | 1 / 6 / 0 | 1 / 6 / 0 | 1 / 6 / 0 | | **all** | 151 | **59 / 92 / 0** | 59 / 92 / 0 | 59 / 92 / 0 | (exact / differ / refused against the gfx1036 oracle) - **Native Wave64 on RDNA1 gives exactly your gfx1036 "main, native wave64" column** for these 13 kinds, kind by kind. `main` and `host_wave32: false` give byte-identical outputs in 151 of 151 cases. So a second AMD architecture finds the same 92 differences, which supports them being the translation's per-lane form and not one GPU's behaviour. - **Halves at `706c006` translate everything:** 136 programs carry PSV0 lanes 32..32, so this card runs them at 32 lanes, and the other 15 have no wave size. The 16 programs your `c5ab088` table had refused (`red_loop` 3, `vote_loop_branch` 6, `break_loop` 7) now emit, validate and run. - **`firstlane_branch` in halves: 508 of 10,240 words wrong**, the same count @pickles976 got on the RTX 4060 at this head; 457 of them are in `v11`. Native Wave64 here is also 508. - **Halves and native differ in 16 cases**, all with the same exact/differ counts per kind: - `readlane_branch` ×10: halves is closer to the oracle (e.g. `0/hi32`: 32 wrong words against 96 native, `*/lane40`: 63 against 65). - **`break_loop` ×6: halves is worse, with a new error in `v11`.** `v11` is the sum over rounds of `whole_wave("add_nc_u32")` over the lanes still in the loop. Native gets every lane right. In halves, each round's sum is the first round's, i.e. the lanes that already left (by `v_cmpx` + `s_andn2_b64` of the loop mask) are still counted. `break_loop/all`, lane 1 (two rounds): oracle `0x2ef8`, halves `0x31c0` (= 2 × `0x18e0`, the first round's sum); lane 31: `0x73e0` against `0xc700`. `v11` is wrong in 56 lanes of `break_loop/all` (168 wrong words in total, against 112 native), and in 32, 32, 32, 1 and 5 lanes of `lo32`/`hi32`/`alt`/`lane40`/`sparse`; native has `v11` right in all of them. `v12`/`v13` differ the same way in both forms. - Totals: halves 4,791 wrong words, native 5,025, of 154,624. The 15 f32 sums and the 65 128-thread programs aren't in the gist's `fw64_data.rs`, so they aren't covered here. Outputs are register-major (`64 * register + lane`), as in your comparer. AI use: Claude Code (Claude Opus 5.5).
TaynanGT commented 2026-11-27 14:11:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T14:11:15Z.


@ColorMeBoom Your RX 5700 XT run reproduces the same 92 oracle differences in both native paths. The stale v11 loop sum is specific to halves and gives us a separate check for the next revision. The branch-only SCC vote in #3500 can be compared independently of the loop-mask change.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220459590 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7220459590). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T14:11:15Z. --- @ColorMeBoom Your RX 5700 XT run reproduces the same 92 oracle differences in both native paths. The stale `v11` loop sum is specific to halves and gives us a separate check for the next revision. The branch-only SCC vote in #3500 can be compared independently of the loop-mask change.
carlosmegino commented 2026-11-27 14:29:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T14:29:21Z.


@chippy01 @TaynanGT @pickles976 — the requested exact archived paired control is now public: a9ef792f6d516ee6200f4fedeb061a25153d48fd, base 842b0cb76f8f5fa9289bd779783c51ec24d75302, branch carlosmegino/VIctory:codex/repro-paired-a9ef792. Anonymous fetch from a new bare repository verified both this exact object and its base. The pinned test-only companion keeps all original compiler/host files intact and documents Linux/Wine commands, raw inputs, attribution and differences from 140958f/b3060be. No later backend is substituted.

I ran only the scoped synthetic diagnostics on Windows/RTX 5070 Ti (621.01, lanes 32/32, Rust 1.98.1):

Unchanged #439 consumer Exact a9ef792 result
Wave32, lane20, ordinary latch 12/32 wrong: lane0=0 rather than 20; lanes21..31 keep t rather than t+20
Wave64, lane40, ordinary latch 0/64 wrong; paired physical32/Wave32
Wave64, joined EXEC latch Emission refused at 0x28: untracked lane-mask join; no PSO/readback

Thus the historical paired control is neither a universal passing consumer control nor equivalent to your head. I am not converting the refused program into a passing result. #439's attributed program/expected values are preserved.

For all ten of Lyrnc's exact firstlane_branch cases, mandatory DXIL validation, PSO creation and complete 1024-word readback succeeded, but the independent native-gfx1036 comparison gives 508/10,240 wrong, split as 51 v10 + 457 v11, with none-mask passing. This matches the existing NVIDIA and ColorMeBoom RDNA1 counts. Selection diagnostics show the first-lane sites have st.guards[b][i] == None and no waterfall flag; the exact a9ef guarded-first-lane preference does not fire, and PSV0 retains 64 physical threads with no required wave size. This identifies a selection boundary; it does not prove a predicate change fixes scalar reconvergence.

Native Wave32 cannot enter this port's Wave64-only paired path and still exposes its ordinary-flow scalar/inactive-source problem. The one passing paired Wave64 loop does not clear the post-join firstlane or joined-latch gates. Your previously disclosed retention-only probe remains unsuccessful; changing wide_keep alone is not established as a fix. Scalar phi/edge selection and wave-level scalar state need to be distinguished from per-lane VGPR/EXEC retention and independent waves that have finished.

I have read Chippy01's newer claim and TaynanGT's request. This remains matched evidence/reproducibility under our existing NEW-354 claim, not a parallel implementation. Current #2633 source checked here is still 706c006ca9a9ee525b64114831e1dd418b198ba4; I did not modify it, test a newer owner revision or launch the title.

The companion contract also reproduces #3180's waited 64/128 seven-UAV passes on the exact backend, with intact canaries and no native D3D12/GBV warnings/errors. Those passes and the red consumer/oracle results are deliberately reported separately. Lyrnc's LOCAL files are fetched at pinned hashes, not republished; r4tedx/ifBars and PiloteCode retain their attributions.

AI-assisted with OpenAI Codex. Synthetic inputs only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220846397 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7220846397). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T14:29:21Z. --- @chippy01 @TaynanGT @pickles976 — the requested exact archived paired control is now public: [a9ef792f6d516ee6200f4fedeb061a25153d48fd](https://github.com/carlosmegino/VIctory/commit/a9ef792f6d516ee6200f4fedeb061a25153d48fd), base `842b0cb76f8f5fa9289bd779783c51ec24d75302`, branch `carlosmegino/VIctory:codex/repro-paired-a9ef792`. Anonymous fetch from a new bare repository verified both this exact object and its base. [The pinned test-only companion](https://github.com/carlosmegino/VIctory/blob/2b5c107606a2d9632973e21b4a26022333730cef/docs/paired-a9ef-reproduction.md) keeps all original compiler/host files intact and documents Linux/Wine commands, raw inputs, attribution and differences from 140958f/b3060be. No later backend is substituted. I ran only the scoped synthetic diagnostics on Windows/RTX 5070 Ti (621.01, lanes 32/32, Rust 1.98.1): | Unchanged #439 consumer | Exact a9ef792 result | | --- | --- | | Wave32, lane20, ordinary latch | 12/32 wrong: lane0=0 rather than 20; lanes21..31 keep t rather than t+20 | | Wave64, lane40, ordinary latch | 0/64 wrong; paired physical32/Wave32 | | Wave64, joined EXEC latch | Emission refused at 0x28: untracked lane-mask join; no PSO/readback | Thus the historical paired control is neither a universal passing consumer control nor equivalent to your head. I am not converting the refused program into a passing result. #439's attributed program/expected values are preserved. For all ten of Lyrnc's exact firstlane_branch cases, mandatory DXIL validation, PSO creation and complete 1024-word readback succeeded, but the independent native-gfx1036 comparison gives **508/10,240 wrong**, split as **51 v10 + 457 v11**, with none-mask passing. This matches the existing NVIDIA and ColorMeBoom RDNA1 counts. Selection diagnostics show the first-lane sites have `st.guards[b][i] == None` and no waterfall flag; the exact a9ef guarded-first-lane preference does not fire, and PSV0 retains 64 physical threads with no required wave size. This identifies a selection boundary; it does not prove a predicate change fixes scalar reconvergence. Native Wave32 cannot enter this port's Wave64-only paired path and still exposes its ordinary-flow scalar/inactive-source problem. The one passing paired Wave64 loop does not clear the post-join firstlane or joined-latch gates. Your previously disclosed retention-only probe remains unsuccessful; changing wide_keep alone is not established as a fix. Scalar phi/edge selection and wave-level scalar state need to be distinguished from per-lane VGPR/EXEC retention and independent waves that have finished. I have read [Chippy01's newer claim](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7220136661) and [TaynanGT's request](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7219728774). This remains matched evidence/reproducibility under our existing NEW-354 claim, not a parallel implementation. Current #2633 source checked here is still `706c006ca9a9ee525b64114831e1dd418b198ba4`; I did not modify it, test a newer owner revision or launch the title. The companion contract also reproduces #3180's waited 64/128 seven-UAV passes on the exact backend, with intact canaries and no native D3D12/GBV warnings/errors. Those passes and the red consumer/oracle results are deliberately reported separately. Lyrnc's LOCAL files are fetched at pinned hashes, not republished; r4tedx/ifBars and PiloteCode retain their attributions. AI-assisted with OpenAI Codex. Synthetic inputs only.
TaynanGT commented 2026-11-27 14:38:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T14:38:58Z.


@carlosmegino Thanks for pinning the exact a9ef792 control. The clean paired Wave64 latch, the refused joined-EXEC case and the 508 first-lane differences answer different questions. I’ll use the passing case as a control for that loop shape and keep the post-join first-lane result in the report.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7221049544 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7221049544). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T14:38:58Z. --- @carlosmegino Thanks for pinning the exact `a9ef792` control. The clean paired Wave64 latch, the refused joined-EXEC case and the 508 first-lane differences answer different questions. I’ll use the passing case as a control for that loop shape and keep the post-join first-lane result in the report.
carlosmegino commented 2026-11-27 14:39:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T14:39:49Z.


@TaynanGT @chippy01 @pickles976 — follow-up to the exact-control/phase request. Access is independently reverified, and the two capture points are now preserved as separate per-lane data.

Exact control, not a replacement revision

I fetched the original branch directly into a new empty bare object store, with system/global Git configuration disabled, no credential helper and no alternate object directories, before fetching any kit. Head and base matched exactly. That is an independent Git environment on this Windows host, not a claim of a second-machine GPU test. Separately, your exact-head Linux/Wine report already confirms access/build and fixture export; missing Graphics Tools/InfoQueue prevented original GPU execution, so that is not counted as a correctness failure or successful readback.

A clean independent fetch check is:

export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null GIT_TERMINAL_PROMPT=0
unset GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES
git init --bare exact-check.git
git -c credential.helper= -C exact-check.git fetch --depth=4 https://github.com/carlosmegino/VIctory.git refs/heads/codex/repro-paired-a9ef792
test "$(git -C exact-check.git rev-parse FETCH_HEAD)" = a9ef792f6d516ee6200f4fedeb061a25153d48fd
test "$(git -C exact-check.git rev-parse FETCH_HEAD~3)" = 842b0cb76f8f5fa9289bd779783c51ec24d75302
git -C exact-check.git show 6ecbbe833f2c5666d320ad4ec35a896b7c82f17a -- crates/victory-shader/src/emit/mod.rs

Outputs are separated by guest capture point. These reuse the previously completed Windows/RTX 5070 Ti/621.01 readbacks on exact a9ef792; no GPU tests were repeated for this data supplement. Lyrnc's native gfx1036 reference retains its attribution and pinned hash.

Snapshot Wrong / compared
v10, scalar captured inside the conditional branch 51/640
v11, scalar captured after EXEC restoration/reconvergence 457/640
All remaining registers 0/8,960
Complete comparison 508/10,240

Both captured VGPRs are ultimately stored at shader end; v10 is an inside-branch snapshot, not a separate mid-dispatch readback. Inactive v10 lanes retain their initializer, whereas post-join v11 must be checked in every lane, including never-entered lanes. For lo32, lane32's v10=0 agrees, but v11=0x5555 instead of 5. For all, lane32's v10 and v11 are 101 instead of 5. The linked JSON preserves every actual/expected value and mismatch lane independently for both phases, with the raw TSV/executable/source hashes. The guarded paired preference is bypassed on these first-lane sites, as the earlier trace showed; this is not evidence for a one-line scalar fix.

Native Wave32 is explicitly its own consumer: unchanged program(32,20,false), expected 20..51, gives 12/32 wrong (lane0=0, lanes21..31=t rather than t+20). It never enters Wave64 paired lowering. The ordinary Wave64/lane40 consumer is 0/64 wrong with paired physical 32 / Wave32. The joined EXEC consumer refuses emission at 0x28; no PSO/readback is claimed. None of that is a 0/160 archive verdict.

For Linux/Wine, use Rust 1.98.1, LLVM clang/lld, cargo-xwin, a working D3D12 SM6.6 prefix and your Windows x64 DXIL validator. The pinned kit guide includes the setup; the execution commands are:

git clone --single-branch --branch codex/repro-paired-a9ef792-kit https://github.com/carlosmegino/VIctory.git victory-a9ef-repro
cd victory-a9ef-repro
git switch --detach 2b5c107606a2d9632973e21b4a26022333730cef
git fetch origin 1625d1c686adc74e986d578b47aa6364b672b8d6
bash tools/verify-paired-repro.sh
export CARGO_TARGET_DIR="$PWD/target/paired-repro"
cargo xwin test --target x86_64-pc-windows-msvc --release --locked -p victory-shader --lib --no-run
set -- target/paired-repro/x86_64-pc-windows-msvc/release/deps/victory_shader-*.exe
test "$#" -eq 1
EXE="$1"
DXIL=/absolute/path/to/windows-x64/dxil.dll
export VICTORY_DXIL="$(winepath -w "$DXIL")"
OUT="$PWD/../a9ef-phase-repro"
bash tools/run-paired-repro.sh "$EXE" "$OUT/contract" --wine --suite contract
bash tools/paired-repro-oracle.sh fetch "$OUT/consumers"
bash tools/run-paired-repro.sh "$EXE" "$OUT/consumers" --wine --suite consumers

The Windows evidence predicts a green 64/128 contract suite and a red consumer suite: lane-loop test exit 101, ten completed first-lane dispatches, oracle comparator exit 1 and overall consumer exit 1. These are expected observations to independently check under Wine, not promised cross-driver bit patterns. Wine mode explicitly omits Windows debug/GBV interfaces while keeping mandatory DXIL validation, complete readback and canaries; it does not certify the original GPU-runtime test.

I have also read the edited scalar-consumer report: the shared divergent-scalar-join class now has an owned fix, mohammadallami75-ops's r4tedx/VIctory#14, head d21eb165c333de3f10d95558616b84d398df2d73, base c7346008de48f6c71e22cdff0d5f7b644fe798fb. Pickles976's external A/B reports 508→0 first-lane mismatches and 0/160 consumers on both that base/head. This belongs to that #439 lineage, not a9ef792, and is separate from #2633 706c006's 14/160 consumer gate. I am feeding this evidence to the existing owners, not reimplementing or transplanting their fix.

The matched water comparison in #208 remains reserved to @TaynanGT. No water/title shader, capture, branch, benchmark or experiment was touched. b3060be and 741aa8e remain separately identified later revisions; none of their results is included in this archive ledger.

AI-assisted with OpenAI Codex. Synthetic data only. PROGRESS.md and HANDOFF.md are updated; no duplicate claim or done entry.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7221067130 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7221067130). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T14:39:49Z. --- @TaynanGT @chippy01 @pickles976 — follow-up to [the exact-control/phase request](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7219728774). Access is independently reverified, and the two capture points are now preserved as separate per-lane data. **Exact control, not a replacement revision** - Repository: https://github.com/carlosmegino/VIctory - Archive branch: `codex/repro-paired-a9ef792`, exact [a9ef792f6d516ee6200f4fedeb061a25153d48fd](https://github.com/carlosmegino/VIctory/commit/a9ef792f6d516ee6200f4fedeb061a25153d48fd). - Base: [842b0cb76f8f5fa9289bd779783c51ec24d75302](https://github.com/carlosmegino/VIctory/commit/842b0cb76f8f5fa9289bd779783c51ec24d75302). - Masked-first-lane port/correction: [6ecbbe833f2c5666d320ad4ec35a896b7c82f17a](https://github.com/carlosmegino/VIctory/commit/6ecbbe833f2c5666d320ad4ec35a896b7c82f17a), including de64bd5/805a455 provenance and PiloteCode's #854 attribution. - Unchanged compiler/host-preserving [companion kit 2b5c107](https://github.com/carlosmegino/VIctory/blob/2b5c107606a2d9632973e21b4a26022333730cef/docs/paired-a9ef-reproduction.md). - New **documentation/data only** [phase guide](https://github.com/carlosmegino/VIctory/blob/baf7e02a1af3d534f2749976b8931739a9b501b8/docs/paired-a9ef-phase-ledger.md) and [all actual/expected v10/v11 lane values](https://github.com/carlosmegino/VIctory/blob/baf7e02a1af3d534f2749976b8931739a9b501b8/docs/paired-a9ef-phase-outputs.json). This does not change the original archive or kit. I fetched the original branch directly into a new empty bare object store, with system/global Git configuration disabled, no credential helper and no alternate object directories, before fetching any kit. Head and base matched exactly. That is an independent Git environment on this Windows host, not a claim of a second-machine GPU test. Separately, [your exact-head Linux/Wine report](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7220146530) already confirms access/build and fixture export; missing Graphics Tools/InfoQueue prevented original GPU execution, so that is not counted as a correctness failure or successful readback. A clean independent fetch check is: ```sh export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null GIT_TERMINAL_PROMPT=0 unset GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES git init --bare exact-check.git git -c credential.helper= -C exact-check.git fetch --depth=4 https://github.com/carlosmegino/VIctory.git refs/heads/codex/repro-paired-a9ef792 test "$(git -C exact-check.git rev-parse FETCH_HEAD)" = a9ef792f6d516ee6200f4fedeb061a25153d48fd test "$(git -C exact-check.git rev-parse FETCH_HEAD~3)" = 842b0cb76f8f5fa9289bd779783c51ec24d75302 git -C exact-check.git show 6ecbbe833f2c5666d320ad4ec35a896b7c82f17a -- crates/victory-shader/src/emit/mod.rs ``` **Outputs are separated by guest capture point.** These reuse the previously completed Windows/RTX 5070 Ti/621.01 readbacks on exact a9ef792; no GPU tests were repeated for this data supplement. Lyrnc's native gfx1036 reference retains its attribution and pinned hash. | Snapshot | Wrong / compared | | --- | ---: | | v10, scalar captured inside the conditional branch | 51/640 | | v11, scalar captured after EXEC restoration/reconvergence | 457/640 | | All remaining registers | 0/8,960 | | Complete comparison | 508/10,240 | Both captured VGPRs are ultimately stored at shader end; v10 is an inside-branch snapshot, not a separate mid-dispatch readback. Inactive v10 lanes retain their initializer, whereas post-join v11 must be checked in every lane, including never-entered lanes. For `lo32`, lane32's v10=0 agrees, but v11=0x5555 instead of 5. For `all`, lane32's v10 and v11 are 101 instead of 5. The linked JSON preserves every actual/expected value and mismatch lane independently for both phases, with the raw TSV/executable/source hashes. The guarded paired preference is bypassed on these first-lane sites, as the earlier trace showed; this is not evidence for a one-line scalar fix. **Native Wave32 is explicitly its own consumer:** unchanged `program(32,20,false)`, expected 20..51, gives 12/32 wrong (lane0=0, lanes21..31=t rather than t+20). It never enters Wave64 paired lowering. The ordinary Wave64/lane40 consumer is 0/64 wrong with paired physical 32 / Wave32. The joined EXEC consumer refuses emission at 0x28; no PSO/readback is claimed. None of that is a 0/160 archive verdict. For Linux/Wine, use Rust 1.98.1, LLVM clang/lld, cargo-xwin, a working D3D12 SM6.6 prefix and your Windows x64 DXIL validator. The [pinned kit guide](https://github.com/carlosmegino/VIctory/blob/2b5c107606a2d9632973e21b4a26022333730cef/docs/paired-a9ef-reproduction.md) includes the setup; the execution commands are: ```sh git clone --single-branch --branch codex/repro-paired-a9ef792-kit https://github.com/carlosmegino/VIctory.git victory-a9ef-repro cd victory-a9ef-repro git switch --detach 2b5c107606a2d9632973e21b4a26022333730cef git fetch origin 1625d1c686adc74e986d578b47aa6364b672b8d6 bash tools/verify-paired-repro.sh export CARGO_TARGET_DIR="$PWD/target/paired-repro" cargo xwin test --target x86_64-pc-windows-msvc --release --locked -p victory-shader --lib --no-run set -- target/paired-repro/x86_64-pc-windows-msvc/release/deps/victory_shader-*.exe test "$#" -eq 1 EXE="$1" DXIL=/absolute/path/to/windows-x64/dxil.dll export VICTORY_DXIL="$(winepath -w "$DXIL")" OUT="$PWD/../a9ef-phase-repro" bash tools/run-paired-repro.sh "$EXE" "$OUT/contract" --wine --suite contract bash tools/paired-repro-oracle.sh fetch "$OUT/consumers" bash tools/run-paired-repro.sh "$EXE" "$OUT/consumers" --wine --suite consumers ``` The Windows evidence predicts a green 64/128 contract suite and a **red consumer suite**: lane-loop test exit 101, ten completed first-lane dispatches, oracle comparator exit 1 and overall consumer exit 1. These are expected observations to independently check under Wine, not promised cross-driver bit patterns. Wine mode explicitly omits Windows debug/GBV interfaces while keeping mandatory DXIL validation, complete readback and canaries; it does not certify the original GPU-runtime test. I have also read the edited [scalar-consumer report](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217164469): the shared divergent-scalar-join class now has an owned fix, [mohammadallami75-ops's r4tedx/VIctory#14](https://github.com/r4tedx/VIctory/pull/14), head `d21eb165c333de3f10d95558616b84d398df2d73`, base `c7346008de48f6c71e22cdff0d5f7b644fe798fb`. [Pickles976's external A/B](https://github.com/r4tedx/VIctory/pull/14#issuecomment-7219801493) reports 508→0 first-lane mismatches and 0/160 consumers on both that base/head. This belongs to that #439 lineage, not a9ef792, and is separate from #2633 `706c006`'s 14/160 consumer gate. I am feeding this evidence to the existing owners, not reimplementing or transplanting their fix. **The matched water comparison in #208 remains reserved to @TaynanGT.** No water/title shader, capture, branch, benchmark or experiment was touched. b3060be and 741aa8e remain separately identified later revisions; none of their results is included in this archive ledger. AI-assisted with OpenAI Codex. Synthetic data only. PROGRESS.md and HANDOFF.md are updated; no duplicate claim or done entry.
TaynanGT commented 2026-11-27 14:49:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T14:49:15Z.


@carlosmegino The two snapshots make the result much clearer: 51 differences inside the branch and 457 after reconvergence. I’ll use those counts for the archived comparison. The native Wave32 failure, the passing ordinary paired Wave64 latch and the joined-EXEC refusal can each be checked against their own expected result.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7221269768 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7221269768). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T14:49:15Z. --- @carlosmegino The two snapshots make the result much clearer: 51 differences inside the branch and 457 after reconvergence. I’ll use those counts for the archived comparison. The native Wave32 failure, the passing ordinary paired Wave64 latch and the joined-EXEC refusal can each be checked against their own expected result.
ColorMeBoom commented 2026-11-27 15:02:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-27T15:02:16Z.


Same 151 fw64 cases at b32cef7 (RX 5700 XT, same harness as my report above, merged onto main 63bcca4):

  • Halves (host_wave32: true): byte-for-byte the same outputs as at 706c006, in 151 of 151 cases. So it's still 59 exact / 92 differ against the gfx1036 oracle, and still 508 of 10,240 wrong words in firstlane_branch. The break_loop v11 sum is still stale too: lane 1 of break_loop/all reads 0x31c0, not 0x2ef8. The two new commits change neither.
  • host_wave32: false: still identical to main in 151 of 151.
  • The PR's own tests filtered on halves: 36 passed, 0 failed, none skipped. That includes random_wave64_programs_in_halves_match_one_wave64 (64 of 64 compared against one wave64 on this card, none refused in halves) and the *_on_every_gpu halves readbacks (0 lanes differ).

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7221543900 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7221543900). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-27T15:02:16Z. --- **Same 151 fw64 cases at `b32cef7`** (RX 5700 XT, same harness as [my report above](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7220187436), merged onto `main` `63bcca4`): - **Halves (`host_wave32: true`): byte-for-byte the same outputs as at `706c006`, in 151 of 151 cases.** So it's still 59 exact / 92 differ against the gfx1036 oracle, and still 508 of 10,240 wrong words in `firstlane_branch`. The `break_loop` `v11` sum is still stale too: lane 1 of `break_loop/all` reads `0x31c0`, not `0x2ef8`. The two new commits change neither. - `host_wave32: false`: still identical to `main` in 151 of 151. - The PR's own tests filtered on `halves`: **36 passed, 0 failed**, none skipped. That includes `random_wave64_programs_in_halves_match_one_wave64` (64 of 64 compared against one wave64 on this card, none refused in halves) and the `*_on_every_gpu` halves readbacks (0 lanes differ). AI use: Claude Code (Claude Opus 5.5).
TaynanGT commented 2026-11-27 15:08:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T15:08:57Z.


@ColorMeBoom The byte-for-byte comparison on the RX 5700 XT pins the result to b32cef7. The 36 in-tree tests pass and the archived fixture still shows 508 first-lane differences and the stale loop sum. I’ll keep those two fixture results as acceptance checks for the scalar and mask changes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7221686974 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7221686974). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T15:08:57Z. --- @ColorMeBoom The byte-for-byte comparison on the RX 5700 XT pins the result to `b32cef7`. The 36 in-tree tests pass and the archived fixture still shows 508 first-lane differences and the stale loop sum. I’ll keep those two fixture results as acceptance checks for the scalar and mask changes.
ColorMeBoom commented 2026-11-27 17:25:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-27T17:25:24Z.


A fix for the stale break_loop v11 sum in halves (reported above): one commit on top of b32cef7, ColorMeBoom:pr2633-wide-sum (fce45f8, fast-forward).

git fetch https://github.com/ColorMeBoom/VIctory pr2633-wide-sum
git merge --ff-only FETCH_HEAD

Cause. In a region run wave-wide, every thread runs the loop's block. Each vector write is guarded by the block's lanes (wide_guard), and ballots wide_and their mask's bit with them. But the reductions whole-wave sections leave (Lower::shape: Active, Prefix, Masked, Half) took their lanes from the section's mask alone. In break_loop/all that bit folds to true (select i1 true, %value, 0 before waveActiveOp, while the v11 accumulate right after it is select %50, ...), so every lane that entered the loop counted in every round. A loop that lanes leave by EXEC (v_cmpx + s_andn2_b64 of the loop mask + s_cbranch_scc0) therefore summed the first round's lanes each round. The fix wide_ands that bit with the current block's lanes in those four places. Outside wave-wide regions wide_and returns its input unchanged, so nothing else moves. The wide.rs module doc now lists "what whole-wave sections reduce" among the wave operations that see only the block's lanes.

fw64, RX 5700 XT (same harness as above, 151 cases, against the gfx1036 oracle):

break_loop/… v11 lanes wrong, b32cef7 with the fix per-lane form
all 56 0 0
lo32 / hi32 / alt 32 / 32 / 32 0 / 0 / 0 0
lane40 / sparse 1 / 5 0 / 0 0

Those six now give byte for byte what the per-lane form gives. The other 145 cases are unchanged, so it's still 59 exact / 92 differ overall, and firstlane_branch is still 508 words, which is a separate issue. Halves total: 4,791 → 4,633 wrong words. host_wave32: false is identical to before in 151 of 151.

Regression test in halves_tests.rs: a_whole_wave_sum_in_a_loop_lanes_leave_matches_the_console_on_every_gpu, plus its entry in the_test_programs_are_what_their_comments_say. It's a loop where lane l goes round (l & 3) + 1 times, adding each round's whole-wave count of the lanes still in it, in the sum_kept_by_lanes idiom.

  • With the fix, RX 5700 XT: 0 lanes of 64 and of 128 differ, in halves and as one wave64.
  • Without it (negative control): 48 of 64 and 96 of 128 lanes differ in halves, e.g. lane 3 stores 256 (4 × 64) where the console stores 160 (64 + 48 + 32 + 16). wave64 is right either way.

Checks at fce45f8: full victory-shader --lib --features host 333 passed, 0 failed. halves filter with VICTORY_WARP=1: 37 passed. cargo clippy -p victory-shader --all-targets --features host -- -D warnings and the asset policy are clean, and the new lines are rustfmt-clean.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224387906 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7224387906). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-27T17:25:24Z. --- **A fix for the stale `break_loop` `v11` sum in halves** ([reported above](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7220187436)): one commit on top of `b32cef7`, [`ColorMeBoom:pr2633-wide-sum`](https://github.com/ColorMeBoom/VIctory/tree/pr2633-wide-sum) (`fce45f8`, fast-forward). ``` git fetch https://github.com/ColorMeBoom/VIctory pr2633-wide-sum git merge --ff-only FETCH_HEAD ``` **Cause.** In a region run wave-wide, every thread runs the loop's block. Each vector write is guarded by the block's lanes (`wide_guard`), and ballots `wide_and` their mask's bit with them. But the reductions whole-wave sections leave (`Lower::shape`: `Active`, `Prefix`, `Masked`, `Half`) took their lanes from the section's mask alone. In `break_loop/all` that bit folds to `true` (`select i1 true, %value, 0` before `waveActiveOp`, while the `v11` accumulate right after it is `select %50, ...`), so every lane that entered the loop counted in every round. A loop that lanes leave by EXEC (`v_cmpx` + `s_andn2_b64` of the loop mask + `s_cbranch_scc0`) therefore summed the first round's lanes each round. The fix `wide_and`s that bit with the current block's lanes in those four places. Outside wave-wide regions `wide_and` returns its input unchanged, so nothing else moves. The `wide.rs` module doc now lists "what whole-wave sections reduce" among the wave operations that see only the block's lanes. **fw64, RX 5700 XT** (same harness as above, 151 cases, against the gfx1036 oracle): | `break_loop/…` | `v11` lanes wrong, `b32cef7` | with the fix | per-lane form | | --- | --- | --- | --- | | `all` | 56 | **0** | 0 | | `lo32` / `hi32` / `alt` | 32 / 32 / 32 | **0 / 0 / 0** | 0 | | `lane40` / `sparse` | 1 / 5 | **0 / 0** | 0 | Those six now give byte for byte what the per-lane form gives. The other 145 cases are unchanged, so it's still 59 exact / 92 differ overall, and `firstlane_branch` is still 508 words, which is a separate issue. Halves total: 4,791 → 4,633 wrong words. `host_wave32: false` is identical to before in 151 of 151. **Regression test** in `halves_tests.rs`: `a_whole_wave_sum_in_a_loop_lanes_leave_matches_the_console_on_every_gpu`, plus its entry in `the_test_programs_are_what_their_comments_say`. It's a loop where lane `l` goes round `(l & 3) + 1` times, adding each round's whole-wave count of the lanes still in it, in the `sum_kept_by_lanes` idiom. - With the fix, RX 5700 XT: 0 lanes of 64 and of 128 differ, in halves and as one wave64. - Without it (negative control): **48 of 64** and **96 of 128** lanes differ in halves, e.g. lane 3 stores 256 (4 × 64) where the console stores 160 (64 + 48 + 32 + 16). wave64 is right either way. **Checks at `fce45f8`:** full `victory-shader --lib --features host` 333 passed, 0 failed. `halves` filter with `VICTORY_WARP=1`: 37 passed. `cargo clippy -p victory-shader --all-targets --features host -- -D warnings` and the asset policy are clean, and the new lines are rustfmt-clean. AI use: Claude Code (Claude Opus 5.5).
TaynanGT commented 2026-11-27 17:29:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T17:29:26Z.


@ColorMeBoom The six break_loop cases now agree with the per-lane result, and the 151 native wave64 results are unchanged. The negative control checks the block-mask correction at both 64 and 128 lanes. That lets this reduction fix stand on its own while the firstlane_branch discrepancy is tracked.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224463961 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7224463961). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T17:29:26Z. --- @ColorMeBoom The six `break_loop` cases now agree with the per-lane result, and the 151 native wave64 results are unchanged. The negative control checks the block-mask correction at both 64 and 128 lanes. That lets this reduction fix stand on its own while the `firstlane_branch` discrepancy is tracked.
pickles976 commented 2026-11-27 17:45:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T17:45:02Z.


Verified ColorMeBoom's pr2633-wide-sum commit fce45f8ca36ae1821b36c97cf35ae86006797227 (parent b32cef72554981f89fad00fecc8358699518da8a) on the physical RTX 4060 Laptop GPU under Linux 6.17 / Wine 11 / NVIDIA 590.48.1.

cargo test -p victory-shader --features host --lib a_whole_wave_sum_ -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored, 2.33 s after fresh intended-worktree compilation (6.92 s). Production unchanged; local test-only strengthening requires the actual RTX 4060, SDK DXIL validation and complete readback dimensions instead of permitting an absent-adapter pass.

  • New varying-lane loop: correct results for all 64 and all 128 lanes, including both the sum and iteration count (384 expected result words).
  • Existing retained-lane whole-wave sum: correct results for all 128 lanes.
  • Three actual NVIDIA halves dispatch/readbacks in total. The two native-wave64 controls are expected pipeline refusals on this 32-lane device; they are not native64 or WARP coverage.

Environment: dxgi.hideNvidiaGpu = False; diagnostic relaxed-vtable vkd3d 2576c0b4adfae4a+, not stock certification. Guarded 9 GiB memory / 512 MiB swap; sampled GPU peak147 MiB, available RAM minimum11187.8 MiB, disk minimum11.932 GiB. Evidence retained locally: .compat-runtime/logs/verify-pr2633-wide-sum-20261127T173746Z/.

No matched parent run, full suite, native-RDNA oracle rerun, original BVH dispatch or title trial here. This verifies the reduction correction on another physical architecture; it does not clear the separate firstlane/scalar-merge discrepancy reported as unchanged in the author's 151-case comparison. Renderer promotion remains blocked on those consumer semantics, not merely native PSO creation.

AI-assisted local verification: OpenAI Codex GPT-6-Astra. No game assets or imagery attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224745999 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7224745999). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T17:45:02Z. --- Verified ColorMeBoom's `pr2633-wide-sum` commit `fce45f8ca36ae1821b36c97cf35ae86006797227` (parent `b32cef72554981f89fad00fecc8358699518da8a`) on the physical RTX 4060 Laptop GPU under Linux 6.17 / Wine 11 / NVIDIA 590.48.1. `cargo test -p victory-shader --features host --lib a_whole_wave_sum_ -- --nocapture --test-threads=1`: **2 passed, 0 failed, 0 ignored**, 2.33 s after fresh intended-worktree compilation (6.92 s). Production unchanged; local test-only strengthening requires the actual RTX 4060, SDK DXIL validation and complete readback dimensions instead of permitting an absent-adapter pass. - New varying-lane loop: correct results for all 64 and all 128 lanes, including both the sum and iteration count (384 expected result words). - Existing retained-lane whole-wave sum: correct results for all 128 lanes. - Three actual NVIDIA halves dispatch/readbacks in total. The two native-wave64 controls are expected pipeline refusals on this 32-lane device; they are not native64 or WARP coverage. Environment: `dxgi.hideNvidiaGpu = False`; diagnostic relaxed-vtable vkd3d `2576c0b4adfae4a+`, **not stock certification**. Guarded 9 GiB memory / 512 MiB swap; sampled GPU peak147 MiB, available RAM minimum11187.8 MiB, disk minimum11.932 GiB. Evidence retained locally: `.compat-runtime/logs/verify-pr2633-wide-sum-20261127T173746Z/`. No matched parent run, full suite, native-RDNA oracle rerun, original BVH dispatch or title trial here. This verifies the reduction correction on another physical architecture; it does **not** clear the separate firstlane/scalar-merge discrepancy reported as unchanged in the author's 151-case comparison. Renderer promotion remains blocked on those consumer semantics, not merely native PSO creation. AI-assisted local verification: OpenAI Codex GPT-6-Astra. No game assets or imagery attached.
TaynanGT commented 2026-11-27 17:47:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T17:47:45Z.


@pickles976 The executed readbacks cover both the 64- and 128-lane reduction cases on the RTX 4060 Laptop. That adds NVIDIA halves coverage to the RX 5700 XT result for fce45f8. The native wave64 control and the remaining firstlane_branch differences still have their own test results.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224794841 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7224794841). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T17:47:45Z. --- @pickles976 The executed readbacks cover both the 64- and 128-lane reduction cases on the RTX 4060 Laptop. That adds NVIDIA halves coverage to the RX 5700 XT result for `fce45f8`. The native wave64 control and the remaining `firstlane_branch` differences still have their own test results.
chippy01 commented 2026-11-27 19:28:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-27T19:28:20Z.


@Lyrnc @pickles976 @ColorMeBoom @TaynanGT @carlosmegino thanks for the cases and the matched runs. Two new commits on this PR answer them (claimed in #1633, comment of 18:47 UTC):

  • Shaders: in halves, whole-wave sections in wave-wide blocks take the block's lanes and run step by step. This fixes ColorMeBoom's halves-only break_loop v11. In a wave-wide loop every thread runs the block, including lanes that already left the loop, and the reduction counted those lanes. Now it counts the block's lanes only.
  • Shaders: in halves, scalars leave lane branches and loops as the console wave left them.
    • In a wave-wide region, a scalar phi takes the value from the last block (in code order) that some lane of the wave ran. The two halves trade a ballot to find out which blocks their wave ran. In a wave-wide loop, a scalar is kept in every lane from the last round the wave ran the block. That covers both what pickles976 pointed at in wide_keep and the per-lane pick at the join, which pickles976 found that keeping the value alone doesn't fix.
    • If a join reads a scalar whose value depends on the path a lane took, and that region doesn't run wave-wide, the next attempt runs it wave-wide. If that attempt fails, the earlier lowering is kept, so no program is lost.
    • A program whose only cross-lane read is a first lane of a value lane_uniform can't prove alike now runs in halves. This is the routing pickles976 probed, with the same fallback.

Lyrnc's 151 fw64 cases. I used the gist's fw64_data.rs and oracle unchanged, with the harness adapted to this branch (local only, not committed). Results are exact / differ / refused against the gfx1036, identical on an RTX 3070 Ti and the Radeon iGPU of a Ryzen 9 7900X:

case kind n b32cef7 + sections in wave-wide blocks + scalars, first lanes main's form, native wave64 (Radeon)
reduction in a branch 40 8 / 32 / 0 8 / 32 / 0 40 / 0 / 0 8 / 32 / 0
v_readfirstlane in a branch 10 1 / 9 / 0 1 / 9 / 0 10 / 0 / 0 1 / 9 / 0
v_readlane in a branch 20 4 / 16 / 0 4 / 16 / 0 20 / 0 / 0 4 / 16 / 0
LDS min/max one wave shares 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
allocation idiom in a branch 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
v_writelane in a branch 18 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0 10 / 8 / 0
reduction in two nested branches 6 0 / 6 / 0 0 / 6 / 0 6 / 0 / 0 0 / 6 / 0
reduction in a loop lanes leave 3 0 / 3 / 0 0 / 3 / 0 3 / 0 / 0 0 / 3 / 0
reduction after an early-out 6 1 / 5 / 0 1 / 5 / 0 6 / 0 / 0 1 / 5 / 0
LDS written and read in a branch 10 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0 10 / 0 / 0
vote loop and reduction in a branch 6 2 / 4 / 0 2 / 4 / 0 2 / 4 / 0 2 / 4 / 0
vote loop alone 5 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0 2 / 3 / 0
break loop (s_cbranch_scc0) 7 1 / 6 / 0 1 / 6 / 0 2 / 5 / 0 1 / 6 / 0
all 151 59 / 92 / 0 (4,791 wrong words) 59 / 92 / 0 (4,633 wrong words) 131 / 20 / 0 (867 wrong words) 59 / 92 / 0 (5,025 wrong words)

The 20 cases that still differ also differ in main's native wave64, in the same words, and halves is never wrong where native wave64 is right:

  • writelane_branch ×8: v_writelane_b32 to a lane outside EXEC. The write lands in the wave-wide block, but at the join the lane takes its own edge's VGPR. This is Lyrnc's item 2, and #320 handles it in the console flow.
  • vote_loop ×3 and vote_loop_branch ×4: s_cbranch_vccz is decided per lane in structure (item 4).
  • break_loop ×5, v12: on the console the exit block runs with the last round's lanes only, but the per-lane form runs it in every lane that left.

pickles976's lane-loop consumers, in our own encoding: lane t runs t rounds (lane 0 never enters), each round reads lane 40's thread id into a scalar and counts the rounds, and every lane stores both after the loop. There are two forms, an ordinary latch and the read in a branch whose EXEC is joined again before the backedge. In groups of 48, 64 and 128 every lane is now exact, lane 0 included. At b32cef7 lane 0 got 0 and each lane got its own round count. The native-wave32 consumer isn't in halves (a wave32 program already matches the console's wave on any host). Its scalars are main's per-lane form, which is #269's subject.

New regression tests (both fail at b32cef7):

  • a_first_lane_read_in_a_branch_is_the_console_waves_after_the_join_in_halves_on_every_gpu: Lyrnc's masks (one half, the other, both, alternate, one lane in either half, lanes 31 and 32, none). It stores the value both inside the branch and after the join, in groups of 64 and 128.
  • scalars_a_loop_leaves_are_the_console_waves_in_every_lane_in_halves_on_every_gpu: the consumers above.

Title, offline translate --list --wave32 --pipelines on the same four inputs: 2,723 of 2,723 compute pipelines made (2,721 at b32cef7; the 2 more come from the first commit), none lost. With the second commit, 87 programs run in halves for their first-lane reads (2 fall back to the old lowering), and 16 run a region wave-wide for a scalar a join reads.

Not in these commits: the f32 sum order from Lyrnc's second report. Halves sum each 32-lane half with the host's WaveActiveSum, so on NVIDIA an f32 sum can be 1 ulp off the console's DPP order. A section run step by step follows the console's order, so using that for f32 sums is the follow-up.

@carlosmegino: the owner revisions are these two commits.

AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226560206 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7226560206). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-27T19:28:20Z. --- @Lyrnc @pickles976 @ColorMeBoom @TaynanGT @carlosmegino thanks for the cases and the matched runs. Two new commits on this PR answer them (claimed in #1633, comment of 18:47 UTC): - **Shaders: in halves, whole-wave sections in wave-wide blocks take the block's lanes and run step by step.** This fixes ColorMeBoom's halves-only `break_loop` `v11`. In a wave-wide loop every thread runs the block, including lanes that already left the loop, and the reduction counted those lanes. Now it counts the block's lanes only. - **Shaders: in halves, scalars leave lane branches and loops as the console wave left them.** - In a wave-wide region, a scalar phi takes the value from the last block (in code order) that some lane of the wave ran. The two halves trade a ballot to find out which blocks their wave ran. In a wave-wide loop, a scalar is kept in every lane from the last round the wave ran the block. That covers both what pickles976 pointed at in `wide_keep` and the per-lane pick at the join, which pickles976 found that keeping the value alone doesn't fix. - If a join reads a scalar whose value depends on the path a lane took, and that region doesn't run wave-wide, the next attempt runs it wave-wide. If that attempt fails, the earlier lowering is kept, so no program is lost. - A program whose only cross-lane read is a first lane of a value `lane_uniform` can't prove alike now runs in halves. This is the routing pickles976 probed, with the same fallback. **Lyrnc's 151 fw64 cases.** I used the gist's `fw64_data.rs` and oracle unchanged, with the harness adapted to this branch (local only, not committed). Results are exact / differ / refused against the gfx1036, identical on an RTX 3070 Ti and the Radeon iGPU of a Ryzen 9 7900X: | case kind | n | `b32cef7` | + sections in wave-wide blocks | + scalars, first lanes | `main`'s form, native wave64 (Radeon) | |---|---|---|---|---|---| | reduction in a branch | 40 | 8 / 32 / 0 | 8 / 32 / 0 | **40 / 0 / 0** | 8 / 32 / 0 | | `v_readfirstlane` in a branch | 10 | 1 / 9 / 0 | 1 / 9 / 0 | **10 / 0 / 0** | 1 / 9 / 0 | | `v_readlane` in a branch | 20 | 4 / 16 / 0 | 4 / 16 / 0 | **20 / 0 / 0** | 4 / 16 / 0 | | LDS min/max one wave shares | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | allocation idiom in a branch | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | `v_writelane` in a branch | 18 | 10 / 8 / 0 | 10 / 8 / 0 | 10 / 8 / 0 | 10 / 8 / 0 | | reduction in two nested branches | 6 | 0 / 6 / 0 | 0 / 6 / 0 | **6 / 0 / 0** | 0 / 6 / 0 | | reduction in a loop lanes leave | 3 | 0 / 3 / 0 | 0 / 3 / 0 | **3 / 0 / 0** | 0 / 3 / 0 | | reduction after an early-out | 6 | 1 / 5 / 0 | 1 / 5 / 0 | **6 / 0 / 0** | 1 / 5 / 0 | | LDS written and read in a branch | 10 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | 10 / 0 / 0 | | vote loop and reduction in a branch | 6 | 2 / 4 / 0 | 2 / 4 / 0 | 2 / 4 / 0 | 2 / 4 / 0 | | vote loop alone | 5 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | 2 / 3 / 0 | | break loop (`s_cbranch_scc0`) | 7 | 1 / 6 / 0 | 1 / 6 / 0 | **2 / 5 / 0** | 1 / 6 / 0 | | **all** | 151 | 59 / 92 / 0 (4,791 wrong words) | 59 / 92 / 0 (4,633 wrong words) | **131 / 20 / 0 (867 wrong words)** | 59 / 92 / 0 (5,025 wrong words) | The 20 cases that still differ also differ in main's native wave64, in the same words, and halves is never wrong where native wave64 is right: - `writelane_branch` ×8: `v_writelane_b32` to a lane outside EXEC. The write lands in the wave-wide block, but at the join the lane takes its own edge's VGPR. This is Lyrnc's item 2, and #320 handles it in the console flow. - `vote_loop` ×3 and `vote_loop_branch` ×4: `s_cbranch_vccz` is decided per lane in `structure` (item 4). - `break_loop` ×5, `v12`: on the console the exit block runs with the last round's lanes only, but the per-lane form runs it in every lane that left. **pickles976's lane-loop consumers**, in our own encoding: lane t runs t rounds (lane 0 never enters), each round reads lane 40's thread id into a scalar and counts the rounds, and every lane stores both after the loop. There are two forms, an ordinary latch and the read in a branch whose EXEC is joined again before the backedge. In groups of 48, 64 and 128 every lane is now exact, lane 0 included. At `b32cef7` lane 0 got 0 and each lane got its own round count. The native-wave32 consumer isn't in halves (a wave32 program already matches the console's wave on any host). Its scalars are main's per-lane form, which is #269's subject. **New regression tests** (both fail at `b32cef7`): - `a_first_lane_read_in_a_branch_is_the_console_waves_after_the_join_in_halves_on_every_gpu`: Lyrnc's masks (one half, the other, both, alternate, one lane in either half, lanes 31 and 32, none). It stores the value both inside the branch and after the join, in groups of 64 and 128. - `scalars_a_loop_leaves_are_the_console_waves_in_every_lane_in_halves_on_every_gpu`: the consumers above. **Title**, offline `translate --list --wave32 --pipelines` on the same four inputs: 2,723 of 2,723 compute pipelines made (2,721 at `b32cef7`; the 2 more come from the first commit), none lost. With the second commit, 87 programs run in halves for their first-lane reads (2 fall back to the old lowering), and 16 run a region wave-wide for a scalar a join reads. **Not in these commits:** the f32 sum order from Lyrnc's second report. Halves sum each 32-lane half with the host's `WaveActiveSum`, so on NVIDIA an f32 sum can be 1 ulp off the console's DPP order. A section run step by step follows the console's order, so using that for f32 sums is the follow-up. @carlosmegino: the owner revisions are these two commits. AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.
TaynanGT commented 2026-11-27 19:35:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T19:35:21Z.


@chippy01 I’ll use b32cef7 as the control and 1b1ef21 for the new Vice-Tay comparison. The 59 → 131 exact matches and 2,723/2,723 compute pipelines give us two offline checks before the matched water route. I’ll keep the 20 remaining mismatches and the f32 sum order separate in the results.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226676107 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7226676107). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T19:35:21Z. --- @chippy01 I’ll use `b32cef7` as the control and `1b1ef21` for the new Vice-Tay comparison. The 59 → 131 exact matches and 2,723/2,723 compute pipelines give us two offline checks before the matched water route. I’ll keep the 20 remaining mismatches and the f32 sum order separate in the results.
carlosmegino commented 2026-11-27 19:41:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T19:41:14Z.


Thanks for confirming 27029af and 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 as the official revisions, and for crediting the routing investigation.

Our independent RTX 5070 Ti (native Windows, exclusively Wave32) check will use b32cef7 as the control and 1b1ef216 as the candidate. We will reuse the archived, unchanged Lyrnc firstlane_branch inputs and gfx1036 reference, separating the old 508 differences into v10 (inside the branch) and v11 (after reconvergence), plus the original #439 consumers and your new regressions. Translation, DXIL validation, PSO creation, completed execution and semantic readback will be reported separately. We will inspect retained-lowering fallbacks rather than counting pipeline admission as a semantic fix. Native Wave32 consumers, the remaining 20 cases and f32 summation order remain separate.

In parallel, our experimental 42daca9 analyzes and promotes a proven wave-private no-return LDS counter. Applied explicitly to Dathinel's intact original 96-thread synthetic fixture on the stable paired reference, it passed all 672 values and 56 guards; an indirect-address/different-EXEC variant passed another 672/56. Dynamic logical guest LDS accesses go from 658 to 388 (272 guest atomic additions replaced by two publication stores). This is not a measured GPU-traffic, timing or occupancy improvement, and the pass is not enabled in normal translation. We are checking compatibility/complementarity with the new halves/wave-wide implementation and preparing an attributed branch for independent technical review.

We will not duplicate TaynanGT's announced water-path comparison, #269/#320, or your announced semantic fixes. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226771646 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7226771646). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T19:41:14Z. --- Thanks for confirming `27029af` and `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` as the official revisions, and for crediting the routing investigation. Our independent RTX 5070 Ti (native Windows, exclusively Wave32) check will use `b32cef7` as the control and `1b1ef216` as the candidate. We will reuse the archived, unchanged Lyrnc `firstlane_branch` inputs and gfx1036 reference, separating the old 508 differences into v10 (inside the branch) and v11 (after reconvergence), plus the original #439 consumers and your new regressions. Translation, DXIL validation, PSO creation, completed execution and semantic readback will be reported separately. We will inspect retained-lowering fallbacks rather than counting pipeline admission as a semantic fix. Native Wave32 consumers, the remaining 20 cases and f32 summation order remain separate. In parallel, our experimental `42daca9` analyzes and promotes a proven wave-private no-return LDS counter. Applied explicitly to Dathinel's intact original 96-thread synthetic fixture on the stable paired reference, it passed all 672 values and 56 guards; an indirect-address/different-EXEC variant passed another 672/56. Dynamic logical guest LDS accesses go from 658 to 388 (272 guest atomic additions replaced by two publication stores). This is **not** a measured GPU-traffic, timing or occupancy improvement, and the pass is not enabled in normal translation. We are checking compatibility/complementarity with the new halves/wave-wide implementation and preparing an attributed branch for independent technical review. We will not duplicate TaynanGT's announced water-path comparison, #269/#320, or your announced semantic fixes. AI-assisted with OpenAI Codex.
pickles976 commented 2026-11-27 19:43:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T19:43:56Z.


Verification of production head 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 on the physical RTX 4060 Laptop (32-lane host), Linux 6.17 / Wine 11 / NVIDIA 590.48.1. Diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+, not stock certification; NVIDIA masking disabled. Production unchanged; retained local test-only modules are byte-identical to the independent fixtures used in the earlier 706c006 report. SDK DXIL validation and the NVIDIA adapter are mandatory.

Independent consumer Earlier local 706c006 evidence Revised 1b1ef21, executed now
Published gfx1036 firstlane_branch oracle, 10 cases / 10,240 words 508 wrong words, 9 differing cases 0 wrong words, all 10 exact
Wave64/readlane40 ordinary loop, 64 words 1 wrong (lane 0) 0 wrong
Wave64/readlane40 joined-backedge loop, 64 words 1 wrong (lane 0) 0 wrong
Native-Wave32/readlane20 loop, 32 words 12 wrong 12 wrong, unchanged pattern

This confirms the newly fixed halves/scalar consumers using our unchanged instruction streams, not only the new owner encodings. It is not a fresh immediate-parent A/B: the earlier results remain the archived 706c006 runs. Current combined invocation is 1 test passed / 1 failed because the loop fixture deliberately retains its native-Wave32 control. That control still returns 0 for lane 0 and misses +20 for lanes 21–31; both Wave64 legs pass. This agrees with your explicit native-Wave32/#269 scope caveat, not a new regression from the two latest commits. Our older #439 + disclosed Wine single-latch control had all 160 words correct, so the native-Wave32 path remains a local runtime-integration concern.

Also rebuilt this exact production head and ran the original local XboxBvhBuilder.dll through translate --pipelines --validate --list --jobs 1: 52/52 translated, 52/52 required-SDK validations, 52/52 native NVIDIA PSOs created, with identical container-offset sets for validation and creation. This includes the original programs at offsets 0x25c40 and 0x28770. No original BVH program was dispatched, so this is admission/compilation, not tree integrity or title safety.

Evidence under .compat-runtime/logs/:

  • verify-pr2633-revised-independent-oracles-20261127T193720Z/: fresh intended-tree build 6.95 s, tests 1.72 s; all complete raw consumer outputs retained.
  • verify-pr2633-revised-builder-20261127T193907Z/: fresh release 46.89 s, guarded command 50.57 s.

Peak sampled GPU <=222 MiB, available RAM >=10,900 MiB, disk >=12.058 GiB. Original 9 GiB/512 MiB scope and global guards unchanged. No title launch, forced approximation, partial builder, native-Wave64/WARP claim, full 151-case oracle run, or gameplay claim. Suggested next owner gate remains the native-Wave32 scalar/lane consumer plus the separately acknowledged remaining corpus classes; the two reported Wave64 loop errors and the 508-word firstlane mismatch are now cleared here.

AI-assisted verification; no source PR or assets published.

Native-Wave32 cause isolated; local correction passes (27Nov 20:13 UTC)

On production 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 plus a disclosed local two-function correction, the previously failing native-Wave32/readlane20 loop now returns every expected word. This is not an exact-head pass or a code PR.

Causal path: Lower::read_lane emits dx.op.waveReadLaneAt.i32; valu treats its SGPR destination as unguarded by EXEC; fill_phis recognizes the escaping SGPR as wave-scalar. But wide::scalar_join previously returned for all non-halves/one-host-wave programs. Native Wave32 kept historical per-lane scalar values across its divergent host loop instead of the console wave's one SGPR. Lane 0 never entered and kept zero; lanes 1–20 left while source lane 20 remained active; lanes 21–31 subsequently read an inactive source and produced zero. That explains the exact 12-lane failure pattern.

Local correction, retaining the existing selective non-uniform/differing-scalar checks:

// lower/wide.rs, scalar_join
let native_wave32 = self.console_lanes && !self.x.native.wave64;
if (!self.halves && !native_wave32)
    || (self.halves && self.one_host_wave())
    || self.wide.from.contains_key(&b)
    || self.uniform_join(b)
    || values.iter().all(|&(x, _)| x == values[0].0)
{
    return;
}
// Existing plan.ask_scalar(q, b) loop remains unchanged.

// lower/halves.rs, group_any, before the existing halves paths:
if !self.halves {
    return Ok(self.s.m.cmp(at, pred::NE, word, zero));
}

The native vote uses its own ballot word rather than halves exchange/LDS barriers. No fallback-admission change, forced Wave32 override, or safety-guard removal.

Physical RTX 4060 Laptop / Wine 11 / NVIDIA 590.48.1, mandatory SDK validator and NVIDIA 32-lane assertions, diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+ (not stock certification):

  • Existing native32 ordinary loop: 0/32 wrong, versus the already-recorded exact-head 12/32 failure.
  • Added native32 joined-latch form, same unchanged instruction generator: 0/32 wrong.
  • Existing logical Wave64 ordinary/joined loops: 0/64 each; these run on the 32-lane GPU, not native-Wave64 hardware.
  • Published native gfx1036 firstlane oracle: 0/10,240 wrong across all 10 cases.
  • Existing scalars_a_loop_leaves_are_the_console_waves_in_every_lane_in_halves_on_every_gpu: 1/1 pass.

Commands: cargo test -p victory-shader --features host --lib emit::lab_ -- --nocapture --test-threads=1, then the named scalar-loop filter above. First passing invocation 2/2 tests, 1.54 s, fresh intended-worktree compilation 6.74 s; scalar-loop fixture 3.35 s on the same binary. Logs .compat-runtime/logs/verify-pr2633-native32-scalar-readbacks-20261127T201307Z/ and verify-pr2633-native32-scalar-loop-regression-20261127T201402Z/. A preceding local test-only compile attempt referred to a nonexistent HostShader.barriers field; it was removed before execution, not a shader failure. All consumer output assertions remain intact.

This clears the reproduced native32 loop consumer, not all native32 shaders, original BVH execution, AMD/native64, or title rendering. The independent full-LDS fallback report in comment7227088196 remains a separate promotion blocker; this patch deliberately does not alter it. The original 52/52 BVH validation/PSO result above predates this local patch and is not relabeled as a new run. Suggested owner action: adopt/review this narrow native scalar-join route with both loop forms, and fix unsafe retained-lowering fallback separately before runtime promotion. AI-assisted investigation/local patch/verification: OpenAI GPT-6 Astra.

27 Nov: bounded writelane join correction, complete selected family verified

On the same 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 production plus the native32 correction above, a separate local correction now preserves an explicit lane write even when its target lane skips the branch. A guard-only correction failed the published writelane_branch/0/hi32 oracle (lane0 v10 0x1234 instead of 0x777); the later SSA join was discarding that write.

The candidate routes only loop-free logical-Wave64/host-Wave32 writelane regions. It carries fixed-lane write provenance through nested phis and guarded ordinary VGPR writes, and folds affected join inputs in the region's CFG dependency order so a later ordinary write wins. It leaves the unaffected join fast path unchanged. Relevant local symbols: route_lane_writes, wide_lane_write_guard, wide_lane_write, wide_keep_lane_write, wide_phi, wide_pick. This is a reviewable bounded approach, not a proposed blanket final overlay or general loop fix. The value-keyed provenance currently receives fresh instruction/select values; a future select constant-folding change must not intern these as shared constant keys. Multi-entry joins beyond the supplied cases remain a coverage limit.

Required physical RTX4060 Laptop, 32-lane host and SDK validator, same Wine11/NVIDIA590.48.1/diagnostic-relaxed vkd3d conditions:

  • 18/18 public writelane_branch cases exact: 18,432 output words. Destinations0/33/63 × all/lo32/hi32/alternating/lane40/none masks.
  • Two added consumers also exact (2,048 words): later lower-half ordinary overwrite and a lane40 nested branch writing lane0 across two joins.
  • Existing scalar controls still pass2/2: firstlane10,240 words and native32/logical64 ordinary/joined loop consumers. No scalar-oracle output assertions weakened.

Public assembled inputs: https://gist.githubusercontent.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131/raw/f4383c6d310fd40ed8c36c93d547f0f1f36a16be/fw64_data.rs . Independent gfx1036 expected outputs: https://gist.githubusercontent.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131/raw/ce2f401463491742b10bb36d339c5d1e5103efbf/oracle_fw64.json , SHA256 eee0f705651c6083e3fbd8a0e3645ff55b66ed9222a68556b12a497477588715. Local selected data retains every input word and all nonzero native outputs; the remaining twelve words per lane were checked zero before compact extraction and are still asserted zero on GPU readback.

cargo test -p victory-shader --lib lab_writelane_public_family_and_ordered_joins -- --nocapture --test-threads=1:1/1,20 GPU cases,1.19s, fresh6.88s intended-tree compilation. Evidence verify-pr2633-writelane-family-20261127T213942Z/; scalar controls verify-pr2633-writelane-scalar-controls-20261127T213353Z/ (2/2,1.55s). No title run or gameplay claim. The other known break/vote-loop oracle families and unsafe retained-lowering fallback are not cleared by this selected-family result; no new full151-case verdict is claimed. Suggested owner action: retain all masks plus overwrite/nested consumers when reviewing the join correction, and resolve those separate promotion gates before title use.

21:51 UTC — VCC-loop causality narrowed; SCC/EXEC loop is still separate

Same 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 plus the disclosed local native32/writelane corrections. structure::branch models s_cbranch_vccz/nz as a per-lane VCC/EXEC predicate; wide_exit was using it to choose each lane's loop edge. These instructions instead branch on a whole-wave zero/nonzero value.

A local causal probe, not a complete shipping fix, routes the enclosing VCC loop wave-wide, votes across the logical wave before choosing its edge, and forbids unroute for that forced route. All 11 public vote_loop/vote_loop_branch cases now match all 11,264 native-gfx1036 oracle words on this physical RTX4060/Wine host. This includes low/high halves, alternate lanes, lane40 and the empty mask. Mandatory SDK validation and NVIDIA/32-lane assertions; no skips.

Final combined controls: 4/4 fixtures, 2.91s after fresh intended-tree 6.72s compilation. The 11 vote cases, all 18 writelane cases plus two ordered/nested controls, all 10 firstlane cases, and native32/logical64 ordinary/joined readlane loops pass. Evidence: .compat-runtime/logs/verify-pr2633-vote-loop-controls-20261127T215127Z/. Initial VCC-only proof: verify-pr2633-vote-loop-probe-20261127T214906Z/. This is selected-family coverage, not a new 151-case total.

Do not extend that vote mechanically to SCC. A separate temporary extension to s_cbranch_scc0/1 still fails 5/7 break_loop cases, 443/7168 output words; lane40 and empty-mask controls match. In the all-lanes case, lane0 accumulates v10=0x24 rather than 1 and incorrectly writes v12=8 rather than preserving 0xdead0000. Evidence: verify-pr2633-break-loop-probe-20261127T215038Z/. That SCC extension was removed before the passing controls. This points to the distinction between scalar control flow and the changing EXEC mask governing VGPR writes; making the branch uniform alone does not preserve it.

Owner action: keep whole-wave VCC loop votes, but separately preserve actual EXEC-masked writes/loop phi state for SCC live-mask loops. Also test saved VCC bits outside current EXEC: the local probe still consumes the existing structured predicate and does not certify that broader numeric-mask case. The independently reported full-LDS unroute fallback remains unsafe and is not fixed by this probe. No title launch or runtime-promotion claim.

Break-loop cause narrowed: mask preservation fixes the oracle, but is not a promotable patch (27 Nov, 22:08 UTC)

Same 1b1ef216 production base plus the disclosed local native32/writelane/VCC probes, same Wine 11 / RTX 4060 Laptop / NVIDIA 590.48.1 / diagnostic-relaxed vkd3d stack. Mandatory DXIL validator and physical NVIDIA readbacks; no title run.

The CPU-only IR/structure census for public break_loop/all shows loop EXEC phi values 86/87 reduced to Bool::TRUE and every vector-write guard absent. The body temporarily expands EXEC with s_or_saveexec, restores it, then uses s_andn2/SCC to retire lanes. A reach-relative mask truth is not an unconditional all-lanes truth once the region is emitted wave-wide.

A causal-only variant that (a) forces mask phis to remain unresolved, (b) retains raw EXEC guards rather than reach-relative simplification, and (c) uses a whole-wave SCC branch vote returns all 7 public break-loop cases / 7,168 words exactly (previous scalar-vote-only probe: 443 wrong words). Fresh build 6.74 s, GPU fixture 0.96 s. Evidence: verify-pr2633-break-loop-mask-phi-probe-20261127T215818Z/.

Do not apply that global workaround: firstlane, vote-loop and writelane controls remain exact, but the previously passing native32 joined-latch consumer now refuses translation before dispatch. The initial refusal is a missing recursively referenced EXEC phi (Value(22) -> Value(38) at 0x28). Making unresolved-phi discovery visit backedges moves the refusal to numeric mask materialization at 0x48; it does not solve it. A separate SCC-as-Uniform structural probe also refuses mask-as-data before dispatch. These are local-probe admission regressions, not new upstream GPU-output failures. Logs: verify-pr2633-mask-phi-controls-20261127T215941Z/, verify-pr2633-joined-mask-structure-20261127T220256Z/, verify-pr2633-complete-mask-loop-controls-20261127T220442Z/, verify-pr2633-scalar-reach-loop-controls-20261127T220723Z/.

Actionable owner boundary: preserve the distinction between a mask valid under per-lane reach and its actual EXEC bits through wave-wide lowering; discover all mask-phi/backedge dependencies and keep numeric-mask/SCC consumers supported. Keep both the seven break-loop native-oracle cases and the ordinary/joined native32 + logical64 lane-loop consumers as admission gates. The global mask/SCC probes and throwaway diagnostics are restored; only the previously passing local fixes/VCC variant remain, with sources for each causal variant archived alongside logs. Full-LDS fallback safety and the full title-program corpus remain separate gates; no rendering certification.

27 Nov 23:24 UTC — combined local correction passes the complete public oracle

On exact production 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419 plus the disclosed local native-Wave32/writelane/VCC corrections, the break-loop compatibility blocker is now resolved locally. The native-Wave32 joined-latch fixture contains s_mov_b64 exec, 0; Lanes::sop recognized only _b32 operations for a Wave32 program, turning this low EXEC value into an opaque mask. Recognizing only the low-half meaning of s_mov_b64 (MOV has no SCC) removes that materialization failure. Do not extend this mechanically to b64 bitwise SCC: its high word can matter.

Combined with preserving unresolved mask phis/backedge discovery, raw EXEC guards and whole-wave SCC/VCC loop votes, the unchanged public 151-case inputs match the independent native-gfx1036 oracle: 151/151, 154,624/154,624 output words exact, including 30 cases with the original 512-byte LDS reservation. The 2 ordered/nested writelane additions match 2,048 words, and native32/logical64 ordinary+joined consumers match all 192 words. Physical RTX4060 Laptop, NVIDIA590.48.1, Wine11, mandatory SDK validator and vendor0x10de/32-lane checks; diagnostic-relaxed vkd3d2576c0b4+ (not stock). No WARP or retry. Fresh6.78/7.02s intended-tree compilation; full-oracle run6.06s. Logs verify-pr2633-exec-mov-loop-controls-20261127T232024Z/ and verify-pr2633-exec-all-oracles-20261127T232131Z/; source snapshots+SHA256 manifest retained locally.

I also removed the local unroute and kept fallback paths rather than silently accepting a lowering whose required joins/exchanges failed. With those removed, the full151+2 cases and all192 consumer words remain exact. A 128-thread synthetic firstlane with all32KiB LDS reserved now explicitly refuses at0x20 for missing exchange space, while the native64 compile control succeeds. The enclosing owner admission test subsequently fails an implementation-only zero-barrier assertion (2 emitted vs0), not any readback; log verify-pr2633-failclosed-oracles-20261127T232433Z/ is therefore 2passed/1failed overall, not all-pass.

These are local experiments, not a PR-head pass, complete compiler certification or title result. Actual 52-container builder admission and integration remain next gates; no shader assets published and no title launch on this variant. The global mask-preservation policy needs owner review/targeting before shipping.

Original builder admission after the complete correction — 27 Nov 23:28 UTC

The same dirty 1b1ef216 + local correction, with unsafe kept/unroute fallbacks removed, now translates 52/52 original XboxBvhBuilder containers, SDK-validates 52/52, and creates 52/52 native NVIDIA compute PSOs. Required validator is the logged DXC dxil.dll. Fresh intended-tree release compilation 47.17s; total guarded command 114.63s, GPU peak 338.0 MiB, available RAM minimum 8829.5 MiB. Evidence verify-pr2633-corrected-builder-20261127T232615Z/{console.log,target-summary.json}. Original title programs were not dispatched by this CLI.

The full-LDS admission fixture separately passes 1/1 after deleting its obsolete implementation-only zero-barrier assertion (not repinning it): a required exchange beyond the 32KiB budget explicitly refuses, while the native-Wave64 compile control succeeds. Evidence verify-pr2633-failclosed-admission-20261127T232536Z/. This closes that admission check, not hardware execution at full LDS or rendering. No new title run yet; integration remains subject to combined runtime gates.

28 Nov: paged runtime integration gates

The corrected backend is now ported into the existing dirty memory-tested runtime (base 3ed7d725, retaining Target-keyed caches, paged descriptors and prior memory/correctness fixes), not an exact PR-head result. Required NVIDIA/32-lane and SDK-validator gates pass: all151 public cases plus two ordered/nested cases are exact across156672 words; four native32/logical64 loop consumers are exact across192 words. Both paged-heap GPU fixtures and the explicit full-LDS refusal pass. verify-corrected-runtime-shader-gates-fixed-20261128T001655Z/:5/5, fresh7.40s build,5.84s fixtures.

The reference partial/multiwave group checks also passed4/4 with39 explicit NVIDIA readbacks at48/64/128threads (verify-pr2633-corrected-multiwave-20261127T232945Z/). On the integrated release, all52 original XboxBvhBuilder containers SDK-validate and create native PSOs (verify-corrected-runtime-builder-20261128T002116Z/, fresh50.91s build,120.27s total). Still no original-program dispatch proof from this CLI check. Runtime cache/builder/root-offset tests and the actual-bound texture-capture and native-FFX/depth fixtures pass. A30s no-input startup showed the account picker and time-stopped normally; no gameplay claim. Same Wine11/RTX4060Laptop/NVIDIA590.48.1 and diagnostic-relaxed-vkd3d caveat.

Two local harness errors were corrected, not hidden as shader passes: the first integration test compile used the reference Host.wave32 API instead of runtime Host.target; a capture-fixture invocation omitted its required output folder and failed before recording. Both corrected paths pass. No BVH guard or resource limit removed.

28 Nov runtime follow-through: this local integration is not cleared for gameplay

The corrected, paged/scoped-memory mixed runtime described above passed its short startup, then exposed a new completion/watchdog gate. This is not an exact PR-head result or a proven #2633 regression. Same physical RTX4060 Laptop, Wine11, diagnostic-relaxed vkd3d; all resource and BVH all-or-none guards retained. Fresh release SHA256 46af3d20f062006c9a9d63f90a320c41117d38f923e0b2b75b7f01bce2efa042.

  • At 00:30:07.522319Z, title frame2865 reports BVH builder53made/0refused/0dropped. This establishes admission, not correct original-builder execution.
  • First native FFX input/depth/output snapshots were recorded at 00:30:07.718–.869Z, but none completed/read back. The later actual-bound HDR probe was not reached. This is not another measured zero-HDR result.
  • About31s later the title faults on a null write at prepared-image +0x23cf683, with +0x2215c35/+0x2215eca below it. Prior exact disassembly identifies +0x2215c35 as the title watchdog fatal path. The saved crash context says Game Running/frame3668,735streaming requests, and an unsignaled cross-queue barrier. It does not isolate the stalled producer or prove shader causality.
  • The actual window remained black. Exit5 after246.78s; not a guard stop. Peak GPU memory3730MiB, minimum available RAM4188.3MiB, peak scope7191.8MiB, minimum user-available disk10.272GiB. Every sampled GPU query succeeded, exact kernel interval was empty, scope is inactive and an idle query recovered270MiB/0%GPU. No driver-reset or resource-OOM claim.

Evidence retained locally: 20261128T002637Z-{console.log,resources.csv,guard-events.jsonl}, bound-apply-scene-trial-20261128T002636Z/, matching dump, exact binary/PDB. No game imagery/dump/assets published. Trace still has1366requested keys but only453with built records;205 distinct translation refusals are192mesh/13compute. Thus even the admitted-builder trial is not a fully compiled-scene verdict.

No unchanged retry. I am inspecting the saved CPU waits/completion path and the multiwave synchronization boundary before choosing an offscreen regression. Useful owner isolation: associate queue submissions/signals/completed fence values with the first original-builder use, rather than treating52/52 PSO creation or the all-or-none admission log as execution proof.

Offline dump narrows the latest failure to native completion

The saved dump now provides an actual x64 PE-metadata unwind, not raw stack-word guesses. Executable/PDB GUID+age match the release above. Thread0x01e4 was inside Host::execute's WaitForSingleObject(event, INFINITE) (host.rs:1608), reached from queue::pump/Held::pump/queue::execute. Source order establishes that native ExecuteCommandLists was called and both queue.Signal and fence.SetEventOnCompletion returned success before this wait. Thread0x01d8 was secondarily blocked on global HELD from copy_page_mappings; no CPU lock cycle is established.

This identifies an outstanding native completion dependency, not its stalled GPU command or cause. The dump does not retain a submission/list/fence-value association with the recorded FFX/Apply work. A bounded static review found no concrete group-barrier/addressing defect; the existing48/64/128-thread checks still do not prove execution of the original256/512-thread builder programs. No further title run. Next diagnostic must identify submission/list and fence progress without releasing pending resources, forcing waits through, or changing queue ordering. Local evidence: crash-offline-{evidence.json,summary.txt} beside this trial.

28 Nov 01:34 UTC — native GPU progress bounded to a BVH dispatch interval

Still the disclosed dirty mixed runtime with the local semantic corrections above, not an exact PR-head or gameplay result. Linux/Wine11, RTX4060 Laptop8GiB, NVIDIA590.48.1, diagnostic-relaxed vkd3d 2576c0b4adfae4a+; all original resource/BVH guards retained.

The first passive run (20261128T010746Z) completed native submission7975 but not7976. ExecuteCommandLists/Signal/event arming returned; three native-fence samples remained7975 for2.16/4.16/6.16s. Its separately recorded native-FFX capture list was never submitted before the early stop. Thus recording the FFX call did not establish that FFX was executing at the stall. The CPU note cap was512, so that run alone did not identify the failing command.

Added a default-off local probe using the actually enabled VK_NV_device_diagnostic_checkpoints extension (VKD3D_CONFIG=breadcrumbs), not timestamp queries or WriteBufferImmediate barriers. Unique recording/note tokens, current native command buffer obtained at every marker, retained native queue/device owners. No inserted GPU waits, resource writes, queue splitting or changed dispatches. The real-NVIDIA copy fixture checks all64 words and distinguishes a completed list from a second list held behind a CPU fence, then verifies completion after release;1/1. Existing real native-FFX FP16/RGB9E5/depth fixture also1/1 with the probe enabled.

Changed title trial 20261128T012958Z, fresh intended-tree diagnostics release:

  • BVH gate: 53 made,0 refused,0 dropped.
  • Native submission11265 remains at completed11264. At2.177/4.178/6.179s, all three checkpoint queries are identical:
    • BOTTOM_OF_PIPE: recording24587,note2198,token1611335830.
    • TOP_OF_PIPE: recording24587,note2199,token1611335831.
  • Note2198 is immediately before Dispatch(1055,1,1), compute 5552dac6a2b7a1fd. Note2199 is before the following Dispatch(9,1,1) of the same program.
  • Original container identity independently verified: BLAKE3 prefix 5552dac6a2b7a1fd, XboxBvhBuilder.dll+0x53fd0,29024bytes, threadgroup [32,1,1]. Group size by itself does not establish the original console wave-size flag.
  • Markers are after each bind and before dispatch. This is a tight dispatch interval, including possible intervening diagnostic/next-bind work, not yet an isolated shader reproducer or proof that translation rather than input/lifetime is wrong.
  • Instrumentation caveat, source-verified: enabling VKD3D_CONFIG=breadcrumbs also changes this vkd3d build's native timeline wait from UINT64_MAX to 5seconds (libs/vkd3d/command.c:643-661). Its VK_TIMEOUT path calls d3d12_device_report_fault even with built-in breadcrumb recording compiled out (vkd3d_private.h:4500-4503). Therefore the third-sample0x887a0005 is the diagnostic timeout/reporting path, not independent evidence of a new kernel/driver reset or a new shader regression. The unchanged first two checkpoint/fence samples occur before that5s deadline. No timeout will be raised to push through this result.
  • The third sample changes GetDeviceRemovedReason from S_OK to 0x887a0005. Native log reports vkd3d_wait_for_gpu_timeline_semaphore ... vr 2 (VK_TIMEOUT). Supervisor stopped the workload before the title watchdog; no watchdog suppression or unchanged retry. No kernel journal entries in the actual interval; idle telemetry recovered133MiB/0%/38C.

Only loading imagery, no scene/gameplay. Sampled GPUpeak3580MiB, minimum availableRAM4499.8MiB, scopepeak9128.1MiB (near the9GiB scope cap), minimum availabledisk10.016GiB. This was not a RAM/GPU/disk-guard stop, but these samples do not exclude memory-pressure effects. Identified unheld temporary backing files cleaned after scope exit; trace losslessly compressed.

Local evidence: .compat-runtime/logs/native-submission-trial-20261128T012958Z/{summary.json,checkpoint-events.txt,pending-recording-notes.json} and timestamped console/resources. Images/assets/raw root-address data stay local. Earlier CPU-note heap:null labels must not be interpreted as null root bindings: that formatter sometimes interprets64-bit root addresses as heap indices.

Actionable next gate: inspect this exact builder program's loop/scalar/atomic termination invariants, then reproduce any mismatch with a bounded synthetic fixture. We are doing that offline rather than replaying the failed title, skipping the dispatch, disabling the all-or-none guard or raising timeouts. Compilation/admission53/53 is now clearly insufficient to certify execution.

28 Nov 01:47 UTC — another one-host-wave semantic boundary reproduced and corrected locally

The checkpoint program's original FSSM record now confirms native Wave32, not merely a32-thread group: shader 5552dac6a2b7a1fd, record flags3145760 with FLAG_WAVE32(bit5) set,12928 native-code bytes, group32×1×1. Original module/container hashes remain unchanged. This does not yet establish that either particular first-lane instruction takes the affected widened route.

A bounded synthetic consumer exposes two gaps on the same dirty #2633-based integration with the earlier proposed local corrections (not a pristine upstream-head comparison): enter lanes8–31, read the first active lane into anSGPR, then consume thatSGPR in every lane after reconvergence. v_mbcnt explicitly selects console-lane handling. Expected8 everywhere.

Console wave / group threads Before local correction After
32 /32 32/32 wrong, all0 0/32 wrong
64 /32 8/32 wrong, skipped lanes retained0 0/32 wrong
64 /64 control 0/64 wrong 0/64 wrong

Cause and narrow correction:

  • first_lane returned None unconditionally for !trades(). In a widened region physical lane0 executes even when excluded by emulated EXEC; waveReadLaneFirst therefore selects the wrong lane. Keep the old fast path only outside widened regions; inside, ballot emulated EXEC and read its first lane. Return that same-host result without a half exchange when !trades().
  • scalar_join explicitly excluded halves && one_host_wave(). Remove that exclusion: physical-wave sharing does not distribute an SGPR update to lanes that skipped its defining branch.
  • No additional barriers or cross-half exchange in the single-host-wave case; preserve the existing exchange/refusal path for real halves.

Before: fresh7.96s intended-tree compile, regression0/1 in0.81s, verify-native-firstlane-before-20261128T014458Z/.
After: fresh7.38s compile, 5/5 focused checks in7.46s: new128-word consumer, existing first-lane/loop fixtures, four lane-loop consumers(all192words), and the published no-loop RDNA2 oracle(10240words). verify-native-firstlane-corrected-20261128T014616Z/. New consumer requires actual NVIDIA vendor0x10de/physical lanes32–32, mandatory SDK validator, native PSOs and complete GPU readbacks. No WARP proof; unchanged Wine11/NVIDIA590.48.1/diagnostic-relaxed-vkd3d2576c0b4+ and guards. PeakGPU217MiB/minavailableRAM11496.7MiB.

No title rerun or watchdog-fix claim. This is an established scalar consumer correction on the mixed stack. Its exposure in the original dispatch, upstream producer validity and any other BVH semantic gaps remain to be checked. The original parent-walk is not a cross-workgroup spin-wait; its uncapped traversal depends on acyclic parent links and returning-atomic retirement. Source inspection found the aliased carry input/output correctly uses distinct SSA values, so no carry-alias defect is claimed.

Self-contained synthetic consumer fixture (no title code or assets)
//! Local first-active-lane consumers across a widened scalar join.
use super::host::{Dispatch, Host, Root, View};
use crate::native::{ComputeIo, RootParam, RootType, StageIo};
use windows::Win32::Graphics::Dxgi::*;

fn program(wave64: bool, threads: u32) -> crate::NativeProgram {
    let (save, restore) = if wave64 {
        (0xBE8A_246A, 0x88FE_0A7E)
    } else {
        (0xBE8A_3C6A, 0x887E_0A7E)
    };
    let words: [u32; 18] = [
        0xBE82_0300, // s_mov_b32 s2, s0
        0xBE83_0380, // s_mov_b32 s3, 0
        0xF408_0101, 0xFA00_0000, // s_load_dwordx4 s[4:7], s[2:3], null
        0xBF8C_C07F, // s_waitcnt lgkmcnt(0)
        0xBE89_0380, // s_mov_b32 s9, 0
        0xD765_0001, 0x0001_00C1, // v_mbcnt_lo_u32_b32 v1, -1, 0
        0x7D82_0287, // v_cmp_lt_u32 vcc, 7, v1
        save, // s_and_saveexec s10, vcc
        0xBF88_0001, // s_cbranch_execz join
        0x7E12_0501, // v_readfirstlane_b32 s9, v1
        restore, // join: restore EXEC
        0x7E04_0209, // v_mov_b32 v2, s9; scalar result must reach skipped lanes too
        0x3406_0082, // v_lshlrev_b32 v3, 2, v0
        0xE070_1000, 0x8001_0203, // buffer_store_dword v2, v3, s[4:7], 0 offen
        0xBF81_0000, // s_endpgm
    ];
    crate::NativeProgram {
        stage: crate::HwStage::Cs,
        wave64,
        vgprs: 8,
        layout: vec![RootParam {
            root: RootType::Table,
            table_offset_dwords: 0,
            sgprs: 1,
            base_register: 0,
            user_data: 0,
            slot: 0,
        }],
        used: vec![],
        io: StageIo::Cs(ComputeIo { rsrc2: 1 << 1, threads: [threads, 1, 1] }),
        code: words.iter().flat_map(|w| w.to_le_bytes()).collect(),
    }
}

#[test]
fn lab_widened_firstlane_respects_console_exec_on_one_host_wave() {
    let _one = super::valu_tests::ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner());
    let host = Host::new(false).expect("real hardware required");
    assert_eq!(host.target(), super::Target { lanes_min: 32, lanes_max: 32 });
    unsafe {
        let factory = CreateDXGIFactory2::<IDXGIFactory4>(DXGI_CREATE_FACTORY_FLAGS(0)).unwrap();
        let adapter = factory.EnumAdapterByLuid::<IDXGIAdapter1>(host.device.GetAdapterLuid()).unwrap();
        assert_eq!(adapter.GetDesc1().unwrap().VendorId, 0x10de, "NVIDIA required");
    }
    let mut validator = super::validator::Validator::load(
        super::validator::Validator::default_path().as_deref(),
    ).expect("mandatory DXIL validator");
    let mut failures = Vec::new();
    for (wave64, threads) in [(false, 32), (true, 32), (true, 64)] {
        let native = program(wave64, threads);
        let bytes = crate::dxbc::build(&[]);
        let container = crate::dxbc::Container::parse(&bytes).unwrap();
        let ir = crate::ir::build(&native.code, native.wave64, native.vgprs).unwrap();
        let structure = crate::structure::structure(&ir).unwrap();
        let resources = crate::resource::track(&ir, &native.layout, native.stage, Some(&structure)).unwrap();
        let io = crate::io::raise(&ir, &native).unwrap();
        let mut shader = super::emit_with(&container, &native, &ir, &structure, &io, &resources,
            super::Options { view_marks: false, view_pages: false, target: host.target() })
            .expect("bounded branch must translate");
        validator.validate(&mut shader.dxil).expect("valid DXIL required");
        let (root, pso) = host.compute_pipeline(&shader).expect("native PSO required");
        let output = host.dispatch(&root, &pso, &Dispatch {
            roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords().max(1) as usize]))],
            views: &[View::RawUav(threads)], samplers: &[], groups: [1, 1, 1],
        }).expect("bounded real GPU readback");
        assert_eq!(output.len(), 1);
        assert_eq!(output[0].len(), threads as usize);
        let wrong: Vec<_> = output[0].iter().copied().enumerate().filter(|(_, value)| *value != 8).collect();
        eprintln!("firstlane wave{} threads{threads}: {}/{} wrong {wrong:?}; raw {:?}",
            if wave64 {64} else {32}, wrong.len(), threads, output[0]);
        if !wrong.is_empty() { failures.push((wave64, threads, wrong)); }
    }
    assert!(failures.is_empty(), "first-active-lane scalar consumers: {failures:?}");
}

Original-program exposure and bounded title progress (2026-11-28 02:09 UTC)

The original 5552dac6a2b7a1fd program does exercise the corrected first-lane route: its allocator broadcasts at 0xd38 / block 51 and 0x2444 / block 147 both lower with wide=true, trades=false. With paged views and both write-mark settings, the unchanged original container passes mandatory SDK validation and real RTX 4060 native PSO creation (one local probe, two emitted variants). This was not original-program GPU dispatch. Temporary emission tracing was removed before the fresh release.

The next usable title observation is stronger but still bounded: same dirty mixed 3ed7d725 integration with the disclosed local corrections, release SHA256 3e1626216d5f88213c7f15f7906a82bfc9d9caede3420616505cfbd2ec0383b8, Wine 11 / RTX 4060 Laptop / NVIDIA 590.48.1 / diagnostic-relaxed vkd3d 2576c0b4+. In submission 7589, recording 17285, the formerly stalled Dispatch(1055,1,1), CS5552 is command 2138. Native bottom-of-pipe checkpoints subsequently advanced 2830 → 3066 → 3853 at 2.22 / 4.22 / 6.22 seconds. Thus the GPU passed that dispatch shape and continued through later builder work, rather than staying at the old checkpoint. This is not a same-input BVH readback comparison, a completed-submission result, or proof that all builder output is correct.

At the third sample GetDeviceRemovedReason reported 0x887a0005; the external six-second pending-submission stop terminated the scope. Important diagnostic confound: VKD3D_CONFIG=breadcrumbs makes this vkd3d build use a five-second semaphore wait (command.c:649–662), whereas these checkpoint samples show continuing GPU progress. No kernel GPU/reset/OOM entries occurred in the measured interval. I am testing without the heavyweight checkpoint/breadcrumb diagnostics next, retaining the independent six-second pending stop, four-second telemetry-query stop, all resource guards, and the unmodified title watchdog; no native-driver timeout patch or higher resource limit.

The last observed window was loading artwork; no gameplay or watchdog-fix claim. GPU peak 3696 MiB, available-RAM minimum 4156.5 MiB, disk minimum 10.701 GiB. An earlier corrected-build attempt hit the disk guard before this observation and is not counted as a shader result. Local evidence: verify-original-bvh-firstlane-route-20261128T015126Z/, native-submission-trial-20261128T020530Z/{verified-summary.json,native-checkpoint-progress.json}, and matching console/resources. Original game containers and imagery remain local.

Checkpoint-free follow-through (2026-11-28 02:18 UTC)

Same corrected mixed release as above (3e1626216d5f88213c7f15f7906a82bfc9d9caede3420616505cfbd2ec0383b8), with only NV checkpoint/native breadcrumb diagnostics disabled; external six-second pending/four-second query stops and all memory/GPU/disk guards retained. Wine11 / RTX4060Laptop / NVIDIA590.48.1 / disclosed diagnostic-relaxed vkd3d2576c0b4adfae4a+.

  • BVH-containing submission9050 completed normally after4672ms, native fence9050, removal reason0. Its capped CPU notes contain32CS5552dac6a2b7a1fd calls before truncation; this is not a complete command count or a BVH output comparison.
  • The title subsequently logged a520-draw frame. The actual window remained black; no gameplay claim.
  • Later submission9152 contained14native lists of subsequent graphics/compute work and remained pending at2163/4164/6165ms, completed fence9151, removal reason0 throughout. The external stop ended the run, not an observed title watchdog or native device-removal error. Six seconds pending does not prove a deadlock, nor does the CPU recording trace identify the active shader.
  • GPUpeak3786MiB, minimum availableRAM4294MiB, no kernel entries in the actual interval. No limits raised or title watchdog patched.

Evidence: .compat-runtime/logs/native-submission-trial-20261128T021431Z/{verified-summary.json,pending-recorded-commands.json} and 20261128T021432Z-{console.log,resources.csv}. Thus the earlier stalled BVH dispatch shape is no longer the observed stopping point after the narrow firstlane correction; full BVH correctness and a final colour frame remain unproved. The next local diagnostic uses independently verified, bounded per-list completion words rather than native breadcrumbs, preserving batch boundaries and native-fence retirement. Its real-GPU copy/order/reset fixture passed1/1 (128checked data words; old completion cannot cover a reset recording), not a title result.

28 Nov — later unfinished graphics interval, not renewed BVH attribution

Follow-through on the same disclosed dirty Linux/Wine/RTX4060 Laptop integration with the local native-Wave32 EXEC/first-lane correction; diagnostic-relaxed vkd3d 2576c0b4adfae4a+, not exact PR-head or stock certification. No further shader edit in these two observations.

  • 20261128T023221Z, checkpoint-free per-list end words: the BVH-containing submission completed in 4799ms. A later23-owned-list batch remained pending at6193ms, device removal reason0;18 list-end words had completed. The first unfinished recording has182 CPU notes:91 non-dropped indirect graphics calls,89 existing dropped-pipeline notes,2 barriers. Its first two graphics candidates are VS 25ebc92075b62822 with PS 1cd9bc634417a981 / 48e74d16cbfa45e3 (tiled lighting). This narrows the unfinished interval, not the executing shader or a proven deadlock; preceding transition/prelude work is not independently marked. User heard audio and saw a coloured prologue background without the title text. No visible gameplay.
  • An all-command progress-marker diagnostic (20261128T024422Z) stopped earlier: the six-second external rule triggered at6132ms on a BVH-containing batch, but that batch completed at6442ms before termination. Its last observed marker512 is the diagnostic note cap, not an isolated instruction. User reported no audio/prologue in this trial. Do not interpret this as recurrence of the fixed native32 first-lane failure. Instrumentation overhead is possible, not established by matched timing.
  • Narrowed markers to graphics only; actual-GPU copy/order/reset tests pass2/2 (256 copied words). At the user's request the external pending observation window is now30s, while memory/GPU/disk/telemetry safeguards and the title watchdog remain unchanged. A real CPU-held queue dependency verified15 samples through30s and completion after release; no deliberate shader hang. Selective graphics title attribution is still pending.

Evidence retained locally: native-submission-trial-20261128T023221Z/{verified-summary,pending-list-attribution}.json, native-submission-trial-20261128T024422Z/{verified-summary,pending-command-attribution}.json, verify-graphics-list-progress-20261128T025120Z/, verify-native-observation30-20261128T025407Z/. New owner head 00a023481512edbf3ff1c22108aebbc772149e33 was noticed; these results do not test its two newer commits.

28 Nov —30second observation resolves a specific later graphics boundary

The selective-graphics trial is now complete: 20261128T025611Z, same disclosed corrected mixed production (not new 00a02348), fresh intended GPU/HLE/app release32.52s. The BVH-containing submission completed in 5457ms. Later submission8792 remained pending for 30066ms, native device-removal reason0. Across all15 samples21/26 owned-list end markers completed; the first unfinished list stayed at before-note3, never reaching note4/end.

That interval is the indirect graphics operation with VS 25ebc92075b62822 and PS 48e74d16cbfa45e3, exact original name TL_PS_NoDir_PBR_MATERIAL_STANDARD_42ad1e50_Wrapped. The immediately preceding operation uses the same original argument address/VS with PS 1cd9bc634417a981. MARKER_OUT reaching note3 brackets preceding work, but does not prove the preceding pixel shader ran (an indirect record can have zero instances), nor identify an instruction inside the stalled interval. Pipeline/binding/argument/transition work remains in scope—not yet a demonstrated NoDir translator defect.

The title also raised its deliberate null-write watchdog (+0x23cf683, caller +0x2215c35) near03:00:32, before the external30s termination. Loading artwork120/150/180s; window210/240s black. GPUpeak4443MiB, minimum availableRAM4277.1MiB, scopepeak9096.5MiB, diskminimum10.214GiB; not a resource-floor stop. No kernel GPU/reset/OOM entry; inactive scope verified and only identified unheld backing reclaimed.

Exact original1cd9/48e7 containers are retained locally with matching BLAKE3/SHA256; CPU-only disassembly parsed both (1.60s), no extracted game bytes/images published. Actionable next gate: isolate this exact NoDir indirect-draw interval, distinguish its bindings/arguments from pixel/helper-lane lowering, and require an offscreen consumer regression before another title retry. Do not bypass the watchdog, omit the pass, or infer rendering from completed BVH pipelines. Local evidence: native-submission-trial-20261128T025611Z/{verified-summary,pending-command-attribution}.json, graphics-boundary-shaders-20261128T025611Z/containers.json, verify-graphics-boundary-shader-info-20261128T030313Z/.

28 Nov — isolate our compute correction from pixel lowering (not an owner regression)

The local route_votes/route_lane_writes additions described above were eligible for pixel programs, whereas the relevant console-lane setup is compute-only. These additions are absent from owner 1b1ef216; this is a local-integration finding. The exact stalled-boundary NoDir pixel 48e74d16cbfa45e3 emitted 24 of 25 first-lane reads through our widened early return rather than the existing pixel helper-aware fallback. Both local route methods now require StageIo::Cs, preserving the compute correction and restoring the existing pixel route. All 25 reads now use the helper-aware fallback; marked/unmarked original emissions pass required SDK validation. That check does not dispatch the original shader.

Fresh mixed-tree verification on the physical RTX 4060 Laptop/Wine 11, NVIDIA 590.48.1, diagnostic-relaxed vkd3d 2576c0b4adfae4a+: 8/8 pass, 7.39s compilation, 4.92s tests. This includes the original emission, an actual bounded pixel/quad draw, and six retained compute firstlane/scalar/lane-loop/writelane/vote/break consumer fixtures. Evidence: verify-compute-stage-pixel-corrected-gates-20261128T031657Z/.

No pixel-corruption or title-stall fix is established yet. The bounded 16-round gradient waterfall passes on both sides. Two earlier local fixture failures used OR rather than AND-NOT when removing served EXEC lanes; those are invalid shader verdicts. The corrected baseline is verify-pixel-helper-waterfall-corrected-control-20261128T031616Z/ (1/1). This change limits unintended scope, not a claimed matched bug fix. A fresh changed-stack title observation is pending; all resource guards, the 30s pending window and the title watchdog remain intact. No original shaders/assets are attached.

28 Nov — changed-stack title follow-through: former graphics boundary completes

After the compute-only eligibility change above, a fresh shader/GPU/HLE/app diagnostics release (47.90 s) was run on the same Linux/Wine/RTX 4060 Laptop diagnostic stack. Mixed base 3ed7d725 + corrected 1b1ef216; not the newer 00a02348 head. Same 30-second pending-submission cutoff, 9 GiB/512 MiB scope and global GPU/RAM/disk guards; title watchdog unchanged.

The first material recording has the same three command headers as the earlier stalled recording: barrier, STD 1cd9bc634417a981, NoDir 48e74d16cbfa45e3 (same VS 25ebc92075b62822, original argument address and max-count). Both shaders freshly translated and created before their first bind. All 11 submissions containing those material draws completed, 31–208 ms; the longest submission overall completed in 6,548 ms, and completion continued through submission 8111. No watchdog/access-violation or kernel entry was observed before the stop.

This is positive progress past the former boundary, not a controlled-cache causal proof or general hang fix. A recorded indirect draw and completed submission do not establish nonzero instance count, pixel execution, identical descriptor contents or correct shader output. The corrected synthetic pixel fixture still passes on both sides.

The unchanged 10 GiB user-available disk floor, not a pending timeout, stopped the run at 247.83 s (9.996 GiB; exit 137). GPU peak 4,229 MiB; available-RAM minimum 3,513.1 MiB; scope peak 9,216 MiB. The window remained black at 240 s. Native FFX input/output samples 1 and 8 remain raw RGB zero; depth sample 8 is populated (6.68% nonzero). There were still 782 unfinished pipeline builds. No visible or controllable gameplay. Four exact-inode/unheld backing files were reclaimed only after scope exit; guards were not weakened.

Local evidence: native-submission-trial-20261128T031948Z/{verified-summary,material-command-attribution,backing-cleanup,trace-compression}.json, matching console/resources and the previous 025611Z boundary evidence. Captures/assets remain local. Next diagnostic is completed lighting/HDR producer work and missing dependencies, not another unchanged black-frame retry.

28 Nov — actual intro scene captured; performance remains far from playable

The same corrected local 1b1ef216-based mixed executable now displays an actual city/palm/coloured-light intro scene in the Wine client (040112Z, unmodified client capture at04:06:08Z), not merely an intermediate target. Lighting is severely wrong/dark, controllability unverified. This does not certify current owner00a02348 or canonical main. No images/assets published.

Full hardware/provenance report and sanitized profiling data: RTX4060 Laptop8GiB/16GiB/Linux6.17/Wine11, same diagnostic-relaxed vkd3d caveat. A subsequent diagnostic run stopped at342.62s on the unchanged2048MiB global-RAM floor; its last capture remained black, so it is not a second visible-scene proof. Fifteen late host-present intervals have4.38s median/16.57s max; pipeline workers account for6.19 of7.80 active CPU cores despite758 native-library loads versus2made. Copy/wait costs and390unfinished pipelines remain. Recorded-command logging still produced103.49MiB, explicitly disclosed. Next: remove that diagnostic overhead without weakening the native-progress observer, time cache-load/PSO work and copy owners, then verify actual shading. Earlier failure history and all shader-safety gates remain intact.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226815988 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7226815988). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T19:43:56Z. --- Verification of production head `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` on the physical RTX 4060 Laptop (32-lane host), Linux 6.17 / Wine 11 / NVIDIA 590.48.1. Diagnostic-relaxed-vtable vkd3d `2576c0b4adfae4a+`, not stock certification; NVIDIA masking disabled. Production unchanged; retained local test-only modules are byte-identical to the independent fixtures used in the earlier `706c006` report. SDK DXIL validation and the NVIDIA adapter are mandatory. | Independent consumer | Earlier local `706c006` evidence | Revised `1b1ef21`, executed now | |---|---:|---:| | Published gfx1036 firstlane_branch oracle, 10 cases / 10,240 words | 508 wrong words, 9 differing cases | **0 wrong words, all 10 exact** | | Wave64/readlane40 ordinary loop, 64 words | 1 wrong (lane 0) | **0 wrong** | | Wave64/readlane40 joined-backedge loop, 64 words | 1 wrong (lane 0) | **0 wrong** | | Native-Wave32/readlane20 loop, 32 words | 12 wrong | **12 wrong, unchanged pattern** | This confirms the newly fixed halves/scalar consumers using our unchanged instruction streams, not only the new owner encodings. It is not a fresh immediate-parent A/B: the earlier results remain the archived `706c006` runs. Current combined invocation is **1 test passed / 1 failed** because the loop fixture deliberately retains its native-Wave32 control. That control still returns 0 for lane 0 and misses +20 for lanes 21–31; both Wave64 legs pass. This agrees with your explicit native-Wave32/#269 scope caveat, not a new regression from the two latest commits. Our older #439 + disclosed Wine single-latch control had all 160 words correct, so the native-Wave32 path remains a local runtime-integration concern. Also rebuilt this exact production head and ran the original local `XboxBvhBuilder.dll` through `translate --pipelines --validate --list --jobs 1`: **52/52 translated, 52/52 required-SDK validations, 52/52 native NVIDIA PSOs created**, with identical container-offset sets for validation and creation. This includes the original programs at offsets 0x25c40 and 0x28770. **No original BVH program was dispatched**, so this is admission/compilation, not tree integrity or title safety. Evidence under `.compat-runtime/logs/`: - `verify-pr2633-revised-independent-oracles-20261127T193720Z/`: fresh intended-tree build 6.95 s, tests 1.72 s; all complete raw consumer outputs retained. - `verify-pr2633-revised-builder-20261127T193907Z/`: fresh release 46.89 s, guarded command 50.57 s. Peak sampled GPU <=222 MiB, available RAM >=10,900 MiB, disk >=12.058 GiB. Original 9 GiB/512 MiB scope and global guards unchanged. No title launch, forced approximation, partial builder, native-Wave64/WARP claim, full 151-case oracle run, or gameplay claim. Suggested next owner gate remains the native-Wave32 scalar/lane consumer plus the separately acknowledged remaining corpus classes; the two reported Wave64 loop errors and the 508-word firstlane mismatch are now cleared here. AI-assisted verification; no source PR or assets published. ### Native-Wave32 cause isolated; local correction passes (27Nov 20:13 UTC) On production `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` plus a disclosed local two-function correction, the previously failing native-Wave32/readlane20 loop now returns every expected word. This is not an exact-head pass or a code PR. Causal path: `Lower::read_lane` emits `dx.op.waveReadLaneAt.i32`; `valu` treats its SGPR destination as unguarded by EXEC; `fill_phis` recognizes the escaping SGPR as wave-scalar. But `wide::scalar_join` previously returned for all non-halves/one-host-wave programs. Native Wave32 kept historical per-lane scalar values across its divergent host loop instead of the console wave's one SGPR. Lane 0 never entered and kept zero; lanes 1–20 left while source lane 20 remained active; lanes 21–31 subsequently read an inactive source and produced zero. That explains the exact 12-lane failure pattern. Local correction, retaining the existing selective non-uniform/differing-scalar checks: ```rust // lower/wide.rs, scalar_join let native_wave32 = self.console_lanes && !self.x.native.wave64; if (!self.halves && !native_wave32) || (self.halves && self.one_host_wave()) || self.wide.from.contains_key(&b) || self.uniform_join(b) || values.iter().all(|&(x, _)| x == values[0].0) { return; } // Existing plan.ask_scalar(q, b) loop remains unchanged. // lower/halves.rs, group_any, before the existing halves paths: if !self.halves { return Ok(self.s.m.cmp(at, pred::NE, word, zero)); } ``` The native vote uses its own ballot word rather than halves exchange/LDS barriers. No fallback-admission change, forced Wave32 override, or safety-guard removal. Physical RTX 4060 Laptop / Wine 11 / NVIDIA 590.48.1, mandatory SDK validator and NVIDIA 32-lane assertions, diagnostic-relaxed-vtable vkd3d `2576c0b4adfae4a+` (not stock certification): - Existing native32 ordinary loop: **0/32 wrong**, versus the already-recorded exact-head 12/32 failure. - Added native32 joined-latch form, same unchanged instruction generator: **0/32 wrong**. - Existing logical Wave64 ordinary/joined loops: **0/64 each**; these run on the 32-lane GPU, not native-Wave64 hardware. - Published native gfx1036 firstlane oracle: **0/10,240 wrong across all 10 cases**. - Existing `scalars_a_loop_leaves_are_the_console_waves_in_every_lane_in_halves_on_every_gpu`: **1/1 pass**. Commands: `cargo test -p victory-shader --features host --lib emit::lab_ -- --nocapture --test-threads=1`, then the named scalar-loop filter above. First passing invocation 2/2 tests, 1.54 s, fresh intended-worktree compilation 6.74 s; scalar-loop fixture 3.35 s on the same binary. Logs `.compat-runtime/logs/verify-pr2633-native32-scalar-readbacks-20261127T201307Z/` and `verify-pr2633-native32-scalar-loop-regression-20261127T201402Z/`. A preceding local test-only compile attempt referred to a nonexistent `HostShader.barriers` field; it was removed before execution, not a shader failure. All consumer output assertions remain intact. This clears the reproduced native32 loop consumer, not all native32 shaders, original BVH execution, AMD/native64, or title rendering. The independent full-LDS fallback report in comment7227088196 remains a separate promotion blocker; this patch deliberately does not alter it. The original 52/52 BVH validation/PSO result above predates this local patch and is not relabeled as a new run. Suggested owner action: adopt/review this narrow native scalar-join route with both loop forms, and fix unsafe retained-lowering fallback separately before runtime promotion. AI-assisted investigation/local patch/verification: OpenAI GPT-6 Astra. ### 27 Nov: bounded writelane join correction, complete selected family verified On the same `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` production plus the native32 correction above, a separate local correction now preserves an explicit lane write even when its target lane skips the branch. A guard-only correction failed the published `writelane_branch/0/hi32` oracle (lane0 v10 `0x1234` instead of `0x777`); the later SSA join was discarding that write. The candidate routes only loop-free logical-Wave64/host-Wave32 writelane regions. It carries fixed-lane write provenance through nested phis and guarded ordinary VGPR writes, and folds affected join inputs in the region's CFG dependency order so a later ordinary write wins. It leaves the unaffected join fast path unchanged. Relevant local symbols: `route_lane_writes`, `wide_lane_write_guard`, `wide_lane_write`, `wide_keep_lane_write`, `wide_phi`, `wide_pick`. This is a reviewable bounded approach, not a proposed blanket final overlay or general loop fix. The value-keyed provenance currently receives fresh instruction/select values; a future select constant-folding change must not intern these as shared constant keys. Multi-entry joins beyond the supplied cases remain a coverage limit. Required physical RTX4060 Laptop, 32-lane host and SDK validator, same Wine11/NVIDIA590.48.1/diagnostic-relaxed vkd3d conditions: - **18/18 public `writelane_branch` cases exact: 18,432 output words.** Destinations0/33/63 × all/lo32/hi32/alternating/lane40/none masks. - Two added consumers also exact (2,048 words): later lower-half ordinary overwrite and a lane40 nested branch writing lane0 across two joins. - Existing scalar controls still pass2/2: firstlane10,240 words and native32/logical64 ordinary/joined loop consumers. No scalar-oracle output assertions weakened. Public assembled inputs: https://gist.githubusercontent.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131/raw/f4383c6d310fd40ed8c36c93d547f0f1f36a16be/fw64_data.rs . Independent gfx1036 expected outputs: https://gist.githubusercontent.com/Lyrnc/00c6589f26930d5d07c077f8c4a30131/raw/ce2f401463491742b10bb36d339c5d1e5103efbf/oracle_fw64.json , SHA256 `eee0f705651c6083e3fbd8a0e3645ff55b66ed9222a68556b12a497477588715`. Local selected data retains every input word and all nonzero native outputs; the remaining twelve words per lane were checked zero before compact extraction and are still asserted zero on GPU readback. `cargo test -p victory-shader --lib lab_writelane_public_family_and_ordered_joins -- --nocapture --test-threads=1`:1/1,20 GPU cases,1.19s, fresh6.88s intended-tree compilation. Evidence `verify-pr2633-writelane-family-20261127T213942Z/`; scalar controls `verify-pr2633-writelane-scalar-controls-20261127T213353Z/` (2/2,1.55s). No title run or gameplay claim. The other known break/vote-loop oracle families and unsafe retained-lowering fallback are **not** cleared by this selected-family result; no new full151-case verdict is claimed. Suggested owner action: retain all masks plus overwrite/nested consumers when reviewing the join correction, and resolve those separate promotion gates before title use. ### 21:51 UTC — VCC-loop causality narrowed; SCC/EXEC loop is still separate Same `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` plus the disclosed local native32/writelane corrections. `structure::branch` models `s_cbranch_vccz/nz` as a per-lane VCC/EXEC predicate; `wide_exit` was using it to choose each lane's loop edge. These instructions instead branch on a whole-wave zero/nonzero value. A **local causal probe, not a complete shipping fix**, routes the enclosing VCC loop wave-wide, votes across the logical wave before choosing its edge, and forbids `unroute` for that forced route. All **11 public `vote_loop`/`vote_loop_branch` cases now match all 11,264 native-gfx1036 oracle words** on this physical RTX4060/Wine host. This includes low/high halves, alternate lanes, lane40 and the empty mask. Mandatory SDK validation and NVIDIA/32-lane assertions; no skips. Final combined controls: **4/4 fixtures**, 2.91s after fresh intended-tree 6.72s compilation. The 11 vote cases, all 18 writelane cases plus two ordered/nested controls, all 10 firstlane cases, and native32/logical64 ordinary/joined readlane loops pass. Evidence: `.compat-runtime/logs/verify-pr2633-vote-loop-controls-20261127T215127Z/`. Initial VCC-only proof: `verify-pr2633-vote-loop-probe-20261127T214906Z/`. This is selected-family coverage, **not a new 151-case total**. **Do not extend that vote mechanically to SCC.** A separate temporary extension to `s_cbranch_scc0/1` still fails 5/7 `break_loop` cases, 443/7168 output words; lane40 and empty-mask controls match. In the all-lanes case, lane0 accumulates v10=0x24 rather than 1 and incorrectly writes v12=8 rather than preserving 0xdead0000. Evidence: `verify-pr2633-break-loop-probe-20261127T215038Z/`. That SCC extension was removed before the passing controls. This points to the distinction between scalar control flow and the changing EXEC mask governing VGPR writes; making the branch uniform alone does not preserve it. Owner action: keep whole-wave VCC loop votes, but separately preserve actual EXEC-masked writes/loop phi state for SCC live-mask loops. Also test saved VCC bits outside current EXEC: the local probe still consumes the existing structured predicate and does **not** certify that broader numeric-mask case. The independently reported full-LDS `unroute` fallback remains unsafe and is not fixed by this probe. No title launch or runtime-promotion claim. ### Break-loop cause narrowed: mask preservation fixes the oracle, but is not a promotable patch (27 Nov, 22:08 UTC) Same `1b1ef216` production base plus the disclosed local native32/writelane/VCC probes, same Wine 11 / RTX 4060 Laptop / NVIDIA 590.48.1 / diagnostic-relaxed vkd3d stack. Mandatory DXIL validator and physical NVIDIA readbacks; no title run. The CPU-only IR/structure census for public `break_loop/all` shows loop EXEC phi values 86/87 reduced to `Bool::TRUE` and **every vector-write guard absent**. The body temporarily expands EXEC with `s_or_saveexec`, restores it, then uses `s_andn2`/SCC to retire lanes. A reach-relative mask truth is not an unconditional all-lanes truth once the region is emitted wave-wide. A causal-only variant that (a) forces mask phis to remain unresolved, (b) retains raw EXEC guards rather than reach-relative simplification, and (c) uses a whole-wave SCC branch vote returns **all 7 public break-loop cases / 7,168 words exactly** (previous scalar-vote-only probe: 443 wrong words). Fresh build 6.74 s, GPU fixture 0.96 s. Evidence: `verify-pr2633-break-loop-mask-phi-probe-20261127T215818Z/`. **Do not apply that global workaround:** firstlane, vote-loop and writelane controls remain exact, but the previously passing native32 joined-latch consumer now refuses translation before dispatch. The initial refusal is a missing recursively referenced EXEC phi (`Value(22)` -> `Value(38)` at 0x28). Making unresolved-phi discovery visit backedges moves the refusal to numeric mask materialization at 0x48; it does not solve it. A separate SCC-as-Uniform structural probe also refuses mask-as-data before dispatch. These are local-probe admission regressions, not new upstream GPU-output failures. Logs: `verify-pr2633-mask-phi-controls-20261127T215941Z/`, `verify-pr2633-joined-mask-structure-20261127T220256Z/`, `verify-pr2633-complete-mask-loop-controls-20261127T220442Z/`, `verify-pr2633-scalar-reach-loop-controls-20261127T220723Z/`. Actionable owner boundary: preserve the distinction between a mask valid under per-lane reach and its actual EXEC bits through wave-wide lowering; discover all mask-phi/backedge dependencies and keep numeric-mask/SCC consumers supported. Keep both the seven break-loop native-oracle cases **and** the ordinary/joined native32 + logical64 lane-loop consumers as admission gates. The global mask/SCC probes and throwaway diagnostics are restored; only the previously passing local fixes/VCC variant remain, with sources for each causal variant archived alongside logs. Full-LDS fallback safety and the full title-program corpus remain separate gates; no rendering certification. ### 27 Nov 23:24 UTC — combined local correction passes the complete public oracle On exact production `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419` plus the disclosed local native-Wave32/writelane/VCC corrections, the break-loop compatibility blocker is now resolved locally. The native-Wave32 joined-latch fixture contains `s_mov_b64 exec, 0`; `Lanes::sop` recognized only `_b32` operations for a Wave32 program, turning this low EXEC value into an opaque mask. Recognizing **only the low-half meaning of `s_mov_b64`** (MOV has no SCC) removes that materialization failure. Do not extend this mechanically to b64 bitwise SCC: its high word can matter. Combined with preserving unresolved mask phis/backedge discovery, raw EXEC guards and whole-wave SCC/VCC loop votes, the unchanged public 151-case inputs match the independent native-gfx1036 oracle: **151/151, 154,624/154,624 output words exact**, including 30 cases with the original 512-byte LDS reservation. The 2 ordered/nested writelane additions match 2,048 words, and native32/logical64 ordinary+joined consumers match all 192 words. Physical RTX4060 Laptop, NVIDIA590.48.1, Wine11, mandatory SDK validator and vendor0x10de/32-lane checks; diagnostic-relaxed vkd3d2576c0b4+ (not stock). No WARP or retry. Fresh6.78/7.02s intended-tree compilation; full-oracle run6.06s. Logs `verify-pr2633-exec-mov-loop-controls-20261127T232024Z/` and `verify-pr2633-exec-all-oracles-20261127T232131Z/`; source snapshots+SHA256 manifest retained locally. I also removed the local `unroute` and `kept` fallback paths rather than silently accepting a lowering whose required joins/exchanges failed. With those removed, the full151+2 cases and all192 consumer words remain exact. A 128-thread synthetic firstlane with all32KiB LDS reserved now explicitly refuses at0x20 for missing exchange space, while the native64 compile control succeeds. The enclosing owner admission test subsequently fails an **implementation-only zero-barrier assertion** (2 emitted vs0), not any readback; log `verify-pr2633-failclosed-oracles-20261127T232433Z/` is therefore 2passed/1failed overall, not all-pass. These are local experiments, not a PR-head pass, complete compiler certification or title result. Actual 52-container builder admission and integration remain next gates; no shader assets published and no title launch on this variant. The global mask-preservation policy needs owner review/targeting before shipping. ### Original builder admission after the complete correction — 27 Nov 23:28 UTC The same dirty `1b1ef216` + local correction, with unsafe `kept`/`unroute` fallbacks removed, now translates **52/52 original XboxBvhBuilder containers**, SDK-validates **52/52**, and creates **52/52 native NVIDIA compute PSOs**. Required validator is the logged DXC `dxil.dll`. Fresh intended-tree release compilation 47.17s; total guarded command 114.63s, GPU peak 338.0 MiB, available RAM minimum 8829.5 MiB. Evidence `verify-pr2633-corrected-builder-20261127T232615Z/{console.log,target-summary.json}`. Original title programs were **not dispatched** by this CLI. The full-LDS admission fixture separately passes **1/1** after deleting its obsolete implementation-only zero-barrier assertion (not repinning it): a required exchange beyond the 32KiB budget explicitly refuses, while the native-Wave64 compile control succeeds. Evidence `verify-pr2633-failclosed-admission-20261127T232536Z/`. This closes that admission check, not hardware execution at full LDS or rendering. No new title run yet; integration remains subject to combined runtime gates. ### 28 Nov: paged runtime integration gates The corrected backend is now ported into the existing dirty memory-tested runtime (base `3ed7d725`, retaining Target-keyed caches, paged descriptors and prior memory/correctness fixes), not an exact PR-head result. Required NVIDIA/32-lane and SDK-validator gates pass: all151 public cases plus two ordered/nested cases are exact across156672 words; four native32/logical64 loop consumers are exact across192 words. Both paged-heap GPU fixtures and the explicit full-LDS refusal pass. `verify-corrected-runtime-shader-gates-fixed-20261128T001655Z/`:5/5, fresh7.40s build,5.84s fixtures. The reference partial/multiwave group checks also passed4/4 with39 explicit NVIDIA readbacks at48/64/128threads (`verify-pr2633-corrected-multiwave-20261127T232945Z/`). On the integrated release, all52 original XboxBvhBuilder containers SDK-validate and create native PSOs (`verify-corrected-runtime-builder-20261128T002116Z/`, fresh50.91s build,120.27s total). Still no original-program dispatch proof from this CLI check. Runtime cache/builder/root-offset tests and the actual-bound texture-capture and native-FFX/depth fixtures pass. A30s no-input startup showed the account picker and time-stopped normally; no gameplay claim. Same Wine11/RTX4060Laptop/NVIDIA590.48.1 and diagnostic-relaxed-vkd3d caveat. Two local harness errors were corrected, not hidden as shader passes: the first integration test compile used the reference Host.wave32 API instead of runtime Host.target; a capture-fixture invocation omitted its required output folder and failed before recording. Both corrected paths pass. No BVH guard or resource limit removed. ### 28 Nov runtime follow-through: this local integration is not cleared for gameplay The corrected, paged/scoped-memory mixed runtime described above passed its short startup, then exposed a new completion/watchdog gate. This is **not an exact PR-head result or a proven #2633 regression**. Same physical RTX4060 Laptop, Wine11, diagnostic-relaxed vkd3d; all resource and BVH all-or-none guards retained. Fresh release SHA256 `46af3d20f062006c9a9d63f90a320c41117d38f923e0b2b75b7f01bce2efa042`. - At `00:30:07.522319Z`, title frame2865 reports **BVH builder53made/0refused/0dropped**. This establishes admission, not correct original-builder execution. - First native FFX input/depth/output snapshots were recorded at `00:30:07.718–.869Z`, but **none completed/read back**. The later actual-bound HDR probe was not reached. This is not another measured zero-HDR result. - About31s later the title faults on a null write at prepared-image `+0x23cf683`, with `+0x2215c35`/`+0x2215eca` below it. Prior exact disassembly identifies `+0x2215c35` as the title watchdog fatal path. The saved crash context says Game Running/frame3668,735streaming requests, and an **unsignaled cross-queue barrier**. It does not isolate the stalled producer or prove shader causality. - The actual window remained black. Exit5 after246.78s; **not a guard stop**. Peak GPU memory3730MiB, minimum available RAM4188.3MiB, peak scope7191.8MiB, minimum user-available disk10.272GiB. Every sampled GPU query succeeded, exact kernel interval was empty, scope is inactive and an idle query recovered270MiB/0%GPU. No driver-reset or resource-OOM claim. Evidence retained locally: `20261128T002637Z-{console.log,resources.csv,guard-events.jsonl}`, `bound-apply-scene-trial-20261128T002636Z/`, matching dump, exact binary/PDB. No game imagery/dump/assets published. Trace still has1366requested keys but only453with built records;205 distinct translation refusals are192mesh/13compute. Thus even the admitted-builder trial is not a fully compiled-scene verdict. **No unchanged retry.** I am inspecting the saved CPU waits/completion path and the multiwave synchronization boundary before choosing an offscreen regression. Useful owner isolation: associate queue submissions/signals/completed fence values with the first original-builder use, rather than treating52/52 PSO creation or the all-or-none admission log as execution proof. ### Offline dump narrows the latest failure to native completion The saved dump now provides an actual x64 PE-metadata unwind, not raw stack-word guesses. Executable/PDB GUID+age match the release above. Thread0x01e4 was inside `Host::execute`'s `WaitForSingleObject(event, INFINITE)` (`host.rs:1608`), reached from `queue::pump`/`Held::pump`/`queue::execute`. Source order establishes that native `ExecuteCommandLists` was called and both `queue.Signal` and `fence.SetEventOnCompletion` returned success before this wait. Thread0x01d8 was secondarily blocked on global `HELD` from `copy_page_mappings`; no CPU lock cycle is established. This identifies an outstanding native completion dependency, **not its stalled GPU command or cause**. The dump does not retain a submission/list/fence-value association with the recorded FFX/Apply work. A bounded static review found no concrete group-barrier/addressing defect; the existing48/64/128-thread checks still do not prove execution of the original256/512-thread builder programs. No further title run. Next diagnostic must identify submission/list and fence progress without releasing pending resources, forcing waits through, or changing queue ordering. Local evidence: `crash-offline-{evidence.json,summary.txt}` beside this trial. ### 28 Nov 01:34 UTC — native GPU progress bounded to a BVH dispatch interval Still the disclosed **dirty mixed runtime** with the local semantic corrections above, not an exact PR-head or gameplay result. Linux/Wine11, RTX4060 Laptop8GiB, NVIDIA590.48.1, diagnostic-relaxed vkd3d `2576c0b4adfae4a+`; all original resource/BVH guards retained. The first passive run (`20261128T010746Z`) completed native submission7975 but not7976. ExecuteCommandLists/Signal/event arming returned; three native-fence samples remained7975 for2.16/4.16/6.16s. Its separately recorded native-FFX capture list was **never submitted** before the early stop. Thus recording the FFX call did not establish that FFX was executing at the stall. The CPU note cap was512, so that run alone did not identify the failing command. Added a default-off local probe using the actually enabled `VK_NV_device_diagnostic_checkpoints` extension (`VKD3D_CONFIG=breadcrumbs`), not timestamp queries or WriteBufferImmediate barriers. Unique recording/note tokens, current native command buffer obtained at every marker, retained native queue/device owners. No inserted GPU waits, resource writes, queue splitting or changed dispatches. The real-NVIDIA copy fixture checks all64 words and distinguishes a completed list from a second list held behind a CPU fence, then verifies completion after release;1/1. Existing real native-FFX FP16/RGB9E5/depth fixture also1/1 with the probe enabled. Changed title trial `20261128T012958Z`, fresh intended-tree diagnostics release: - BVH gate: **53 made,0 refused,0 dropped**. - Native submission11265 remains at completed11264. At2.177/4.178/6.179s, all three checkpoint queries are identical: - BOTTOM_OF_PIPE: recording24587,note2198,token1611335830. - TOP_OF_PIPE: recording24587,note2199,token1611335831. - Note2198 is immediately before **`Dispatch(1055,1,1)`, compute `5552dac6a2b7a1fd`**. Note2199 is before the following `Dispatch(9,1,1)` of the same program. - Original container identity independently verified: BLAKE3 prefix `5552dac6a2b7a1fd`, `XboxBvhBuilder.dll+0x53fd0`,29024bytes, threadgroup `[32,1,1]`. Group size by itself does not establish the original console wave-size flag. - Markers are after each bind and before dispatch. This is a tight **dispatch interval**, including possible intervening diagnostic/next-bind work, not yet an isolated shader reproducer or proof that translation rather than input/lifetime is wrong. - **Instrumentation caveat, source-verified:** enabling `VKD3D_CONFIG=breadcrumbs` also changes this vkd3d build's native timeline wait from `UINT64_MAX` to **5seconds** (`libs/vkd3d/command.c:643-661`). Its VK_TIMEOUT path calls `d3d12_device_report_fault` even with built-in breadcrumb recording compiled out (`vkd3d_private.h:4500-4503`). Therefore the third-sample0x887a0005 is the diagnostic timeout/reporting path, **not independent evidence of a new kernel/driver reset or a new shader regression**. The unchanged first two checkpoint/fence samples occur before that5s deadline. No timeout will be raised to push through this result. - The third sample changes GetDeviceRemovedReason from S_OK to **0x887a0005**. Native log reports `vkd3d_wait_for_gpu_timeline_semaphore ... vr 2` (VK_TIMEOUT). Supervisor stopped the workload before the title watchdog; no watchdog suppression or unchanged retry. No kernel journal entries in the actual interval; idle telemetry recovered133MiB/0%/38C. Only loading imagery, no scene/gameplay. Sampled GPUpeak3580MiB, minimum availableRAM4499.8MiB, scopepeak9128.1MiB (near the9GiB scope cap), minimum availabledisk10.016GiB. This was not a RAM/GPU/disk-guard stop, but these samples do not exclude memory-pressure effects. Identified unheld temporary backing files cleaned after scope exit; trace losslessly compressed. Local evidence: `.compat-runtime/logs/native-submission-trial-20261128T012958Z/{summary.json,checkpoint-events.txt,pending-recording-notes.json}` and timestamped console/resources. Images/assets/raw root-address data stay local. Earlier CPU-note `heap:null` labels must **not** be interpreted as null root bindings: that formatter sometimes interprets64-bit root addresses as heap indices. **Actionable next gate:** inspect this exact builder program's loop/scalar/atomic termination invariants, then reproduce any mismatch with a bounded synthetic fixture. We are doing that offline rather than replaying the failed title, skipping the dispatch, disabling the all-or-none guard or raising timeouts. Compilation/admission53/53 is now clearly insufficient to certify execution. ### 28 Nov 01:47 UTC — another one-host-wave semantic boundary reproduced and corrected locally The checkpoint program's original FSSM record now confirms **native Wave32**, not merely a32-thread group: shader `5552dac6a2b7a1fd`, record flags3145760 with FLAG_WAVE32(bit5) set,12928 native-code bytes, group32×1×1. Original module/container hashes remain unchanged. This does **not** yet establish that either particular first-lane instruction takes the affected widened route. A bounded synthetic consumer exposes two gaps on the same dirty #2633-based integration with the earlier proposed local corrections (not a pristine upstream-head comparison): enter lanes8–31, read the first active lane into anSGPR, then consume thatSGPR in every lane after reconvergence. `v_mbcnt` explicitly selects console-lane handling. Expected8 everywhere. |Console wave / group threads|Before local correction|After| |---|---|---| |32 /32|32/32 wrong, all0|0/32 wrong| |64 /32|8/32 wrong, skipped lanes retained0|0/32 wrong| |64 /64 control|0/64 wrong|0/64 wrong| Cause and narrow correction: - `first_lane` returned `None` unconditionally for `!trades()`. In a widened region physical lane0 executes even when excluded by emulated EXEC; `waveReadLaneFirst` therefore selects the wrong lane. Keep the old fast path only outside widened regions; inside, ballot emulated EXEC and read its first lane. Return that same-host result without a half exchange when `!trades()`. - `scalar_join` explicitly excluded `halves && one_host_wave()`. Remove that exclusion: physical-wave sharing does not distribute an SGPR update to lanes that skipped its defining branch. - No additional barriers or cross-half exchange in the single-host-wave case; preserve the existing exchange/refusal path for real halves. Before: fresh7.96s intended-tree compile, regression0/1 in0.81s, `verify-native-firstlane-before-20261128T014458Z/`. After: fresh7.38s compile, **5/5 focused checks** in7.46s: new128-word consumer, existing first-lane/loop fixtures, four lane-loop consumers(all192words), and the published no-loop RDNA2 oracle(10240words). `verify-native-firstlane-corrected-20261128T014616Z/`. New consumer requires actual NVIDIA vendor0x10de/physical lanes32–32, mandatory SDK validator, native PSOs and complete GPU readbacks. No WARP proof; unchanged Wine11/NVIDIA590.48.1/diagnostic-relaxed-vkd3d2576c0b4+ and guards. PeakGPU217MiB/minavailableRAM11496.7MiB. **No title rerun or watchdog-fix claim.** This is an established scalar consumer correction on the mixed stack. Its exposure in the original dispatch, upstream producer validity and any other BVH semantic gaps remain to be checked. The original parent-walk is not a cross-workgroup spin-wait; its uncapped traversal depends on acyclic parent links and returning-atomic retirement. Source inspection found the aliased carry input/output correctly uses distinct SSA values, so no carry-alias defect is claimed. <details><summary>Self-contained synthetic consumer fixture (no title code or assets)</summary> ```rust //! Local first-active-lane consumers across a widened scalar join. use super::host::{Dispatch, Host, Root, View}; use crate::native::{ComputeIo, RootParam, RootType, StageIo}; use windows::Win32::Graphics::Dxgi::*; fn program(wave64: bool, threads: u32) -> crate::NativeProgram { let (save, restore) = if wave64 { (0xBE8A_246A, 0x88FE_0A7E) } else { (0xBE8A_3C6A, 0x887E_0A7E) }; let words: [u32; 18] = [ 0xBE82_0300, // s_mov_b32 s2, s0 0xBE83_0380, // s_mov_b32 s3, 0 0xF408_0101, 0xFA00_0000, // s_load_dwordx4 s[4:7], s[2:3], null 0xBF8C_C07F, // s_waitcnt lgkmcnt(0) 0xBE89_0380, // s_mov_b32 s9, 0 0xD765_0001, 0x0001_00C1, // v_mbcnt_lo_u32_b32 v1, -1, 0 0x7D82_0287, // v_cmp_lt_u32 vcc, 7, v1 save, // s_and_saveexec s10, vcc 0xBF88_0001, // s_cbranch_execz join 0x7E12_0501, // v_readfirstlane_b32 s9, v1 restore, // join: restore EXEC 0x7E04_0209, // v_mov_b32 v2, s9; scalar result must reach skipped lanes too 0x3406_0082, // v_lshlrev_b32 v3, 2, v0 0xE070_1000, 0x8001_0203, // buffer_store_dword v2, v3, s[4:7], 0 offen 0xBF81_0000, // s_endpgm ]; crate::NativeProgram { stage: crate::HwStage::Cs, wave64, vgprs: 8, layout: vec![RootParam { root: RootType::Table, table_offset_dwords: 0, sgprs: 1, base_register: 0, user_data: 0, slot: 0, }], used: vec![], io: StageIo::Cs(ComputeIo { rsrc2: 1 << 1, threads: [threads, 1, 1] }), code: words.iter().flat_map(|w| w.to_le_bytes()).collect(), } } #[test] fn lab_widened_firstlane_respects_console_exec_on_one_host_wave() { let _one = super::valu_tests::ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner()); let host = Host::new(false).expect("real hardware required"); assert_eq!(host.target(), super::Target { lanes_min: 32, lanes_max: 32 }); unsafe { let factory = CreateDXGIFactory2::<IDXGIFactory4>(DXGI_CREATE_FACTORY_FLAGS(0)).unwrap(); let adapter = factory.EnumAdapterByLuid::<IDXGIAdapter1>(host.device.GetAdapterLuid()).unwrap(); assert_eq!(adapter.GetDesc1().unwrap().VendorId, 0x10de, "NVIDIA required"); } let mut validator = super::validator::Validator::load( super::validator::Validator::default_path().as_deref(), ).expect("mandatory DXIL validator"); let mut failures = Vec::new(); for (wave64, threads) in [(false, 32), (true, 32), (true, 64)] { let native = program(wave64, threads); let bytes = crate::dxbc::build(&[]); let container = crate::dxbc::Container::parse(&bytes).unwrap(); let ir = crate::ir::build(&native.code, native.wave64, native.vgprs).unwrap(); let structure = crate::structure::structure(&ir).unwrap(); let resources = crate::resource::track(&ir, &native.layout, native.stage, Some(&structure)).unwrap(); let io = crate::io::raise(&ir, &native).unwrap(); let mut shader = super::emit_with(&container, &native, &ir, &structure, &io, &resources, super::Options { view_marks: false, view_pages: false, target: host.target() }) .expect("bounded branch must translate"); validator.validate(&mut shader.dxil).expect("valid DXIL required"); let (root, pso) = host.compute_pipeline(&shader).expect("native PSO required"); let output = host.dispatch(&root, &pso, &Dispatch { roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords().max(1) as usize]))], views: &[View::RawUav(threads)], samplers: &[], groups: [1, 1, 1], }).expect("bounded real GPU readback"); assert_eq!(output.len(), 1); assert_eq!(output[0].len(), threads as usize); let wrong: Vec<_> = output[0].iter().copied().enumerate().filter(|(_, value)| *value != 8).collect(); eprintln!("firstlane wave{} threads{threads}: {}/{} wrong {wrong:?}; raw {:?}", if wave64 {64} else {32}, wrong.len(), threads, output[0]); if !wrong.is_empty() { failures.push((wave64, threads, wrong)); } } assert!(failures.is_empty(), "first-active-lane scalar consumers: {failures:?}"); } ``` </details> ### Original-program exposure and bounded title progress (2026-11-28 02:09 UTC) The original `5552dac6a2b7a1fd` program does exercise the corrected first-lane route: its allocator broadcasts at `0xd38` / block 51 and `0x2444` / block 147 both lower with `wide=true, trades=false`. With paged views and both write-mark settings, the unchanged original container passes mandatory SDK validation and real RTX 4060 native PSO creation (one local probe, two emitted variants). This was **not** original-program GPU dispatch. Temporary emission tracing was removed before the fresh release. The next usable title observation is stronger but still bounded: same dirty mixed `3ed7d725` integration with the disclosed local corrections, release SHA256 `3e1626216d5f88213c7f15f7906a82bfc9d9caede3420616505cfbd2ec0383b8`, Wine 11 / RTX 4060 Laptop / NVIDIA 590.48.1 / diagnostic-relaxed vkd3d `2576c0b4+`. In submission 7589, recording 17285, the formerly stalled **Dispatch(1055,1,1), CS5552** is command 2138. Native bottom-of-pipe checkpoints subsequently advanced **2830 → 3066 → 3853** at 2.22 / 4.22 / 6.22 seconds. Thus the GPU passed that dispatch shape and continued through later builder work, rather than staying at the old checkpoint. This is not a same-input BVH readback comparison, a completed-submission result, or proof that all builder output is correct. At the third sample `GetDeviceRemovedReason` reported `0x887a0005`; the external six-second pending-submission stop terminated the scope. Important diagnostic confound: `VKD3D_CONFIG=breadcrumbs` makes this vkd3d build use a five-second semaphore wait (`command.c:649–662`), whereas these checkpoint samples show continuing GPU progress. No kernel GPU/reset/OOM entries occurred in the measured interval. I am testing without the heavyweight checkpoint/breadcrumb diagnostics next, **retaining the independent six-second pending stop, four-second telemetry-query stop, all resource guards, and the unmodified title watchdog**; no native-driver timeout patch or higher resource limit. The last observed window was loading artwork; **no gameplay or watchdog-fix claim**. GPU peak 3696 MiB, available-RAM minimum 4156.5 MiB, disk minimum 10.701 GiB. An earlier corrected-build attempt hit the disk guard before this observation and is not counted as a shader result. Local evidence: `verify-original-bvh-firstlane-route-20261128T015126Z/`, `native-submission-trial-20261128T020530Z/{verified-summary.json,native-checkpoint-progress.json}`, and matching console/resources. Original game containers and imagery remain local. ### Checkpoint-free follow-through (2026-11-28 02:18 UTC) Same corrected mixed release as above (`3e1626216d5f88213c7f15f7906a82bfc9d9caede3420616505cfbd2ec0383b8`), with **only NV checkpoint/native breadcrumb diagnostics disabled**; external six-second pending/four-second query stops and all memory/GPU/disk guards retained. Wine11 / RTX4060Laptop / NVIDIA590.48.1 / disclosed diagnostic-relaxed vkd3d2576c0b4adfae4a+. - BVH-containing submission9050 **completed normally after4672ms**, native fence9050, removal reason0. Its capped CPU notes contain32CS`5552dac6a2b7a1fd` calls before truncation; this is not a complete command count or a BVH output comparison. - The title subsequently logged a520-draw frame. The actual window remained black; no gameplay claim. - Later submission9152 contained14native lists of subsequent graphics/compute work and remained pending at2163/4164/6165ms, completed fence9151, removal reason0 throughout. The external stop ended the run, not an observed title watchdog or native device-removal error. **Six seconds pending does not prove a deadlock**, nor does the CPU recording trace identify the active shader. - GPUpeak3786MiB, minimum availableRAM4294MiB, no kernel entries in the actual interval. No limits raised or title watchdog patched. Evidence: `.compat-runtime/logs/native-submission-trial-20261128T021431Z/{verified-summary.json,pending-recorded-commands.json}` and `20261128T021432Z-{console.log,resources.csv}`. Thus the earlier stalled BVH dispatch shape is no longer the observed stopping point after the narrow firstlane correction; full BVH correctness and a final colour frame remain unproved. The next local diagnostic uses independently verified, bounded per-list completion words rather than native breadcrumbs, preserving batch boundaries and native-fence retirement. Its real-GPU copy/order/reset fixture passed1/1 (128checked data words; old completion cannot cover a reset recording), not a title result. ### 28 Nov — later unfinished graphics interval, not renewed BVH attribution Follow-through on the same disclosed dirty Linux/Wine/RTX4060 Laptop integration with the local native-Wave32 EXEC/first-lane correction; diagnostic-relaxed vkd3d `2576c0b4adfae4a+`, not exact PR-head or stock certification. No further shader edit in these two observations. - `20261128T023221Z`, checkpoint-free per-list end words: the BVH-containing submission completed in **4799ms**. A later23-owned-list batch remained pending at6193ms, device removal reason0;18 list-end words had completed. The first unfinished recording has182 CPU notes:91 non-dropped indirect graphics calls,89 existing dropped-pipeline notes,2 barriers. Its first two graphics candidates are VS `25ebc92075b62822` with PS `1cd9bc634417a981` / `48e74d16cbfa45e3` (tiled lighting). This narrows the unfinished interval, **not the executing shader or a proven deadlock**; preceding transition/prelude work is not independently marked. User heard audio and saw a coloured prologue background without the title text. No visible gameplay. - An all-command progress-marker diagnostic (`20261128T024422Z`) stopped earlier: the six-second external rule triggered at6132ms on a BVH-containing batch, but that batch **completed at6442ms before termination**. Its last observed marker512 is the diagnostic note cap, not an isolated instruction. User reported no audio/prologue in this trial. Do not interpret this as recurrence of the fixed native32 first-lane failure. Instrumentation overhead is possible, not established by matched timing. - Narrowed markers to graphics only; actual-GPU copy/order/reset tests pass2/2 (256 copied words). At the user's request the external pending observation window is now30s, while memory/GPU/disk/telemetry safeguards and the title watchdog remain unchanged. A real CPU-held queue dependency verified15 samples through30s and completion after release; no deliberate shader hang. Selective graphics title attribution is still pending. Evidence retained locally: `native-submission-trial-20261128T023221Z/{verified-summary,pending-list-attribution}.json`, `native-submission-trial-20261128T024422Z/{verified-summary,pending-command-attribution}.json`, `verify-graphics-list-progress-20261128T025120Z/`, `verify-native-observation30-20261128T025407Z/`. New owner head `00a023481512edbf3ff1c22108aebbc772149e33` was noticed; these results do not test its two newer commits. ### 28 Nov —30second observation resolves a specific later graphics boundary The selective-graphics trial is now complete: `20261128T025611Z`, same disclosed corrected mixed production (not new `00a02348`), fresh intended GPU/HLE/app release32.52s. The BVH-containing submission completed in **5457ms**. Later submission8792 remained pending for **30066ms**, native device-removal reason0. Across all15 samples21/26 owned-list end markers completed; the first unfinished list stayed at **before-note3**, never reaching note4/end. That interval is the indirect graphics operation with VS `25ebc92075b62822` and PS **`48e74d16cbfa45e3`**, exact original name **`TL_PS_NoDir_PBR_MATERIAL_STANDARD_42ad1e50_Wrapped`**. The immediately preceding operation uses the same original argument address/VS with PS `1cd9bc634417a981`. MARKER_OUT reaching note3 brackets preceding work, but does not prove the preceding pixel shader ran (an indirect record can have zero instances), nor identify an instruction inside the stalled interval. Pipeline/binding/argument/transition work remains in scope—not yet a demonstrated NoDir translator defect. The title also raised its deliberate null-write watchdog (`+0x23cf683`, caller `+0x2215c35`) near03:00:32, before the external30s termination. Loading artwork120/150/180s; window210/240s black. GPUpeak4443MiB, minimum availableRAM4277.1MiB, scopepeak9096.5MiB, diskminimum10.214GiB; not a resource-floor stop. No kernel GPU/reset/OOM entry; inactive scope verified and only identified unheld backing reclaimed. Exact original1cd9/48e7 containers are retained locally with matching BLAKE3/SHA256; CPU-only disassembly parsed both (1.60s), no extracted game bytes/images published. Actionable next gate: isolate this exact NoDir indirect-draw interval, distinguish its bindings/arguments from pixel/helper-lane lowering, and require an offscreen consumer regression before another title retry. Do not bypass the watchdog, omit the pass, or infer rendering from completed BVH pipelines. Local evidence: `native-submission-trial-20261128T025611Z/{verified-summary,pending-command-attribution}.json`, `graphics-boundary-shaders-20261128T025611Z/containers.json`, `verify-graphics-boundary-shader-info-20261128T030313Z/`. ### 28 Nov — isolate our compute correction from pixel lowering (not an owner regression) The local `route_votes`/`route_lane_writes` additions described above were eligible for pixel programs, whereas the relevant console-lane setup is compute-only. These additions are absent from owner `1b1ef216`; this is a local-integration finding. The exact stalled-boundary NoDir pixel `48e74d16cbfa45e3` emitted 24 of 25 first-lane reads through our widened early return rather than the existing pixel helper-aware fallback. Both local route methods now require `StageIo::Cs`, preserving the compute correction and restoring the existing pixel route. All 25 reads now use the helper-aware fallback; marked/unmarked original emissions pass required SDK validation. That check does not dispatch the original shader. Fresh mixed-tree verification on the physical RTX 4060 Laptop/Wine 11, NVIDIA 590.48.1, diagnostic-relaxed vkd3d `2576c0b4adfae4a+`: **8/8 pass**, 7.39s compilation, 4.92s tests. This includes the original emission, an actual bounded pixel/quad draw, and six retained compute firstlane/scalar/lane-loop/writelane/vote/break consumer fixtures. Evidence: `verify-compute-stage-pixel-corrected-gates-20261128T031657Z/`. **No pixel-corruption or title-stall fix is established yet.** The bounded 16-round gradient waterfall passes on both sides. Two earlier local fixture failures used OR rather than AND-NOT when removing served EXEC lanes; those are invalid shader verdicts. The corrected baseline is `verify-pixel-helper-waterfall-corrected-control-20261128T031616Z/` (1/1). This change limits unintended scope, not a claimed matched bug fix. A fresh changed-stack title observation is pending; all resource guards, the 30s pending window and the title watchdog remain intact. No original shaders/assets are attached. ### 28 Nov — changed-stack title follow-through: former graphics boundary completes After the compute-only eligibility change above, a fresh shader/GPU/HLE/app diagnostics release (47.90 s) was run on the same Linux/Wine/RTX 4060 Laptop diagnostic stack. Mixed base `3ed7d725` + corrected `1b1ef216`; **not** the newer `00a02348` head. Same 30-second pending-submission cutoff, 9 GiB/512 MiB scope and global GPU/RAM/disk guards; title watchdog unchanged. The first material recording has the same three command headers as the earlier stalled recording: barrier, STD `1cd9bc634417a981`, NoDir `48e74d16cbfa45e3` (same VS `25ebc92075b62822`, original argument address and max-count). Both shaders freshly translated and created before their first bind. All **11 submissions containing those material draws completed, 31–208 ms**; the longest submission overall completed in **6,548 ms**, and completion continued through submission 8111. No watchdog/access-violation or kernel entry was observed before the stop. This is positive progress past the former boundary, **not a controlled-cache causal proof or general hang fix**. A recorded indirect draw and completed submission do not establish nonzero instance count, pixel execution, identical descriptor contents or correct shader output. The corrected synthetic pixel fixture still passes on both sides. The unchanged **10 GiB user-available disk floor**, not a pending timeout, stopped the run at 247.83 s (9.996 GiB; exit 137). GPU peak 4,229 MiB; available-RAM minimum 3,513.1 MiB; scope peak 9,216 MiB. The window remained black at 240 s. Native FFX input/output samples 1 and 8 remain raw RGB zero; depth sample 8 is populated (6.68% nonzero). There were still 782 unfinished pipeline builds. **No visible or controllable gameplay.** Four exact-inode/unheld backing files were reclaimed only after scope exit; guards were not weakened. Local evidence: `native-submission-trial-20261128T031948Z/{verified-summary,material-command-attribution,backing-cleanup,trace-compression}.json`, matching console/resources and the previous `025611Z` boundary evidence. Captures/assets remain local. Next diagnostic is completed lighting/HDR producer work and missing dependencies, not another unchanged black-frame retry. ### 28 Nov — actual intro scene captured; performance remains far from playable The same corrected local 1b1ef216-based mixed executable now displays an actual city/palm/coloured-light intro scene in the Wine client (040112Z, unmodified client capture at04:06:08Z), not merely an intermediate target. Lighting is severely wrong/dark, controllability unverified. This does **not** certify current owner00a02348 or canonical main. No images/assets published. [Full hardware/provenance report and sanitized profiling data](https://github.com/Marvisak/VIctory/issues/841#issuecomment-7234123748): RTX4060 Laptop8GiB/16GiB/Linux6.17/Wine11, same diagnostic-relaxed vkd3d caveat. A subsequent diagnostic run stopped at342.62s on the unchanged2048MiB global-RAM floor; its last capture remained black, so it is not a second visible-scene proof. Fifteen late host-present intervals have4.38s median/16.57s max; pipeline workers account for6.19 of7.80 active CPU cores despite758 native-library loads versus2made. Copy/wait costs and390unfinished pipelines remain. Recorded-command logging still produced103.49MiB, explicitly disclosed. Next: remove that diagnostic overhead without weakening the native-progress observer, time cache-load/PSO work and copy owners, then verify actual shading. Earlier failure history and all shader-safety gates remain intact.
TaynanGT commented 2026-11-27 19:59:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-27T19:59:14Z.


@carlosmegino The archived gfx1036 inputs keep b32cef7 and 1b1ef21 comparable for the Windows run. Please keep the LDS promotion on its own branch and record 658 → 388 as guest LDS operations.

@pickles976 That clears the 508-word first-lane mismatch and both Wave64 loop consumers on the RTX 4060 Laptop setup. I’ve recorded the 12 native-Wave32 mismatches separately for the Vice-Tay comparison.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227063223 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7227063223). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T19:59:14Z. --- @carlosmegino The archived gfx1036 inputs keep `b32cef7` and `1b1ef21` comparable for the Windows run. Please keep the LDS promotion on its own branch and record 658 → 388 as guest LDS operations. @pickles976 That clears the 508-word first-lane mismatch and both Wave64 loop consumers on the RTX 4060 Laptop setup. I’ve recorded the 12 native-Wave32 mismatches separately for the Vice-Tay comparison.
carlosmegino commented 2026-11-27 20:00:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T20:00:48Z.


@chippy01 — matched native Windows / RTX 5070 Ti validation completed at control b32cef72554981f89fad00fecc8358699518da8a and candidate 1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419. Physical adapter 0x10de/0x2c05, waves 32/32, driver 621.01, Rust 1.98.1, SDK 10.0.26100.0 DXIL validation, debug layer + GBV. Production operations unchanged; local test-only route markers.

Original archived check b32cef7 1b1ef216
firstlane_branch v10, inside branch 51 wrong 0
firstlane_branch v11, after reconvergence 457 wrong 0
other words of the ten cases 0 wrong 0
original #439 Wave64 ordinary consumer 1/64 wrong 0/64
original #439 Wave64 joined-latch consumer 1/64 wrong 0/64
original native Wave32 consumer 12/32 wrong 12/32, unchanged

All ten original masks / 10,240 words per arm were compared with the unchanged archived gfx1036 oracle, with complete readbacks and extra guard words. Your three new regressions also pass with strict hardware setup. The consumer invocation retains the original zero-error assertion and therefore still fails overall on the native Wave32 negative; it is not an all-passed suite. The exact SDK host warning about ignored COPY_DEST initial state was logged separately; no other warning/error was accepted.

Fallback check: both exact retained programs validate and create PSO, and their unsigned DXIL is byte-identical to b32cef7. Neither was dispatched; semantic correctness remains unverified. A separate synthetic 128-thread firstlane negative, unchanged instructions but all LDS reserved so trades cannot be allocated, takes unroute and executes with 64/128 wrong lanes. This confirms that successful fallback admission can retain incorrect answers; it does not establish that runtime error for the two real programs.

New LDS compatibility evidence: your head already runs Dathinel's intact original 64- and 96-thread fixtures correctly (448/448 and 672/672 words, 56 guards each). Our explicitly promoted forms instead have 128 and 192 wrong words. On promoted96, only the own/peer counter UAVs differ: counters 256/160 instead of 160/112; the other five UAVs and all guards match. Static emitted barriers increase 9→15 (64) and 5→11 (96). This sequence was correct on the paired reference, so we are not enabling it on halves or claiming a performance/partial-group coverage gain. Counting all present lanes per visit is consistent with the observed totals, but that is a hypothesis rather than a root-cause fix.

The attributed, test-only prototype and its backend-neutral analysis are now public at 03be2d0, with a synthetic failing repro/installer and full limits. Independent technical review requested (@PiloteCode @Dathinel too): especially the privacy/atomic/alias proof and the rewritten numeric-EXEC count on wave-wide regions. Is related work already planned? No competing scalar or mask correction is being posted.

The static applicability check proves none of the 59 archived Wave64 programs containing ds_add under the current narrow region/layout contract; it does not show those programs are inherently unoptimizable. No original BVH program was dispatched and no BVH PSO census, full 151-case rerun or water-path comparison was repeated. The remaining 20 cases, f32 order, #269/#320 and TaynanGT's water comparison stay separate. NEW-354 remains active. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227088196 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7227088196). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T20:00:48Z. --- @chippy01 — matched **native Windows / RTX 5070 Ti** validation completed at control `b32cef72554981f89fad00fecc8358699518da8a` and candidate `1b1ef2161a2f1cbcb46d7f72a7b24baf1303d419`. Physical adapter 0x10de/0x2c05, waves 32/32, driver 621.01, Rust 1.98.1, SDK 10.0.26100.0 DXIL validation, debug layer + GBV. Production operations unchanged; local test-only route markers. | Original archived check | b32cef7 | 1b1ef216 | |---|---:|---:| | firstlane_branch v10, inside branch | 51 wrong | **0** | | firstlane_branch v11, after reconvergence | 457 wrong | **0** | | other words of the ten cases | 0 wrong | 0 | | original #439 Wave64 ordinary consumer | 1/64 wrong | **0/64** | | original #439 Wave64 joined-latch consumer | 1/64 wrong | **0/64** | | original native Wave32 consumer | 12/32 wrong | **12/32, unchanged** | All ten original masks / 10,240 words per arm were compared with the unchanged archived gfx1036 oracle, with complete readbacks and extra guard words. Your three new regressions also pass with strict hardware setup. The consumer invocation retains the original zero-error assertion and therefore still fails overall on the native Wave32 negative; it is not an all-passed suite. The exact SDK host warning about ignored COPY_DEST initial state was logged separately; no other warning/error was accepted. **Fallback check:** both exact retained programs validate and create PSO, and their unsigned DXIL is byte-identical to b32cef7. Neither was dispatched; semantic correctness remains unverified. A separate synthetic 128-thread firstlane negative, unchanged instructions but all LDS reserved so trades cannot be allocated, takes `unroute` and executes with **64/128 wrong lanes**. This confirms that successful fallback admission can retain incorrect answers; it does not establish that runtime error for the two real programs. **New LDS compatibility evidence:** your head already runs Dathinel's intact original 64- and 96-thread fixtures correctly (448/448 and 672/672 words, 56 guards each). Our explicitly promoted forms instead have 128 and 192 wrong words. On promoted96, only the own/peer counter UAVs differ: counters **256/160 instead of 160/112**; the other five UAVs and all guards match. Static emitted barriers increase **9→15** (64) and **5→11** (96). This sequence was correct on the paired reference, so we are **not enabling it on halves or claiming a performance/partial-group coverage gain**. Counting all present lanes per visit is consistent with the observed totals, but that is a hypothesis rather than a root-cause fix. The attributed, test-only prototype and its backend-neutral analysis are now public at [03be2d0](https://github.com/carlosmegino/VIctory/tree/03be2d04130d62ea91997933e59d8ca6bfafe1ff), with a [synthetic failing repro/installer and full limits](https://github.com/carlosmegino/VIctory/blob/03be2d04130d62ea91997933e59d8ca6bfafe1ff/docs/private-lds-halves-result.md). **Independent technical review requested** (@PiloteCode @Dathinel too): especially the privacy/atomic/alias proof and the rewritten numeric-EXEC count on wave-wide regions. Is related work already planned? No competing scalar or mask correction is being posted. The static applicability check proves none of the 59 archived Wave64 programs containing ds_add under the current narrow region/layout contract; it does not show those programs are inherently unoptimizable. No original BVH program was dispatched and no BVH PSO census, full 151-case rerun or water-path comparison was repeated. The remaining 20 cases, f32 order, #269/#320 and TaynanGT's water comparison stay separate. NEW-354 remains active. AI-assisted with OpenAI Codex.
ColorMeBoom commented 2026-11-27 20:17:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-27T20:17:55Z.


@chippy01 RX 5700 XT (RDNA1) at 1b1ef21, merged onto main 63bcca4, same fw64 harness and gfx1036 oracle as my earlier runs:

  • Halves (host_wave32: true): 131 exact / 20 differ / 0 refused, the same counts as your RTX 3070 Ti and Radeon iGPU. firstlane_branch 10/10, readlane_branch 20/20, red_* all exact. What's left is break_loop 5, vote_loop 3, vote_loop_branch 4 and writelane_branch 8. 146 programs carry PSV0 32..32. The PR's halves tests: 39 passed, 0 failed.
  • host_wave32: false: byte-identical to main in 151 of 151 (59 exact). That's the form a 64-lane host (AMD) runs, and the PR leaves it alone. The same scalar-join problem is open there as #3562, with a fix for the per-lane form in #3593. It uses the same rule as your commit (the value of the last block in code order that some lane of the wave ran) and takes that form from 59 to 108 exact.

The two together: #3593 and this PR conflict textually in lower.rs (the mod lines, and the calls after a block's phis: wide_enter/lds_block_start and wave_scalars). Both sides are kept. There's one real interaction: wave_scalars has to leave halves alone (|| self.halves), because there console_lanes is set while the host wave is half the console's. With that, merged locally on this card: halves 131 / 20, byte-identical to this PR alone in 151 of 151, and host_wave32: false 108 / 43, byte-identical to #3593 alone. So whichever lands second needs that one-line guard; I'll add it to #3593 if this PR goes first. (The full suite on the local merge didn't run: Windows Application Control blocked that test binary.)

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227366847 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7227366847). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-27T20:17:55Z. --- @chippy01 RX 5700 XT (RDNA1) at `1b1ef21`, merged onto `main` `63bcca4`, same fw64 harness and gfx1036 oracle as my earlier runs: - **Halves (`host_wave32: true`): 131 exact / 20 differ / 0 refused**, the same counts as your RTX 3070 Ti and Radeon iGPU. `firstlane_branch` 10/10, `readlane_branch` 20/20, `red_*` all exact. What's left is `break_loop` 5, `vote_loop` 3, `vote_loop_branch` 4 and `writelane_branch` 8. 146 programs carry PSV0 32..32. The PR's `halves` tests: **39 passed, 0 failed**. - **`host_wave32: false`: byte-identical to `main` in 151 of 151 (59 exact)**. That's the form a 64-lane host (AMD) runs, and the PR leaves it alone. The same scalar-join problem is open there as #3562, with a fix for the per-lane form in **#3593**. It uses the same rule as your commit (the value of the last block in code order that some lane of the wave ran) and takes that form from 59 to 108 exact. **The two together:** #3593 and this PR conflict textually in `lower.rs` (the `mod` lines, and the calls after a block's phis: `wide_enter`/`lds_block_start` and `wave_scalars`). Both sides are kept. There's one real interaction: `wave_scalars` has to leave halves alone (`|| self.halves`), because there `console_lanes` is set while the host wave is half the console's. With that, merged locally on this card: halves **131 / 20**, byte-identical to this PR alone in 151 of 151, and `host_wave32: false` **108 / 43**, byte-identical to #3593 alone. So whichever lands second needs that one-line guard; I'll add it to #3593 if this PR goes first. (The full suite on the local merge didn't run: Windows Application Control blocked that test binary.) AI use: Claude Code (Claude Opus 5.5).
chippy01 commented 2026-11-28 02:32:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-28T02:32:59Z.


@carlosmegino @pickles976 @TaynanGT thanks for the matched runs on 1b1ef21. Two more commits are up (claimed in #1633). The first answers the fallback finding; the second closes the last gap to #439 apart from the tiled shapes.

The first-lane fallback. carlosmegino is right about this. If a program runs in halves only for its first-lane reads and can't run there, it keeps main's form: each 32-lane host wave reads its own first lane, and the DXIL is byte-identical to b32cef7, as you found. Two title programs took this path:

  • One reads first lanes only inside the compiler's scalarization loops: read the first lane, compare it with each lane's own value, let the matching lanes use it, drop them, repeat. When each host wave goes through its own lanes this way, every lane still gets the console's result.
  • The other reads first lanes of values it then uses as scalar-load addresses, which the console compiler keeps the same in every lane. It fell back because its LDS takes the host's whole 32 KiB, leaving no room for the trade.

The second one is a real limit, and carlosmegino's synthetic negative hits exactly that limit. Shaders: in halves, a trade borrows its slots from an LDS that fills the host's 32 KiB removes it. When the slots don't fit beside the program's LDS, the trade borrows the program's first LDS dwords: a barrier, each thread saves one dword, a barrier, the trade, each thread puts its dword back, and a final barrier. Only those programs pay for the three extra barriers.

A new test, a_trade_beside_a_full_lds_borrows_its_slots_and_gives_them_back_on_every_gpu, has the same shape as the negative: a first-lane read of data across the halves, with every byte of LDS reserved. Every thread writes its own LDS dword before the trade and reads it back after. It runs in groups of 48, 64 and 128; the 128-thread group is in halves only because of its first-lane read. On the RTX 3070 Ti and the Radeon iGPU, 0 lanes differ and every LDS value is intact. Before the commit it was refused. In the title, the hit-detection program now runs in halves instead of falling back, and the two programs refused for the same reason now translate.

Descriptors chosen where the whole group goes into a region. The commit Shaders: in halves, a descriptor chosen where the whole group goes into a wave-wide region folds as the wave's scalar translates the two remaining programs #439 handled and this didn't. A scalar branch sends the whole group straight to a region's last block, and that block's store picks its descriptor by control flow. On the console that descriptor is scalar data the wave holds, so its heap index now folds the way a scalar phi does. A new case in the whole-group region tests has this shape: in halves on both GPUs and as one wave64 on the Radeon, 0 lanes differ. #439 now translates only the 4 tiled group shapes this refuses, and its split form gets their thread ids wrong on NVIDIA.

Title (translate --list --wave32 --pipelines, same four inputs, RTX 3070 Ti): compute pipelines made 2,723 at 1b1ef21 → 2,725 with the descriptor commit → 2,727 with the borrowed slots, of 2,763 (25,750 pipelines in all), none lost on the way. One program still falls back for its first lanes: they're all in the compiler's scalarization loops.

Native wave32. The 12/32 consumer is a wave32 program, and those don't run in halves. On any host they run in main's per-lane form. There, a scalar after a lane-dependent loop is each lane's own value, and reading a lane that has already left the loop returns nothing. That's what #269 fixes for scalars and #320 for lane reads where lanes branch differently, so fixing it here would duplicate their work.

LDS counter promotion: nothing related is planned on our side.

AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232437209 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7232437209). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-28T02:32:59Z. --- @carlosmegino @pickles976 @TaynanGT thanks for the matched runs on `1b1ef21`. Two more commits are up (claimed in #1633). The first answers the fallback finding; the second closes the last gap to #439 apart from the tiled shapes. **The first-lane fallback.** carlosmegino is right about this. If a program runs in halves only for its first-lane reads and can't run there, it keeps `main`'s form: each 32-lane host wave reads its own first lane, and the DXIL is byte-identical to `b32cef7`, as you found. Two title programs took this path: - One reads first lanes only inside the compiler's scalarization loops: read the first lane, compare it with each lane's own value, let the matching lanes use it, drop them, repeat. When each host wave goes through its own lanes this way, every lane still gets the console's result. - The other reads first lanes of values it then uses as scalar-load addresses, which the console compiler keeps the same in every lane. It fell back because its LDS takes the host's whole 32 KiB, leaving no room for the trade. The second one is a real limit, and carlosmegino's synthetic negative hits exactly that limit. **Shaders: in halves, a trade borrows its slots from an LDS that fills the host's 32 KiB** removes it. When the slots don't fit beside the program's LDS, the trade borrows the program's first LDS dwords: a barrier, each thread saves one dword, a barrier, the trade, each thread puts its dword back, and a final barrier. Only those programs pay for the three extra barriers. A new test, `a_trade_beside_a_full_lds_borrows_its_slots_and_gives_them_back_on_every_gpu`, has the same shape as the negative: a first-lane read of data across the halves, with every byte of LDS reserved. Every thread writes its own LDS dword before the trade and reads it back after. It runs in groups of 48, 64 and 128; the 128-thread group is in halves only because of its first-lane read. On the RTX 3070 Ti and the Radeon iGPU, 0 lanes differ and every LDS value is intact. Before the commit it was refused. In the title, the hit-detection program now runs in halves instead of falling back, and the two programs refused for the same reason now translate. **Descriptors chosen where the whole group goes into a region.** The commit **Shaders: in halves, a descriptor chosen where the whole group goes into a wave-wide region folds as the wave's scalar** translates the two remaining programs #439 handled and this didn't. A scalar branch sends the whole group straight to a region's last block, and that block's store picks its descriptor by control flow. On the console that descriptor is scalar data the wave holds, so its heap index now folds the way a scalar phi does. A new case in the whole-group region tests has this shape: in halves on both GPUs and as one wave64 on the Radeon, 0 lanes differ. #439 now translates only the 4 tiled group shapes this refuses, and its split form gets their thread ids wrong on NVIDIA. **Title** (`translate --list --wave32 --pipelines`, same four inputs, RTX 3070 Ti): compute pipelines made 2,723 at `1b1ef21` → 2,725 with the descriptor commit → **2,727** with the borrowed slots, of 2,763 (25,750 pipelines in all), none lost on the way. One program still falls back for its first lanes: they're all in the compiler's scalarization loops. **Native wave32.** The 12/32 consumer is a wave32 program, and those don't run in halves. On any host they run in main's per-lane form. There, a scalar after a lane-dependent loop is each lane's own value, and reading a lane that has already left the loop returns nothing. That's what #269 fixes for scalars and #320 for lane reads where lanes branch differently, so fixing it here would duplicate their work. **LDS counter promotion:** nothing related is planned on our side. AI-assisted (Co-authored by Claude Opus 5.5) and measured on my own machine.
chippy01 commented 2026-11-28 02:55:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-28T02:55:31Z.


Btw if someone wants to contribute to this PR with tests or commits you are more than welcome. 🫡

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232681497 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7232681497). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-28T02:55:31Z. --- Btw if someone wants to contribute to this PR with tests or commits you are more than welcome. 🫡
andrewpozdnakov7-jpg commented 2026-11-28 03:09:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T03:09:45Z.


I checked the new 00a023481512edbf3ff1c22108aebbc772149e33 head and added an LDS-boundary regression. Test commit ac857bb extends the PR's existing first-lane and LDS readback test. It compares the last LDS size that fits separate trade slots, one dword beyond that size, and the full 32 KiB case, for groups of 48, 64 and 128 threads.

A separate app-local WARP 1.0.22 run using Agility 1.620.2 validated all nine shaders through DXIL validation and PSO creation. All 1,440 output words matched the expected first-lane result and restored LDS values. The halves filter reported 41 passed, including the temporary WARP test. The physical-adapter sections still skipped on this host. The committed test compiled with cargo check -p victory-shader --release --tests --locked.

The CI run for this PR head passed both Clippy stages and stopped at frame::tests::waits_end_on_ticks_and_count_frames. The branch also preserves the exact #2877 virtual-clock head through merge 4a1c1c3. The extracted frame module passed 24 repeated test-process runs on both configurations, with three tests per run on the combined branch. #2877 can be considered separately from the shader regression.

Please retain the Git authors on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding my test into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232842209 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7232842209). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T03:09:45Z. --- I checked the new `00a023481512edbf3ff1c22108aebbc772149e33` head and added an LDS-boundary regression. [Test commit `ac857bb`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/ac857bbcd6738d1c7f15077cbbb3db2393252ec6) extends the PR's existing first-lane and LDS readback test. It compares the last LDS size that fits separate trade slots, one dword beyond that size, and the full 32 KiB case, for groups of 48, 64 and 128 threads. A separate app-local WARP 1.0.22 run using Agility 1.620.2 validated all nine shaders through DXIL validation and PSO creation. All **1,440 output words** matched the expected first-lane result and restored LDS values. The `halves` filter reported 41 passed, including the temporary WARP test. The physical-adapter sections still skipped on this host. The committed test compiled with `cargo check -p victory-shader --release --tests --locked`. The [CI run for this PR head](https://github.com/Marvisak/VIctory/actions/runs/46098873886/job/140836504483) passed both Clippy stages and stopped at `frame::tests::waits_end_on_ticks_and_count_frames`. The branch also preserves the exact #2877 virtual-clock head through merge `4a1c1c3`. The extracted frame module passed 24 repeated test-process runs on both configurations, with three tests per run on the combined branch. #2877 can be considered separately from the shader regression. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding my test into another commit. AI-assisted with OpenAI Codex.
pickles976 commented 2026-11-28 05:48:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-28T05:48:54Z.


Verified exact production head 00a023481512edbf3ff1c22108aebbc772149e33 on RTX 4060 Laptop / NVIDIA 590.48.1, Linux 6.17 / Wine 11, 32-lane host. NVIDIA masking disabled; diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+ (not stock certification).

  • Original title compute containers b538852f58c99307 (ScreenProbes ActivateProbes) and d3e5b737ea7cc150 (ClusterLightsWorldSpace): 2/2 emitted, mandatory SDK DXIL validated, native PSOs created, one worker. No original-program dispatch or title rendering claim. Fresh intended-tree release compile 46.90 s; entire guarded command 51.53 s.
  • Existing whole-group region translation/readback fixtures plus full-32KiB-LDS preservation fixture: 3/3 passed, 0 ignored, 11.29 s after fresh 6.91 s compilation. Test-only strengthening requires the physical RTX4060/32-lane adapter, SDK validation and complete UAV output lengths. Groups 48/64/128 preserve the owner's complete expected first-lane and LDS values. Native Wave64 controls are expected to refuse on this 32-lane host; not WARP coverage.

Evidence: verify-descriptor-owner-original-programs-20261128T054110Z/ and verify-descriptor-owner-region-lds-20261128T054702Z/. No game assets/images uploaded.

Integration caveat: our older, heavily mixed runtime with local scalar/loop corrections plus only 7103ccfc still fails an SDK dominance check (into 48 false, icmp result used by a non-dominated xor) and does not validate those originals. A retained older local-fixes control has the same synthetic failure. The clean exact owner head above passes: this is not a reported regression in your current head. We are isolating our integration difference before promoting it; the partial port is not a runtime recommendation.

Follow-up on the admission boundary: the clean head's ScreenProbes success is not evidence that the cross-half meeting was established. lower.rs:162-167 permits wide.unroute() after failed first-lane-only halves lowering, then retries the plain route. Our older mixed runtime deliberately retains the refusal instead of that retry. The original program has one v_readfirstlane_b32 at 0x110; its missing scalar later surfaces as a refusal at 0x358. We have not executed that original program, so this observation alone does not establish wrong output on the clean head. A read-site/guard-scoped uniformity proof or original-program execution oracle is still needed before treating the admission result as exact Wave64 semantics.

Separately, the mixed-stack ClusterLightsWorldSpace forward-reference panic was narrowed to entry-mask replacement scope plus stale IR context during deferred boolean construction. After a local correction it emits and creates a native NVIDIA PSO, but mandatory SDK validation still says Module bitcode is invalid (0/1 validation). We have not promoted it to a title run. Evidence: verify-mixed-cluster-lights-location-scope-20261128T061631Z/. This remains a local integration defect, not a clean-head regression.

Mixed-runtime follow-through, 28 Nov 06:53 UTC

The local scoped-SSA correction now passes the original ClusterLightsWorldSpace d3e5b737ea7cc150: one emission, one required SDK validation, one native NVIDIA PSO (--host-lanes 32-32); fresh intended-tree compile10.11s, guarded13.05s. No original-program dispatch. Log verify-mixed-cluster-lights-final-20261128T065230Z/. This supersedes the earlier mixed-stack validator failure, not the historical log. The fix carries explicit predecessor IR context through deferred Boolean lowering and resolves composite leaves through the valid entry phis; it does not relax mask or wave guards.

Ten retained consumer checks passed. The extended composite-mask region GPU fixture now also passes after correcting our lab fixture (an accidentally encoded32-bit OR, then a mask/data initialization and an unsupported elsewhere-mask consumer). Final fixture retains the composite join, uses a real false mask, and explicitly intersects with current EXEC before counting; identical console expectations are preserved. Final evidence verify-mixed-composite-mask-consumer-20261128T065308Z/; earlier failed probe attempts are not owner regressions.

On exact production 00a023481512edbf3ff1c22108aebbc772149e33, two additional synthetic scalar-splat consumers—confined and reconverging—both SDK-validate and return all64 expected words on physical RTX4060 (2/2, fresh6.70s compile,1.29s tests; verify-owner-active-splat-consumers-20261128T064600Z/). These simple programs do not establish the original ScreenProbes SMEM/indirect-exit contract. That original remains refused in the mixed runtime; the generic plain-wave fallback was not imported. No claim of a reproduced fault in those two positive controls.

Both ClusterLights and ScreenProbes refusals were already logged in our actual rendered-intro baseline 20261128T051844Z; clearing only ClusterLights is a changed rendering candidate, not a claim that all lighting is fixed. Same Wine11/NVIDIA590.48.1/diagnostic-relaxed-vkd3d conditions; all safety cutoffs remain intact. No title result for this correction yet.

28 Nov runtime safety follow-through: the same mixed release with the validated local descriptor-entry correction rendered intro palms/buildings/lights, then a 25-list native submission stopped completing. Execute/Signal/event arming all returned; NVIDIA logged Xid109/CTX SWITCH TIMEOUT about 6 seconds into the completion wait, and the title watchdog followed. No guard threshold or telemetry timeout fired. This is not attributed to ClusterLights, this PR, or the last shader compiled: background pipeline workers continued after the already-recorded batch was submitted. The performance-mode trace had no per-command/list identities.

Full measured profile, exact binary/provenance and chronology: https://github.com/Marvisak/VIctory/issues/841#issuecomment-7234510162 . Title/GPU trials are parked, with all shader/builder/resource guards intact. The local observer now optionally snapshots bounded, already-retained pipeline names before Execute and reports them on a pending wait, rather than relying only on the unreachable post-wait slow-list report. Its two CPU-only ownership/bounds/nonblocking tests pass; actual native-pending activation is not yet tested. This supplies candidate provenance for a separately justified changed-stack experiment, not a GPU-hang fix or permission to rerun unchanged.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234901498 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7234901498). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-28T05:48:54Z. --- Verified exact production head `00a023481512edbf3ff1c22108aebbc772149e33` on RTX 4060 Laptop / NVIDIA 590.48.1, Linux 6.17 / Wine 11, 32-lane host. NVIDIA masking disabled; diagnostic-relaxed-vtable vkd3d `2576c0b4adfae4a+` (not stock certification). - Original title compute containers `b538852f58c99307` (ScreenProbes ActivateProbes) and `d3e5b737ea7cc150` (ClusterLightsWorldSpace): **2/2 emitted, mandatory SDK DXIL validated, native PSOs created**, one worker. No original-program dispatch or title rendering claim. Fresh intended-tree release compile 46.90 s; entire guarded command 51.53 s. - Existing whole-group region translation/readback fixtures plus full-32KiB-LDS preservation fixture: **3/3 passed**, 0 ignored, 11.29 s after fresh 6.91 s compilation. Test-only strengthening requires the physical RTX4060/32-lane adapter, SDK validation and complete UAV output lengths. Groups 48/64/128 preserve the owner's complete expected first-lane and LDS values. Native Wave64 controls are expected to refuse on this 32-lane host; not WARP coverage. Evidence: `verify-descriptor-owner-original-programs-20261128T054110Z/` and `verify-descriptor-owner-region-lds-20261128T054702Z/`. No game assets/images uploaded. Integration caveat: our older, heavily mixed runtime with local scalar/loop corrections plus only `7103ccfc` still fails an SDK dominance check (`into 48 false`, icmp result used by a non-dominated xor) and does not validate those originals. A retained older local-fixes control has the same synthetic failure. The clean exact owner head above passes: **this is not a reported regression in your current head**. We are isolating our integration difference before promoting it; the partial port is not a runtime recommendation. Follow-up on the admission boundary: the clean head's ScreenProbes success is **not evidence that the cross-half meeting was established**. `lower.rs:162-167` permits `wide.unroute()` after failed first-lane-only halves lowering, then retries the plain route. Our older mixed runtime deliberately retains the refusal instead of that retry. The original program has one `v_readfirstlane_b32` at `0x110`; its missing scalar later surfaces as a refusal at `0x358`. We have not executed that original program, so this observation alone does not establish wrong output on the clean head. A read-site/guard-scoped uniformity proof or original-program execution oracle is still needed before treating the admission result as exact Wave64 semantics. Separately, the mixed-stack ClusterLightsWorldSpace forward-reference panic was narrowed to entry-mask replacement scope plus stale IR context during deferred boolean construction. After a local correction it emits and creates a native NVIDIA PSO, but mandatory SDK validation still says `Module bitcode is invalid` (0/1 validation). We have **not** promoted it to a title run. Evidence: `verify-mixed-cluster-lights-location-scope-20261128T061631Z/`. This remains a local integration defect, not a clean-head regression. ### Mixed-runtime follow-through, 28 Nov 06:53 UTC The local scoped-SSA correction now passes the **original ClusterLightsWorldSpace `d3e5b737ea7cc150`**: one emission, one required SDK validation, one native NVIDIA PSO (`--host-lanes 32-32`); fresh intended-tree compile10.11s, guarded13.05s. No original-program dispatch. Log `verify-mixed-cluster-lights-final-20261128T065230Z/`. This supersedes the earlier mixed-stack validator failure, not the historical log. The fix carries explicit predecessor IR context through deferred Boolean lowering and resolves composite leaves through the valid entry phis; it does not relax mask or wave guards. Ten retained consumer checks passed. The extended composite-mask region GPU fixture now also passes after correcting our lab fixture (an accidentally encoded32-bit OR, then a mask/data initialization and an unsupported elsewhere-mask consumer). Final fixture retains the composite join, uses a real false mask, and explicitly intersects with current EXEC before counting; identical console expectations are preserved. Final evidence `verify-mixed-composite-mask-consumer-20261128T065308Z/`; earlier failed probe attempts are not owner regressions. On exact production `00a023481512edbf3ff1c22108aebbc772149e33`, two additional **synthetic scalar-splat consumers**—confined and reconverging—both SDK-validate and return all64 expected words on physical RTX4060 (2/2, fresh6.70s compile,1.29s tests; `verify-owner-active-splat-consumers-20261128T064600Z/`). These simple programs do not establish the original ScreenProbes SMEM/indirect-exit contract. That original remains refused in the mixed runtime; the generic plain-wave fallback was not imported. No claim of a reproduced fault in those two positive controls. Both ClusterLights and ScreenProbes refusals were already logged in our actual rendered-intro baseline `20261128T051844Z`; clearing only ClusterLights is a changed rendering candidate, not a claim that all lighting is fixed. Same Wine11/NVIDIA590.48.1/diagnostic-relaxed-vkd3d conditions; all safety cutoffs remain intact. No title result for this correction yet. 28 Nov runtime safety follow-through: the same mixed release with the validated local descriptor-entry correction rendered intro palms/buildings/lights, then a 25-list native submission stopped completing. Execute/Signal/event arming all returned; NVIDIA logged Xid109/CTX SWITCH TIMEOUT about 6 seconds into the completion wait, and the title watchdog followed. No guard threshold or telemetry timeout fired. This is **not attributed to ClusterLights, this PR, or the last shader compiled**: background pipeline workers continued after the already-recorded batch was submitted. The performance-mode trace had no per-command/list identities. Full measured profile, exact binary/provenance and chronology: https://github.com/Marvisak/VIctory/issues/841#issuecomment-7234510162 . Title/GPU trials are parked, with all shader/builder/resource guards intact. The local observer now optionally snapshots bounded, already-retained pipeline names before Execute and reports them on a pending wait, rather than relying only on the unreachable post-wait slow-list report. Its two CPU-only ownership/bounds/nonblocking tests pass; actual native-pending activation is not yet tested. This supplies candidate provenance for a separately justified changed-stack experiment, not a GPU-hang fix or permission to rerun unchanged.
ColorMeBoom commented 2026-11-28 06:57:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-28T06:57:41Z.


@chippy01 @andrewpozdnakov7-jpg Physical run of the new head and the LDS-boundary test, on a card that has both wave sizes: RX 5700 XT (Navi 10, RDNA1, 32–64 lanes, driver 32.0.21045.29003, Windows 11 26200). The hardware sections ran; nothing skipped.

  • Head 00a0234:

    • full victory-shader --lib --features host: 336 passed, 0 failed, 3 ignored;
    • halves filter: 40 passed;
    • random_wave64_programs_in_halves_match_one_wave64: 64 of 64 compared against one wave64 on the same card, none refused.
  • andrewpozdnakov7-jpg's ac857bb (on 00a0234): a_trade_beside_a_full_lds_borrows_its_slots_and_gives_them_back_on_every_gpu passes on the hardware adapter. That covers groups of 48, 64 and 128 at the last LDS size that fits separate trade slots, one dword past it, and the full 32 KiB. The whole halves filter: 40 passed.

  • @Lyrnc's 151 hand-written wave64 cases, each compared lane by lane with a gfx1036:

    • halves at 00a0234: 131 / 151 exact, every output identical to 1b1ef21;
    • native WaveSize(64): 59 / 151, unchanged.

    So the two new commits don't move any existing case, and the remaining 20 (break_loop, vote_loop*, writelane_branch) are as before.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235625461 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7235625461). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-28T06:57:41Z. --- @chippy01 @andrewpozdnakov7-jpg Physical run of the new head and the LDS-boundary test, on a card that has both wave sizes: RX 5700 XT (Navi 10, RDNA1, 32–64 lanes, driver 32.0.21045.29003, Windows 11 26200). The hardware sections ran; nothing skipped. - **Head `00a0234`:** - full `victory-shader --lib --features host`: 336 passed, 0 failed, 3 ignored; - `halves` filter: 40 passed; - `random_wave64_programs_in_halves_match_one_wave64`: 64 of 64 compared against one wave64 on the same card, none refused. - **andrewpozdnakov7-jpg's `ac857bb`** (on `00a0234`): `a_trade_beside_a_full_lds_borrows_its_slots_and_gives_them_back_on_every_gpu` passes on the hardware adapter. That covers groups of 48, 64 and 128 at the last LDS size that fits separate trade slots, one dword past it, and the full 32 KiB. The whole `halves` filter: 40 passed. - **@Lyrnc's 151 hand-written wave64 cases, each compared lane by lane with a gfx1036:** - halves at `00a0234`: **131 / 151** exact, every output identical to `1b1ef21`; - native `WaveSize(64)`: 59 / 151, unchanged. So the two new commits don't move any existing case, and the remaining 20 (`break_loop`, `vote_loop*`, `writelane_branch`) are as before. AI use: Claude Code (Claude Opus 5.5).
andrewpozdnakov7-jpg commented 2026-11-28 06:59:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T06:59:04Z.


Thanks, ColorMeBoom. Your RX 5700 XT result adds a native hardware pass for all three LDS boundaries in the test-only commit ac857bb on 00a0234. My earlier run used WARP. The separate 151-case comparison applies to the reported head and remains at 131 exact matches.

chippy01 can pick up the LDS-boundary test from the branch linked in the original test report.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the test into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235639529 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7235639529). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:59:04Z. --- Thanks, ColorMeBoom. Your [RX 5700 XT result](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7235625461) adds a native hardware pass for all three LDS boundaries in the test-only commit `ac857bb` on `00a0234`. My earlier run used WARP. The separate 151-case comparison applies to the reported head and remains at 131 exact matches. chippy01 can pick up the LDS-boundary test from the branch linked in [the original test report](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7232842209). Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the test into another commit. AI-assisted with OpenAI Codex.
chippy01 commented 2026-11-28 14:54:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by chippy01 on 2026-11-28T14:54:10Z.


@neonbyte1 Sorry to bother you but I looked at your work and you look like a man of culture, whenever you have time could you take a look at this work ( #2633 ) and benchmark it on your hardware?
I know this is a huge PR but without constant merges I tried to collect all the common knowledge achieved by the whole contributors and incrementally build this whole beefy PR.
The idea behind this was to create a contribution to the code to directly solve the problems connected to running wave64 instructions onto wave32 systems whithout using workarounds.
I have also to really thank whole the people who worked on #439 and gave me a really good starting point on what had to be done.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241025464 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7241025464). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-28T14:54:10Z. --- @neonbyte1 Sorry to bother you but I looked at your work and you look like a man of culture, whenever you have time could you take a look at this work ( #2633 ) and benchmark it on your hardware? I know this is a huge PR but without constant merges I tried to collect all the common knowledge achieved by the whole contributors and incrementally build this whole beefy PR. The idea behind this was to create a contribution to the code to directly solve the problems connected to running wave64 instructions onto wave32 systems whithout using workarounds. I have also to really thank whole the people who worked on #439 and gave me a really good starting point on what had to be done.
neonbyte1 commented 2026-11-28 14:56:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T14:56:38Z.


@chippy01 happy to. Here's what I'll run on the RTX 5090 (Linux, Wine 11.22 + vkd3d-proton) and post here:

  1. Shader census: your head 00a023481 against its base 63bcca43c, over the whole shader pack. For each, how many programs translate, how many are refused and for which reason, and whose wave size changes.
  2. Your device tests on this card, plus one case we found yesterday in the console flow. One half's UAV write and the other half's later read of the same address aren't ordered on 32-lane hosts unless the halves meet with a UAV fence. Up to 53 % of reads came back stale in our synthetic test. I'll check whether your halves form has the same exposure.
  3. In game: A-B-A-B, 420 s per run, your head against its base, with frame time, refusals and a picture check.

For context: my fork's integration takes the other route (#439/#320's console flow, plus pair meetings for groups of several console waves, #3683), so I can also say how the two compare on the same title.

The census and tests come first; the game runs follow in our queue today or tomorrow morning.

Edit: changed the priority schedule, results should arrive within the next few hours.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241057033 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7241057033). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-28T14:56:38Z. --- @chippy01 happy to. Here's what I'll run on the RTX 5090 (Linux, Wine 11.22 + vkd3d-proton) and post here: 1. **Shader census:** your head `00a023481` against its base `63bcca43c`, over the whole shader pack. For each, how many programs translate, how many are refused and for which reason, and whose wave size changes. 2. **Your device tests on this card**, plus one case we found yesterday in the console flow. One half's UAV write and the other half's later read of the same address aren't ordered on 32-lane hosts unless the halves meet with a UAV fence. Up to 53 % of reads came back stale in our synthetic test. I'll check whether your halves form has the same exposure. 3. **In game:** A-B-A-B, 420 s per run, your head against its base, with frame time, refusals and a picture check. For context: my fork's integration takes the other route (#439/#320's console flow, plus pair meetings for groups of several console waves, #3683), so I can also say how the two compare on the same title. The census and tests come first; the game runs follow in our queue today or tomorrow morning. Edit: changed the priority schedule, results should arrive within the next few hours. _AI-assisted (Claude); measured on my machine, no game data shared._
neonbyte1 commented 2026-11-28 15:30:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T15:30:56Z.


@chippy01 first results from the RTX 5090 (Linux, Wine 11.22 + vkd3d-proton). Your head 00a023481 (A) against its base 63bcca43c (B), diagnostics builds, no patches needed to build either under Wine.

Your tests: all 34 of the PR's halves tests pass on the 5090, in 51 s.

Census over the whole shader pack (26 084 programs; the compute side, which is what this PR is about):

compute programs emitted refused by the translator note
B (base) 2,658 of 2,682 24 396 are declared WaveSize(64), which a 32-lane NVIDIA device then refuses at pipeline creation
A (this PR) 2,651 of 2,682 31 388 move from WaveSize(64) to 32, so none of them are refused by the device for wave size

A's 31 translator refusals: 13 lane-mask join of an untracked mask, 6 tiled group shapes, 5 v_cvt_f32_f64, 4 lane mask read as data, 1 divergent lane mask, 1 descriptor read only as data, 1 descriptor address read as data. 7 of them are halves-specific.

For comparison, my fork's integration (#439/#320's console flow + #3683's pair meetings) emits 2,629. Your halves translate 42 programs the console flow refuses: 15 whole-wave sections, 13 implicit-derivative samples in the console flow, 12 with a title barrier not met, 1 value used before the meeting, 1 v_permlanex16_b32. The console flow translates 20 that the halves refuse (13 lane-mask joins of an untracked mask, 5 tiled groups, 1 mask off the meeting, 1 descriptor address). So the two cover different gaps.

One correctness point to check: when one half writes a UAV address that the other half reads later in program order, the emitted shader has no barrier between the halves (0 dx.op.barrier). On the console that's program order inside one wave. In the console flow we measured up to 53 % stale reads for exactly this pattern before adding a UAV fence (#439, #3683). A port of that test to your halves saw no stale read in the 96 samples it could take on the 5090, but nothing orders the two halves, so I'd expect it to show up under load. The test and the fix shape are in https://github.com/neonbyte1/VIctory/tree/suggest/uav-order-all-forms.

In game, not yet: the base 63bcca43c alone doesn't start in our Wine setup; it dies 8 s in with a stack overflow, so upstream main without the integration PRs never ran here. One run of your head crashed in vkCreateComputePipelines right after translating program 2f03a2df10503cef. That was one run, and a probe that creates only that pipeline from both builds is queued to see whether it's deterministic. For an in-game number I'm looking at merging the halves onto my fork's integration as a fallback for exactly the programs the console flow refuses (+42 programs, +1.6 % of compute).

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241524768 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7241524768). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-28T15:30:56Z. --- @chippy01 first results from the RTX 5090 (Linux, Wine 11.22 + vkd3d-proton). Your head `00a023481` (A) against its base `63bcca43c` (B), diagnostics builds, no patches needed to build either under Wine. **Your tests:** all 34 of the PR's halves tests pass on the 5090, in 51 s. **Census over the whole shader pack** (26 084 programs; the compute side, which is what this PR is about): | | compute programs emitted | refused by the translator | note | |---|---|---|---| | B (base) | 2,658 of 2,682 | 24 | 396 are declared `WaveSize(64)`, which a 32-lane NVIDIA device then refuses at pipeline creation | | **A (this PR)** | **2,651 of 2,682** | **31** | 388 move from `WaveSize(64)` to 32, so none of them are refused by the device for wave size | A's 31 translator refusals: 13 lane-mask join of an untracked mask, 6 tiled group shapes, 5 `v_cvt_f32_f64`, 4 lane mask read as data, 1 divergent lane mask, 1 descriptor read only as data, 1 descriptor address read as data. 7 of them are halves-specific. For comparison, my fork's integration (#439/#320's console flow + #3683's pair meetings) emits 2,629. **Your halves translate 42 programs the console flow refuses**: 15 whole-wave sections, 13 implicit-derivative samples in the console flow, 12 with a title barrier not met, 1 value used before the meeting, 1 `v_permlanex16_b32`. The console flow translates 20 that the halves refuse (13 lane-mask joins of an untracked mask, 5 tiled groups, 1 mask off the meeting, 1 descriptor address). So the two cover different gaps. **One correctness point to check:** when one half writes a UAV address that the other half reads later in program order, the emitted shader has no barrier between the halves (0 `dx.op.barrier`). On the console that's program order inside one wave. In the console flow we measured up to 53 % stale reads for exactly this pattern before adding a UAV fence (#439, #3683). A port of that test to your halves saw no stale read in the 96 samples it could take on the 5090, but nothing orders the two halves, so I'd expect it to show up under load. The test and the fix shape are in https://github.com/neonbyte1/VIctory/tree/suggest/uav-order-all-forms. **In game, not yet:** the base `63bcca43c` alone doesn't start in our Wine setup; it dies 8 s in with a stack overflow, so upstream `main` without the integration PRs never ran here. One run of your head crashed in `vkCreateComputePipelines` right after translating program `2f03a2df10503cef`. That was one run, and a probe that creates only that pipeline from both builds is queued to see whether it's deterministic. For an in-game number I'm looking at merging the halves onto my fork's integration as a fallback for exactly the programs the console flow refuses (+42 programs, +1.6 % of compute). _AI-assisted (Claude); measured on my machine, no game data shared._
neonbyte1 commented 2026-11-28 15:33:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T15:33:51Z.


@chippy01 a correction to the UAV point in my last comment, and it's a bigger finding than I wrote there. The "96 valid samples, no stale read" came from a broken harness: it delivered no group id, so 1,024 groups collapsed onto one console wave. Corrected run on the RTX 5090: one group of 64 / 256 / 1,024 threads, 256 dispatches each, lane 5's half writes a UAV dword and a lane of the other half reads it later in program order:

group stale reads in the other half
64 threads (1 console wave) 256 / 256
256 threads (4 console waves) 1,024 / 1,024
1,024 threads (16 console waves) 4,096 / 4,096

The write itself lands every time (0 slots left unwritten). But with the halves as emitted (0 dx.op.barrier), the other half's later read sees the old value every time. On the console that's program order inside one wave. For comparison, the console flow showed up to 53 % stale reads for the same pattern before the UAV-fence fix in #439/#3683. The fix shape (a meeting with a UAV fence before an access that conflicts with an earlier one, only where such a conflict exists) is form-independent: https://github.com/neonbyte1/VIctory/tree/suggest/uav-order-all-forms.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241562625 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7241562625). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-28T15:33:51Z. --- @chippy01 a correction to the UAV point in my last comment, and it's a bigger finding than I wrote there. The "96 valid samples, no stale read" came from a broken harness: it delivered no group id, so 1,024 groups collapsed onto one console wave. Corrected run on the RTX 5090: one group of 64 / 256 / 1,024 threads, 256 dispatches each, lane 5's half writes a UAV dword and a lane of the other half reads it later in program order: | group | stale reads in the other half | |---|---| | 64 threads (1 console wave) | **256 / 256** | | 256 threads (4 console waves) | **1,024 / 1,024** | | 1,024 threads (16 console waves) | **4,096 / 4,096** | The write itself lands every time (0 slots left unwritten). But with the halves as emitted (0 `dx.op.barrier`), the other half's later read sees the old value every time. On the console that's program order inside one wave. For comparison, the console flow showed up to 53 % stale reads for the same pattern before the UAV-fence fix in #439/#3683. The fix shape (a meeting with a UAV fence before an access that conflicts with an earlier one, only where such a conflict exists) is form-independent: https://github.com/neonbyte1/VIctory/tree/suggest/uav-order-all-forms. _AI-assisted (Claude); measured on my machine, no game data shared._
ColorMeBoom commented 2026-11-28 17:18:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-28T17:18:49Z.


@neonbyte1 @chippy01 I ported neonbyte1's UAV write-then-read case to this PR's halves. Here is the AMD result, with a true wave64 control on the same card. The UAV ordering gap reproduces on AMD in halves, and one wave64 keeps the order.

RX 5700 XT (Navi 10, RDNA1, 32 and 64 lanes, driver 32.0.21045.29003, Windows 11 26200), head 00a0234. Setup per row:

  • one group per dispatch, 256 dispatches;
  • lane w of each console wave loads a dword only it touches, adds 1 and stores it to its wave's slot, then lane r loads the slot;
  • each program is translated in halves (host_wave32: true) and as one wave64 (false).

The three variants differ only in one instruction at the top, which picks the form:

variant declared wave size (halves / one wave64) w5 → r6 (same half) w5 → r40 w40 → r5
no lane read none / none 0 stale all stale in both forms (256/256, 1024/1024, 4096/4096 for 64/256/1024 threads) all stale in both forms
DPP within the half (row_mirror) 32 / 64 0 halves all stale; wave64 0 halves all stale; wave64 0
v_readlane_b32 s9, v0, 40 (a trade, with its meeting) 32 / 64 0 halves 0; wave64 0 halves 0 at 64 and 256 threads, 182 of 4096 at 1024; wave64 0

The writer's store landed in every slot in every row, so a stale read means the load came early, not that the store was lost.

What this adds to neonbyte1's 5090 numbers:

  • Halves lose the order on AMD too, wherever no trade's barrier happens to separate the accesses. The same program as a declared WaveSize(64) on the same card keeps it in every row. So it isn't an NVIDIA artifact, and on a 64-lane AMD host it's specific to the 32-lane form.
  • A trade's meeting isn't a UAV fence. With the v_readlane at the top, the halves meet before both accesses, which hides most of the gap. 182 of 4096 reads were still stale at 1024 threads. Like neonbyte1's fix shape, a fence has to sit between the conflicting accesses.
  • A program with no lane reads declares no wave size in either form, and this driver runs it as 32-lane waves. Every cross-half read was stale there even with host_wave32: false. I ran the same probe on main 63bcca4 afterwards: identical, all stale with no lane reads and 0 stale with either lane read. So that part isn't this PR's; it's on main for AMD hosts too. Filed as #3766.

The probe is an ignored test on top of 00a0234: ColorMeBoom:probe/2633-uav-order (a18c02e). Run it with cargo test -p victory-shader --lib --features host -- --ignored --nocapture local_uav_write_then_read_across_halves; PROBE_RUNS sets the dispatch count. One run each; the 182 needs repeats before it means more than "not zero".

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7242919206 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7242919206). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-28T17:18:49Z. --- @neonbyte1 @chippy01 I ported neonbyte1's UAV write-then-read case to this PR's halves. Here is the AMD result, with a true wave64 control on the same card. The UAV ordering gap reproduces on AMD in halves, and one wave64 keeps the order. RX 5700 XT (Navi 10, RDNA1, 32 and 64 lanes, driver 32.0.21045.29003, Windows 11 26200), head `00a0234`. Setup per row: - one group per dispatch, 256 dispatches; - lane `w` of each console wave loads a dword only it touches, adds 1 and stores it to its wave's slot, then lane `r` loads the slot; - each program is translated in halves (`host_wave32: true`) and as one wave64 (`false`). The three variants differ only in one instruction at the top, which picks the form: | variant | declared wave size (halves / one wave64) | `w`5 → `r`6 (same half) | `w`5 → `r`40 | `w`40 → `r`5 | |---|---|---|---|---| | no lane read | none / none | 0 stale | **all stale** in both forms (256/256, 1024/1024, 4096/4096 for 64/256/1024 threads) | **all stale** in both forms | | DPP within the half (`row_mirror`) | 32 / 64 | 0 | halves **all stale**; wave64 **0** | halves **all stale**; wave64 **0** | | `v_readlane_b32 s9, v0, 40` (a trade, with its meeting) | 32 / 64 | 0 | halves 0; wave64 0 | halves 0 at 64 and 256 threads, **182 of 4096** at 1024; wave64 0 | The writer's store landed in every slot in every row, so a stale read means the load came early, not that the store was lost. What this adds to neonbyte1's 5090 numbers: - **Halves lose the order on AMD too**, wherever no trade's barrier happens to separate the accesses. The same program as a declared `WaveSize(64)` on the same card keeps it in every row. So it isn't an NVIDIA artifact, and on a 64-lane AMD host it's specific to the 32-lane form. - **A trade's meeting isn't a UAV fence.** With the `v_readlane` at the top, the halves meet before both accesses, which hides most of the gap. 182 of 4096 reads were still stale at 1024 threads. Like neonbyte1's fix shape, a fence has to sit between the conflicting accesses. - **A program with no lane reads declares no wave size in either form, and this driver runs it as 32-lane waves.** Every cross-half read was stale there even with `host_wave32: false`. I ran the same probe on `main` `63bcca4` afterwards: identical, all stale with no lane reads and 0 stale with either lane read. So that part isn't this PR's; it's on `main` for AMD hosts too. Filed as #3766. The probe is an ignored test on top of `00a0234`: [`ColorMeBoom:probe/2633-uav-order`](https://github.com/ColorMeBoom/VIctory/tree/probe/2633-uav-order) (`a18c02e`). Run it with `cargo test -p victory-shader --lib --features host -- --ignored --nocapture local_uav_write_then_read_across_halves`; `PROBE_RUNS` sets the dispatch count. One run each; the 182 needs repeats before it means more than "not zero". AI use: Claude Code (Claude Opus 5.5).
Dathinel commented 2026-11-28 17:45:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-28T17:45:00Z.


A small-card data point: RTX 3050 Laptop GPU, 4 GB (Ampere, 32-lane waves only, driver 610.62), Windows 11, Ryzen 7 7435HS, Rust 1.98.1, head 00a02348.

cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1: 33 passed, 0 failed, 25 s. With --nocapture, on the hardware adapter:

Comparison Count Result
halves against the console, 48 lanes 9 0 lanes differ
64 lanes 36 0 lanes differ
96 lanes 5 0 lanes differ
128 lanes 37 0 lanes differ
one wave64 64 skipped: "no pipeline for 64-lane waves", as expected on this card

emit::halves_random_tests: skipped here ("no hardware adapter runs 64-lane waves"), so it adds nothing from this machine.

Not run: the rest of the lib tests, the title, and the UAV write-then-read case @neonbyte1 and @ColorMeBoom describe above (I can run a ported version of it on this card if that helps: say which branch).

Why it matters for this card in the title: on an f4b48ad-lineage tree here, the programs that still take an approximate form or are refused are what shows in the picture. sr_tracing:CS_DeferredFallbacksAlpha_SkyProbe (b7953a05b189dfc1) stops every exact form at "a first-lane read where not every lane runs" and its approximate form covers hair and beards in dots; the notes are in https://github.com/Dathinel/victory-4gb/issues/44.

No game files or captures. Measured and written with AI assistance (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7243257099 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7243257099). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-28T17:45:00Z. --- A small-card data point: **RTX 3050 Laptop GPU, 4 GB** (Ampere, 32-lane waves only, driver 610.62), Windows 11, Ryzen 7 7435HS, Rust 1.98.1, head `00a02348`. `cargo test --locked -p victory-shader --lib emit::halves_tests -- --test-threads=1`: **33 passed, 0 failed**, 25 s. With `--nocapture`, on the hardware adapter: | Comparison | Count | Result | |---|---|---| | halves against the console, 48 lanes | 9 | 0 lanes differ | | 64 lanes | 36 | 0 lanes differ | | 96 lanes | 5 | 0 lanes differ | | 128 lanes | 37 | 0 lanes differ | | one wave64 | 64 | skipped: "no pipeline for 64-lane waves", as expected on this card | `emit::halves_random_tests`: skipped here ("no hardware adapter runs 64-lane waves"), so it adds nothing from this machine. Not run: the rest of the lib tests, the title, and the UAV write-then-read case @neonbyte1 and @ColorMeBoom describe above (I can run a ported version of it on this card if that helps: say which branch). Why it matters for this card in the title: on an `f4b48ad`-lineage tree here, the programs that still take an approximate form or are refused are what shows in the picture. `sr_tracing:CS_DeferredFallbacksAlpha_SkyProbe` (`b7953a05b189dfc1`) stops every exact form at "a first-lane read where not every lane runs" and its approximate form covers hair and beards in dots; the notes are in https://github.com/Dathinel/victory-4gb/issues/44. No game files or captures. Measured and written with AI assistance (Claude Code).
ColorMeBoom commented 2026-11-28 18:14:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-28T18:14:23Z.


@Dathinel It's ColorMeBoom:probe/2633-uav-order (a18c02e): one ignored test on top of 00a0234.

cargo test -p victory-shader --lib --features host -- --ignored --nocapture local_uav_write_then_read_across_halves

It prints a RESULT line per variant, form, lane pair and group size. PROBE_RUNS sets the dispatch count (default 256). On a 32-lane-only card the wave64 form should print "no pipeline; skipped" for the DPP and v_readlane variants. The halves rows are the ones that matter, especially the v_readlane row at 1024 threads, where the RX 5700 XT had 182 of 4096 stale. A second GPU family on those rows would show whether a trade's meeting is enough by chance or only usually.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7243638074 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7243638074). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-28T18:14:23Z. --- @Dathinel It's [`ColorMeBoom:probe/2633-uav-order`](https://github.com/ColorMeBoom/VIctory/tree/probe/2633-uav-order) (`a18c02e`): one ignored test on top of `00a0234`. ``` cargo test -p victory-shader --lib --features host -- --ignored --nocapture local_uav_write_then_read_across_halves ``` It prints a `RESULT` line per variant, form, lane pair and group size. `PROBE_RUNS` sets the dispatch count (default 256). On a 32-lane-only card the `wave64` form should print "no pipeline; skipped" for the DPP and `v_readlane` variants. The `halves` rows are the ones that matter, especially the `v_readlane` row at 1024 threads, where the RX 5700 XT had 182 of 4096 stale. A second GPU family on those rows would show whether a trade's meeting is enough by chance or only usually. AI use: Claude Code (Claude Opus 5.5).
steven-seagull27 commented 2026-11-28 20:58:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-28T20:58:56Z.


I have a working, synthetic-verified fix for masked-loop Wave64 binary64 sums in 32-lane halves (combining #2633's 706c006c + #2978's f923b5dc + #385's 90997428, directly addressing the Wave32-halves half of #3501 / #3502): commit fe9318ec on steven-seagull27/VIctory (fix/3502-fp64-halves-masked).

Root causes addressed

  1. sum64.rs / halves.rs: Lower::sum64 previously skipped self.reduction_meets()?, omitted self.wide_and(block, on, c) on the predicate in wave-wide blocks, and did not combine the two 32-lane halves. Added Lower::sum64_halves to trade (lo, hi) in a single two-word rendezvous (identity (0, 0) = +0.0 for missing upper halves), reconstruct via dx.op.makeDouble.f64, add in double, and bitcast back to i64.
  2. 32-bit reductions in wave-wide blocks (lower.rs): Shape::Masked, Shape::Active, and Shape::Prefix in Lower::shape() also missed self.wide_and(block, on, c).
  3. Whole-wave scratch VGPR reuse under wave-wide guards (wide.rs, lower.rs, phi.rs): Once reduction_meets() widens the loop to run wave-wide so neither half can deadlock on early loop exit, the whole-wave section leaves intermediate reduction VGPRs with Val::Missing("a whole-wave section step the simulation does not follow"). When the post-section v_mov_b32 unconditionally overwrites those VGPRs for every active lane of the wave-wide block, write_placed refused the write because of the block guard. Added Wide::active_only tracking so block-mask-only overwrites store the new value while still refusing any read where an inactive lane could observe it (loop exits, back-edge/exit phis, v_readlane/v_writelane, DPP fi: true, and instruction-guarded writes).

Synthetic hardware & WARP verification (fe9318ec)

All tests use generated synthetic Wave64 compute shaders (no game data), Windows 11 x64, Rust 1.98.1 MSVC, Windows SDK DXIL validator:

Test RTX 5080 (Wave32 halves) App-local WARP 1.0.22 (Wave32 halves) App-local WARP 1.0.22 (native Wave64)
wave64_binary64_sum_in_halves_translates_and_enforces_safety (DXIL + barrier counts + negative escape/readlane checks) pass pass pass
wave64_binary64_sum_in_halves_matches_the_console — straight-line (4 groups × 64 lanes) 0 / 256 mismatches 0 / 256 mismatches 0 / 256 mismatches
wave64_binary64_sum_in_halves_matches_the_console — masked loop (u64::MAX << 32, u32::MAX, 1 << 63, 0xA000_0001_0000_0055) 0 / 256 mismatches 0 / 256 mismatches (skipped on WARP due to WARP's divergent-loop waveActiveOp.f64 sub-packet bug)
wave_wide_32bit_sum_excludes_inactive_lanes_on_every_gpu 0 / 64 mismatches 0 / 64 mismatches —
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean
  • cargo xtask policy: asset policy: 200 files ok
  • Full victory-shader --lib suite (skipping pre-existing NVIDIA heap_direct_texture_reads_mark_their_heap_index #2571): 349 passed (only the 3 pre-existing 706c006c NVIDIA stride/gather failures remain).

To test or cherry-pick onto a #2633 + #2978 branch:

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/fix/3502-fp64-halves-masked
git cherry-pick fe9318ec27e45934647f678c9b362ef51ec097f4
cargo test -p victory-shader --lib --locked -- --test-threads=1 --nocapture wave64_binary64_sum_in_halves wave_wide_32bit_sum_excludes_inactive_lanes

AI-assisted. Synthetic fixtures only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7245685455 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7245685455). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-28T20:58:56Z. --- I have a working, synthetic-verified fix for **masked-loop Wave64 binary64 sums in 32-lane halves** (combining #2633's `706c006c` + #2978's `f923b5dc` + #385's `90997428`, directly addressing the Wave32-halves half of #3501 / #3502): [commit `fe9318ec`](https://github.com/steven-seagull27/VIctory/commit/fe9318ec27e45934647f678c9b362ef51ec097f4) on `steven-seagull27/VIctory` (`fix/3502-fp64-halves-masked`). ### Root causes addressed 1. **`sum64.rs` / `halves.rs`:** `Lower::sum64` previously skipped `self.reduction_meets()?`, omitted `self.wide_and(block, on, c)` on the predicate in wave-wide blocks, and did not combine the two 32-lane halves. Added `Lower::sum64_halves` to trade `(lo, hi)` in a single two-word rendezvous (identity `(0, 0)` = `+0.0` for missing upper halves), reconstruct via `dx.op.makeDouble.f64`, add in `double`, and bitcast back to `i64`. 2. **32-bit reductions in wave-wide blocks (`lower.rs`):** `Shape::Masked`, `Shape::Active`, and `Shape::Prefix` in `Lower::shape()` also missed `self.wide_and(block, on, c)`. 3. **Whole-wave scratch VGPR reuse under wave-wide guards (`wide.rs`, `lower.rs`, `phi.rs`):** Once `reduction_meets()` widens the loop to run wave-wide so neither half can deadlock on early loop exit, the whole-wave section leaves intermediate reduction VGPRs with `Val::Missing("a whole-wave section step the simulation does not follow")`. When the post-section `v_mov_b32` unconditionally overwrites those VGPRs for every active lane of the wave-wide block, `write_placed` refused the write because of the block guard. Added `Wide::active_only` tracking so block-mask-only overwrites store the new value while still refusing any read where an inactive lane could observe it (loop exits, back-edge/exit phis, `v_readlane`/`v_writelane`, DPP `fi: true`, and instruction-guarded writes). ### Synthetic hardware & WARP verification (`fe9318ec`) All tests use generated synthetic Wave64 compute shaders (no game data), Windows 11 x64, Rust 1.98.1 MSVC, Windows SDK DXIL validator: | Test | RTX 5080 (Wave32 halves) | App-local WARP 1.0.22 (Wave32 halves) | App-local WARP 1.0.22 (native Wave64) | |---|---:|---:|---:| | `wave64_binary64_sum_in_halves_translates_and_enforces_safety` (DXIL + barrier counts + negative escape/readlane checks) | pass | pass | pass | | `wave64_binary64_sum_in_halves_matches_the_console` — straight-line (4 groups × 64 lanes) | **0 / 256** mismatches | **0 / 256** mismatches | **0 / 256** mismatches | | `wave64_binary64_sum_in_halves_matches_the_console` — masked loop (`u64::MAX << 32`, `u32::MAX`, `1 << 63`, `0xA000_0001_0000_0055`) | **0 / 256** mismatches | **0 / 256** mismatches | *(skipped on WARP due to WARP's divergent-loop `waveActiveOp.f64` sub-packet bug)* | | `wave_wide_32bit_sum_excludes_inactive_lanes_on_every_gpu` | **0 / 64** mismatches | **0 / 64** mismatches | — | - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: **clean** - `cargo xtask policy`: **`asset policy: 200 files ok`** - Full `victory-shader --lib` suite (skipping pre-existing NVIDIA `heap_direct_texture_reads_mark_their_heap_index` #2571): **349 passed** (only the 3 pre-existing `706c006c` NVIDIA stride/gather failures remain). To test or cherry-pick onto a #2633 + #2978 branch: ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/fix/3502-fp64-halves-masked git cherry-pick fe9318ec27e45934647f678c9b362ef51ec097f4 cargo test -p victory-shader --lib --locked -- --test-threads=1 --nocapture wave64_binary64_sum_in_halves wave_wide_32bit_sum_excludes_inactive_lanes ``` AI-assisted. Synthetic fixtures only.
steven-seagull27 commented 2026-11-29 08:26:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-29T08:26:11Z.


@chippy01 Rebased the masked-loop Wave64 binary64 sum fix onto your latest #2633 head (00a02348) + #2978 (e854af8d) so it cherry-picks cleanly: commit 3ba25486 on steven-seagull27/VIctory (fix/3502-fp64-halves-masked-00a02348; keeping the earlier fix/3502-fp64-halves-masked branch intact).

Rebase adjustments for 00a02348

  • Dropped the 32-bit Lower::shape() wide_and hunk (already covered by 27029aff) and matched sum64.rs to self.wide_and(self.cur_ir, on, c).
  • Integrated Wide::active_only with halves::Literal (478848cc / 27029aff): block-mask-only overwrites of section scratch VGPRs in write_placed do not call ask_literal prematurely, while any refused inactive-lane observation forwards unfollowed to ask_literal so 32-bit literal section replay is preserved. Added permlane fetch-inactive (v.opsel & 1) alongside DPP fi: true.
  • sum64_halves uses trade(c, &[(lo, 0), (hi, 0)]) and automatically inherits 00a02348's borrowed-slot handling for full 32 KiB LDS.

Synthetic verification (3ba25486, Windows 11 x64, Rust 1.98.1 MSVC)

Check Result
wave64_binary64_sum_in_halves_translates_and_enforces_safety (DXIL validation, barrier counts, 48 & 64-thread negative escape/readlane checks) pass
wave64_binary64_sum_in_halves_matches_the_console — RTX 5080 (Wave32 halves) 0/256 mismatches (straight), 0/256 mismatches (masked loop, 4 masks)
wave64_binary64_sum_in_halves_matches_the_console — App-local WARP 1.0.22 (VICTORY_WARP=1) 0/256 (straight/halves), 0/256 (straight/wave64), 0/256 (masked_loop/halves); inbox 4-lane WARP skips cleanly
wave_wide_32bit_sum_excludes_inactive_lanes_on_every_gpu — RTX 5080 0/64 mismatches
cargo test --locked -p victory-shader --lib -- --test-threads=1 emit::halves_tests a_whole_wave_binary64_sum 38 passed, 0 failed (all 36 halves_tests + both #2978 valu_tests binary64 sums)
cargo clippy --locked -p victory-shader --all-targets -- -D warnings clean
cargo xtask policy asset policy: 199 files ok

Fetch / cherry-pick (onto #2633 00a02348 + #2978 e854af8d)

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/fix/3502-fp64-halves-masked-00a02348
git cherry-pick 3ba25486e69402a3e2d99737855c39821e149d3d
cargo test --locked -p victory-shader --lib -- --test-threads=1 --nocapture wave64_binary64_sum_in_halves wave_wide_32bit_sum_excludes_inactive_lanes

AI-assisted. Synthetic fixtures only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7253103155 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7253103155). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-29T08:26:11Z. --- @chippy01 Rebased the masked-loop Wave64 binary64 sum fix onto your latest #2633 head (`00a02348`) + #2978 (`e854af8d`) so it cherry-picks cleanly: [commit `3ba25486`](https://github.com/steven-seagull27/VIctory/commit/3ba25486e69402a3e2d99737855c39821e149d3d) on `steven-seagull27/VIctory` (`fix/3502-fp64-halves-masked-00a02348`; keeping the earlier `fix/3502-fp64-halves-masked` branch intact). ### Rebase adjustments for `00a02348` - Dropped the 32-bit `Lower::shape()` `wide_and` hunk (already covered by `27029aff`) and matched `sum64.rs` to `self.wide_and(self.cur_ir, on, c)`. - Integrated `Wide::active_only` with `halves::Literal` (`478848cc` / `27029aff`): block-mask-only overwrites of section scratch VGPRs in `write_placed` do not call `ask_literal` prematurely, while any refused inactive-lane observation forwards `unfollowed` to `ask_literal` so 32-bit literal section replay is preserved. Added `permlane` fetch-inactive (`v.opsel & 1`) alongside DPP `fi: true`. - `sum64_halves` uses `trade(c, &[(lo, 0), (hi, 0)])` and automatically inherits `00a02348`'s borrowed-slot handling for full 32 KiB LDS. ### Synthetic verification (`3ba25486`, Windows 11 x64, Rust 1.98.1 MSVC) | Check | Result | |---|---| | `wave64_binary64_sum_in_halves_translates_and_enforces_safety` (DXIL validation, barrier counts, 48 & 64-thread negative escape/readlane checks) | pass | | `wave64_binary64_sum_in_halves_matches_the_console` — **RTX 5080** (Wave32 halves) | **0/256** mismatches (straight), **0/256** mismatches (masked loop, 4 masks) | | `wave64_binary64_sum_in_halves_matches_the_console` — **App-local WARP 1.0.22** (`VICTORY_WARP=1`) | **0/256** (straight/halves), **0/256** (straight/wave64), **0/256** (masked_loop/halves); inbox 4-lane WARP skips cleanly | | `wave_wide_32bit_sum_excludes_inactive_lanes_on_every_gpu` — **RTX 5080** | **0/64** mismatches | | `cargo test --locked -p victory-shader --lib -- --test-threads=1 emit::halves_tests a_whole_wave_binary64_sum` | **38 passed, 0 failed** (all 36 `halves_tests` + both #2978 `valu_tests` binary64 sums) | | `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` | clean | | `cargo xtask policy` | `asset policy: 199 files ok` | ### Fetch / cherry-pick (onto #2633 `00a02348` + #2978 `e854af8d`) ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/fix/3502-fp64-halves-masked-00a02348 git cherry-pick 3ba25486e69402a3e2d99737855c39821e149d3d cargo test --locked -p victory-shader --lib -- --test-threads=1 --nocapture wave64_binary64_sum_in_halves wave_wide_32bit_sum_excludes_inactive_lanes ``` AI-assisted. Synthetic fixtures only.
TaynanGT commented 2026-11-29 11:25:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TaynanGT on 2026-11-29T11:25:38Z.


Thanks for the follow-up on the first-lane fallback and the full-LDS borrowed-slot case, and thanks to steven-seagull27 for the rebased binary64 tests. The masked-loop and straight-path results on RTX 5080 and WARP are useful. I'll keep those synthetic results separate from matched title runs on the updated head.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7255104092 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7255104092). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T11:25:38Z. --- Thanks for the follow-up on the first-lane fallback and the full-LDS borrowed-slot case, and thanks to steven-seagull27 for the rebased binary64 tests. The masked-loop and straight-path results on RTX 5080 and WARP are useful. I'll keep those synthetic results separate from matched title runs on the updated head.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2633:upstream-pr/2633'
git switch 'upstream-pr/2633'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2633'
git switch 'upstream-pr/2633'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2633'
git switch 'upstream-pr/2633'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2633'
git switch 'main'
git merge --squash 'upstream-pr/2633'
git switch 'main'
git merge --ff-only 'upstream-pr/2633'
git switch 'main'
git merge 'upstream-pr/2633'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2631
No description provided.