[GH #46] Reproduction on an AMD RX 7600 (8 GB, RDNA3): playable prologue, and the four open PRs it needs #46

Open
opened 2026-11-25 06:06:45 +00:00 by dodo4154 · 10 comments
dodo4154 commented 2026-11-25 06:06:45 +00:00 (Migrated from github.com)

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T05:53:16Z.


Reproduced on a card the README does not cover (AMD RX 7600, 8 GB, RDNA3) and measured.
Not a pull request: a reproduction and measurement report. ztrx's README says it was
tested on one NVIDIA card and asks for others; this is an AMD one, and the notes below
say which of the open pull requests are needed to make it stable and glitch-free here.

Machine

CPU AMD Ryzen 7 5700X (8C/16T)
GPU AMD Radeon RX 7600, 8 GB (RDNA3), driver 32.0.32029.2010
RAM 24 GB (paging file managed by Windows)
OS Windows 11 Pro 10.0.26300
Profile Series X (--console series-x)

What ran

main at the time of this report, plus four open pull requests applied on top with
git apply -3 (no source edits of my own):

  • #115 Texture guard: see writes through every view of its pages
  • #141 GPU: wait before overwriting an in-flight texture staging buffer under LATE_WAIT/RELAY
  • #110 Shaders: canonical system-value names and in-row order in ISG1/OSG1
  • #150 Shaders: interpolation modes from the console container's PSV0

Only #110 and #150 conflict textually, both in the re-export test block of
crates/victory-shader/src/emit/mod.rs; keeping both tests resolves it. cargo build --release -p victory is clean, cargo test -p victory-shader -p victory-gpu passes
(210 and 114).

Shader translation, measured offline

victory.exe translate --validate --list shaders.rpf over the title's 26,503 containers
(26,084 programs), Windows SDK 10.0.26100 dxil.dll:

before #110/#150 with both
programs translated 26,084 / 26,084 26,084 / 26,084
vertex/pixel validated 14,045 of 14,156 14,150
mesh validated 8,657 of 8,762 8,691
compute validated 2,668 of 2,668 2,668
validation failures (total lines) 234 81

The remaining 81 are dominated by one merged ES+GS shader that exceeds DXIL's
vertex-plus-primitive output limit (72 lines), plus six interpolation-mode mismatches
and three "out of bound coord must be undef".

In the world, with the four fixes

Automated run: the title was started with VICTORY_KEYS pressing through the first-boot
screens and menus and VICTORY_CAPTURE saving frames, so no one touched the PC.

  • Prologue renders and plays; 4973-5000 draws per frame.
  • Frame time settled at 452-470 ms (about 2 fps) and stayed there; no crash in a
    13-minute run and none in the run that followed, with VICTORY_RELAY=2 only.
  • Working set about 7.3 GB, far below what victory-fork needed here.
  • Texture queue: 18,091 slots with 16,945 due (oldest 826 frames), against
    24,104 slots with 23,070 due (oldest 2,552 frames) on victory-fork on the same
    machine, which is where that build then died (below).

Without #115 and #141 the opening suffers the stale-texture glitching those two
describe: menus and cutscene show the previous frame's content in patches. With them,
the opening and the cutscene handover are clean.

What fails here, for the record

  • VICTORY_WAVE_WIDE=1: entering the world dies with 0xc0000005 reading
    0xbfd45018 inside the title image. So on this card wave64 lowering is not usable yet.
  • VICTORY_LATE_WAIT=3 with VICTORY_WIDE_BACK=1: the title takes exception
    0x80000003 (a breakpoint, the title's own check) exactly at the cutscene-to-gameplay
    handover, after three compute pipelines bind for the first time. VICTORY_RELAY=2
    alone does not.
  • On victory-fork with the same card, the analogous death is a DirectStorage request
    failing with hr=0x800706f8 (an invalid user buffer) while the texture queue was
    saturated, one line before the title's breakpoint.
  • Rendering: shapes are drawn but lit areas are dark and the game's ray-traced lighting
    still does not run, as the README says.

Reproducing this

Scripts used, if useful to anyone: a launcher that also pins the title's audio session
to 20 % once it appears, and a sweep that runs a list of environment configurations and
records each one's median frame time. Both are PowerShell and depend on nothing outside
Windows.

<!-- greyfinch-sync:Zettrox/ztrx:issue:6598192192 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T05:53:16Z. --- Reproduced on a card the README does not cover (AMD RX 7600, 8 GB, RDNA3) and measured. Not a pull request: a reproduction and measurement report. ztrx's README says it was tested on one NVIDIA card and asks for others; this is an AMD one, and the notes below say which of the open pull requests are needed to make it stable and glitch-free here. ## Machine | | | |---|---| | CPU | AMD Ryzen 7 5700X (8C/16T) | | GPU | AMD Radeon RX 7600, 8 GB (RDNA3), driver 32.0.32029.2010 | | RAM | 24 GB (paging file managed by Windows) | | OS | Windows 11 Pro 10.0.26300 | | Profile | Series X (`--console series-x`) | ## What ran `main` at the time of this report, plus four open pull requests applied on top with `git apply -3` (no source edits of my own): - #115 Texture guard: see writes through every view of its pages - #141 GPU: wait before overwriting an in-flight texture staging buffer under LATE_WAIT/RELAY - #110 Shaders: canonical system-value names and in-row order in ISG1/OSG1 - #150 Shaders: interpolation modes from the console container's PSV0 Only #110 and #150 conflict textually, both in the re-export test block of `crates/victory-shader/src/emit/mod.rs`; keeping both tests resolves it. `cargo build --release -p victory` is clean, `cargo test -p victory-shader -p victory-gpu` passes (210 and 114). ## Shader translation, measured offline `victory.exe translate --validate --list shaders.rpf` over the title's 26,503 containers (26,084 programs), Windows SDK 10.0.26100 dxil.dll: | | before #110/#150 | with both | |---|---:|---:| | programs translated | 26,084 / 26,084 | 26,084 / 26,084 | | vertex/pixel validated | 14,045 of 14,156 | **14,150** | | mesh validated | 8,657 of 8,762 | **8,691** | | compute validated | 2,668 of 2,668 | 2,668 | | validation failures (total lines) | 234 | **81** | The remaining 81 are dominated by one merged ES+GS shader that exceeds DXIL's vertex-plus-primitive output limit (72 lines), plus six interpolation-mode mismatches and three "out of bound coord must be undef". ## In the world, with the four fixes Automated run: the title was started with `VICTORY_KEYS` pressing through the first-boot screens and menus and `VICTORY_CAPTURE` saving frames, so no one touched the PC. - Prologue renders and plays; 4973-5000 draws per frame. - Frame time settled at **452-470 ms (about 2 fps)** and stayed there; no crash in a 13-minute run and none in the run that followed, with `VICTORY_RELAY=2` only. - Working set about **7.3 GB**, far below what victory-fork needed here. - Texture queue: 18,091 slots with 16,945 due (oldest 826 frames), against **24,104 slots with 23,070 due (oldest 2,552 frames)** on victory-fork on the same machine, which is where that build then died (below). Without #115 and #141 the opening suffers the stale-texture glitching those two describe: menus and cutscene show the previous frame's content in patches. With them, the opening and the cutscene handover are clean. ## What fails here, for the record - `VICTORY_WAVE_WIDE=1`: entering the world dies with `0xc0000005` reading `0xbfd45018` inside the title image. So on this card wave64 lowering is not usable yet. - `VICTORY_LATE_WAIT=3` with `VICTORY_WIDE_BACK=1`: the title takes exception `0x80000003` (a breakpoint, the title's own check) exactly at the cutscene-to-gameplay handover, after three compute pipelines bind for the first time. `VICTORY_RELAY=2` alone does not. - On victory-fork with the same card, the analogous death is a DirectStorage request failing with `hr=0x800706f8` (an invalid user buffer) while the texture queue was saturated, one line before the title's breakpoint. - Rendering: shapes are drawn but lit areas are dark and the game's ray-traced lighting still does not run, as the README says. ## Reproducing this Scripts used, if useful to anyone: a launcher that also pins the title's audio session to 20 % once it appears, and a sweep that runs a list of environment configurations and records each one's median frame time. Both are PowerShell and depend on nothing outside Windows.
dodo4154 commented 2026-11-25 06:06:47 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T06:04:22Z.


One more data point from the same card, in case it is recognisable: the run does not always survive, and the way it dies looks the same every time.

VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x23d8f03
  #0 victory-image-b99f876b74d4a77f.dll+0x23d8f03
  #1 victory-image-b99f876b74d4a77f.dll+0x2593e91
  #2 victory-image-b99f876b74d4a77f.dll+0x2592d69
  #3 victory-image-b99f876b74d4a77f.dll+0x2215eca

0x80000003 is a breakpoint, so this is the title's own check failing rather than a fault inside the layer. It lands at different frames on different runs (r12/r13 held 1075, 1701 and 2155 in three runs), always a couple of minutes into the prologue, and in each of those runs the last lines before it are a burst of the descriptor layer's fallback for a UAV over a depth texture:

INFO victory_gpu::descriptor::host: unordered access view of a depth texture resource=0x… view=Some([56, 5, 0, 0, 3, 0, …])
INFO victory_gpu::descriptor::host: unordered access view of a depth texture resource=0x… view=Some([62, 4, 0, 1, 0, 0, 0, …])

One run of thirteen minutes reached the same scene and never hit it, so it is not a fixed frame; it behaves like a resource or state that the burst of depth UAV binds needs and does not get here. Everything else is as in my first post: VICTORY_RELAY=2, Series X profile, #115/#141/#110/#150 applied.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7154412686 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7154412686). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T06:04:22Z. --- One more data point from the same card, in case it is recognisable: the run does not always survive, and the way it dies looks the same every time. ``` VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x23d8f03 #0 victory-image-b99f876b74d4a77f.dll+0x23d8f03 #1 victory-image-b99f876b74d4a77f.dll+0x2593e91 #2 victory-image-b99f876b74d4a77f.dll+0x2592d69 #3 victory-image-b99f876b74d4a77f.dll+0x2215eca ``` `0x80000003` is a breakpoint, so this is the title's own check failing rather than a fault inside the layer. It lands at different frames on different runs (`r12`/`r13` held 1075, 1701 and 2155 in three runs), always a couple of minutes into the prologue, and in each of those runs the last lines before it are a burst of the descriptor layer's fallback for a UAV over a depth texture: ``` INFO victory_gpu::descriptor::host: unordered access view of a depth texture resource=0x… view=Some([56, 5, 0, 0, 3, 0, …]) INFO victory_gpu::descriptor::host: unordered access view of a depth texture resource=0x… view=Some([62, 4, 0, 1, 0, 0, 0, …]) ``` One run of thirteen minutes reached the same scene and never hit it, so it is not a fixed frame; it behaves like a resource or state that the burst of depth UAV binds needs and does not get here. Everything else is as in my first post: `VICTORY_RELAY=2`, Series X profile, #115/#141/#110/#150 applied.
dodo4154 commented 2026-11-25 08:09:12 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T07:26:32Z.


The crash in my earlier comment is fixed here by a sibling fork's pair of commits, and the rooms come back with it. The stack that now survives is:

  • #141 (staging buffer overwritten in flight), #110 and #150 (signature order and interpolation modes) as before;
  • myokex/victory-amd c6dc4d8c "a write through one view of a page is seen at its other views";
  • myokex/victory-amd 10ea38ed "kernel reads into title memory are read beside and copied in";
  • #115 dropped: c6dc4d8c is its fuller form and adds the kernel-read half.

Results on the same card (AMD RX 7600 8 GB, RDNA3, Series X profile, VICTORY_RELAY=2):

with #115 with the two victory-amd commits
crash-free run a few minutes at best 20 minutes, zero exceptions
hr=0x800706f8 from DirectStorage 1 per run, right before the breakpoint 0
frame time 452-470 ms 422-427 ms
distinct colours / mean brightness (window sample) 3434 / 46.1 3881 / 57.5

cargo test -p victory-shader -p victory-gpu: 213 and 116 passed.

The 0x800706f8 was exactly what 10ea38ed describes: a block guarded again between kernel_will_write and the read, which fails that read and stops the title seconds after the first world frame. Both commits applied to this tree cleanly and needed no edits.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7155863760 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7155863760). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T07:26:32Z. --- The crash in my earlier comment is fixed here by a sibling fork's pair of commits, and the rooms come back with it. The stack that now survives is: - `#141` (staging buffer overwritten in flight), `#110` and `#150` (signature order and interpolation modes) as before; - `myokex/victory-amd` `c6dc4d8c` "a write through one view of a page is seen at its other views"; - `myokex/victory-amd` `10ea38ed` "kernel reads into title memory are read beside and copied in"; - `#115` dropped: `c6dc4d8c` is its fuller form and adds the kernel-read half. Results on the same card (AMD RX 7600 8 GB, RDNA3, Series X profile, `VICTORY_RELAY=2`): | | with `#115` | with the two `victory-amd` commits | |---|---:|---:| | crash-free run | a few minutes at best | **20 minutes, zero exceptions** | | `hr=0x800706f8` from DirectStorage | 1 per run, right before the breakpoint | **0** | | frame time | 452-470 ms | **422-427 ms** | | distinct colours / mean brightness (window sample) | 3434 / 46.1 | **3881 / 57.5** | `cargo test -p victory-shader -p victory-gpu`: 213 and 116 passed. The `0x800706f8` was exactly what `10ea38ed` describes: a block guarded again between `kernel_will_write` and the read, which fails that read and stops the title seconds after the first world frame. Both commits applied to this tree cleanly and needed no edits.
thatirishguyyy commented 2026-11-25 08:09:12 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by thatirishguyyy on 2026-11-25T07:58:21Z.


Another Windows Radeon data point on an RX 9070 XT (RDNA4, driver 32.0.32029.2010), ztrx 90b529f, Series X profile. The stock release reached loading and exited after 2:24 with 0xc0000005 in amdxc64.dll+0x861b9f, with about 11 GiB of Windows commit headroom.

In an offline screen of 141 character CS_RaytracingResolve shaders, 75 created D3D12 pipelines and 66 exited with 0xc0000005. The 66 include the 41 hashes from fxceless/victory-fork#3 and 25 additional hashes. Three traced examples passed standalone DXIL validation before failing at pipeline creation.

With those 66 hashes plus the two dispatch skips from fxceless/victory-fork#3 and a local diagnostics patch to honor the skips during pipeline prewarming, one run rendered the opening scenes and hit DXGI_ERROR_DEVICE_HUNG at 7:11. A warm follow-up reached the interactive prison-cell tutorial and stayed up until my planned 10-minute cutoff. Camera input and menu navigation worked at roughly 1–2 FPS hands-on. Clothing and lighting artifacts remained. Commit headroom was about 6 GiB at cutoff.

I can share the hashes and prewarm patch if helpful. AI-assisted: Codex ran the offline tests and helped analyze the logs.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7156458898 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7156458898). Originally posted by [thatirishguyyy](https://github.com/thatirishguyyy) on 2026-11-25T07:58:21Z. --- Another Windows Radeon data point on an RX 9070 XT (RDNA4, driver `32.0.32029.2010`), ztrx `90b529f`, Series X profile. The stock release reached loading and exited after 2:24 with `0xc0000005` in `amdxc64.dll+0x861b9f`, with about 11 GiB of Windows commit headroom. In an offline screen of 141 character `CS_RaytracingResolve` shaders, 75 created D3D12 pipelines and 66 exited with `0xc0000005`. The 66 include the 41 hashes from fxceless/victory-fork#3 and 25 additional hashes. Three traced examples passed standalone DXIL validation before failing at pipeline creation. With those 66 hashes plus the two dispatch skips from fxceless/victory-fork#3 and a local diagnostics patch to honor the skips during pipeline prewarming, one run rendered the opening scenes and hit `DXGI_ERROR_DEVICE_HUNG` at 7:11. A warm follow-up reached the interactive prison-cell tutorial and stayed up until my planned 10-minute cutoff. Camera input and menu navigation worked at roughly 1–2 FPS hands-on. Clothing and lighting artifacts remained. Commit headroom was about 6 GiB at cutoff. I can share the hashes and prewarm patch if helpful. AI-assisted: Codex ran the offline tests and helped analyze the logs.
sil-kong commented 2026-11-25 09:08:57 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by sil-kong on 2026-11-25T08:11:11Z.


Another RDNA3 data point, this time on Linux/Wine, with one finding about the ray-tracing builder on 64-lane hosts.

Setup: RX 7900 XT (RADV, Mesa 26.2.7), Arch Linux, GE-Proton10-34's Wine, 90b529f cross-built with mingw, plus fxceless/victory-fork#115. Series X 1.0.2.1.

What it took to get past loading:

  • GE-Proton10-34 ships a vkd3d-proton from March 2026 (old dxil-spirv structurizer). RADV then faults in vkCreateGraphicsPipelines / vkCreateComputePipelines (Wine assertion in winevulkan/loader_thunks.c), first on mesh shader d4111a6e6ea49d91, then 089d6271be6650ef and 4e296b1885c37b29. Swapping in the d3d12.dll/d3d12core.dll from Proton Experimental 11.0-20261112 fixes it, same as Marvisak/VIctory#144 on NVIDIA.
  • #115 removes the intro's back-and-forth frames here too (#5, #24).

Ray-tracing builder: with VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1, it does turn on on this card:

the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53

docs/fork-ray-tracing.md says it stays off because some builder pipelines need 64-lane waves. A 64-lane host doesn't have that problem. The scene is still black: the builder runs quarantined, and nothing visible reads its output yet.

What still doesn't translate here (3 programs):

  • compute b22a16a178976e1b: a wave sum of 16-bit floats where not every lane runs
  • pixel 2fd01fca16993001, 6b6db9f1a526daeb: a descriptor read only as data

About the first one: in emit::emit, the retries for programs stopped "where not every lane runs" (without early-outs or skips, then widen) only run when host_max_wave() == 32. On a 64-lane host, a console wave64 program that stops there gets no retry at all. half_sum also only records the block (need) on the two-host-wave path, so widen couldn't find the branch anyway. On a 64-lane host, widen is exact and needs no group barrier, since one console wave is one host wave. I have a small local patch for this (both changes, behind ZTRX_WAVE64_RETRY=0 to turn it off) and a unit test (a_16_bit_wave_sum_inside_a_lane_branch_on_a_64_lane_host_is_taken_wave_wide, passing). cargo test -p victory-shader passes, except stub_pipeline_is_created, which fails under vkd3d-proton with or without the patch (it doesn't check the DXIL digest). I haven't confirmed in game yet that b22a16a1 now translates. I'll follow up, and I can open a PR if you want one.

Performance under Wine: about 0.2 fps in the world, mostly texture refresh waiting on title memory and the write watch. The GPU is busy for about 40–450 ms per frame.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7156716101 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7156716101). Originally posted by [sil-kong](https://github.com/sil-kong) on 2026-11-25T08:11:11Z. --- Another RDNA3 data point, this time on Linux/Wine, with one finding about the ray-tracing builder on 64-lane hosts. **Setup:** RX 7900 XT (RADV, Mesa 26.2.7), Arch Linux, GE-Proton10-34's Wine, `90b529f` cross-built with mingw, plus fxceless/victory-fork#115. Series X 1.0.2.1. **What it took to get past loading:** - GE-Proton10-34 ships a vkd3d-proton from March 2026 (old dxil-spirv structurizer). RADV then faults in `vkCreateGraphicsPipelines` / `vkCreateComputePipelines` (Wine assertion in `winevulkan/loader_thunks.c`), first on mesh shader `d4111a6e6ea49d91`, then `089d6271be6650ef` and `4e296b1885c37b29`. Swapping in the `d3d12.dll`/`d3d12core.dll` from Proton Experimental 11.0-20261112 fixes it, same as Marvisak/VIctory#144 on NVIDIA. - #115 removes the intro's back-and-forth frames here too (#5, #24). **Ray-tracing builder:** with `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1`, it does turn on on this card: ``` the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53 ``` `docs/fork-ray-tracing.md` says it stays off because some builder pipelines need 64-lane waves. A 64-lane host doesn't have that problem. The scene is still black: the builder runs quarantined, and nothing visible reads its output yet. **What still doesn't translate here (3 programs):** - compute `b22a16a178976e1b`: `a wave sum of 16-bit floats where not every lane runs` - pixel `2fd01fca16993001`, `6b6db9f1a526daeb`: `a descriptor read only as data` **About the first one:** in `emit::emit`, the retries for programs stopped "where not every lane runs" (without early-outs or skips, then `widen`) only run when `host_max_wave() == 32`. On a 64-lane host, a console wave64 program that stops there gets no retry at all. `half_sum` also only records the block (`need`) on the two-host-wave path, so `widen` couldn't find the branch anyway. On a 64-lane host, `widen` is exact and needs no group barrier, since one console wave is one host wave. I have a small local patch for this (both changes, behind `ZTRX_WAVE64_RETRY=0` to turn it off) and a unit test (`a_16_bit_wave_sum_inside_a_lane_branch_on_a_64_lane_host_is_taken_wave_wide`, passing). `cargo test -p victory-shader` passes, except `stub_pipeline_is_created`, which fails under vkd3d-proton with or without the patch (it doesn't check the DXIL digest). I haven't confirmed in game yet that `b22a16a1` now translates. I'll follow up, and I can open a PR if you want one. Performance under Wine: about 0.2 fps in the world, mostly texture refresh waiting on title memory and the write watch. The GPU is busy for about 40–450 ms per frame.
sil-kong commented 2026-11-25 09:08:57 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by sil-kong on 2026-11-25T08:17:48Z.


Follow-up on the 64-lane retry patch: confirmed in game. With it, b22a16a178976e1b translates and gets a host pipeline on the RX 7900 XT (Wine). I didn't see any regression over a run into the prologue cutscene, and the builder still runs (53 pipelines). The scene stays black, so that program wasn't what kept it dark here. The two pixel programs (a descriptor read only as data) are what remains.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7156850695 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7156850695). Originally posted by [sil-kong](https://github.com/sil-kong) on 2026-11-25T08:17:48Z. --- Follow-up on the 64-lane retry patch: confirmed in game. With it, `b22a16a178976e1b` translates and gets a host pipeline on the RX 7900 XT (Wine). I didn't see any regression over a run into the prologue cutscene, and the builder still runs (53 pipelines). The scene stays black, so that program wasn't what kept it dark here. The two pixel programs (`a descriptor read only as data`) are what remains.
sil-kong commented 2026-11-25 10:11:23 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by sil-kong on 2026-11-25T09:33:25Z.


An RDNA3 data point (RX 7900 XT, 64-lane waves), on 90b529f + fxceless/victory-fork#115, #110 and #150. It confirms your result on a second AMD card: the prologue renders with characters, faces and hair, and #115 removes the intro's back-and-forth frames here too. #141 didn't apply to 90b529f without a manual merge, so it isn't in. (This card runs under Linux/Wine, so I'm leaving speed numbers out; they say more about Wine than about AMD.)

Two AMD-relevant findings:

1. Wave64 programs on 64-lane hosts get no retry. Compute b22a16a178976e1b failed with a wave sum of 16-bit floats where not every lane runs. In emit::emit, the retries for programs stopped "where not every lane runs" (without early-outs or skips, then widen) only run when host_max_wave() == 32. half_sum also only records the block (need) on the two-host-wave path, so widen couldn't find the branch anyway. On a 64-lane host, widen is exact and needs no group barrier, since one console wave is one host wave. With the patch below, b22a16a1 translates and gets a host pipeline in game, with no regression seen. cargo test -p victory-shader passes, apart from stub_pipeline_is_created, which fails the same way without the patch when the device is vkd3d-proton.

2. A DirectStorage write into a read-only page, with #115. Twice, inflate or a plain copy into a title destination faulted on a read-only page that the guard's handler declined (the block wasn't in its protected set):

VIctory: unhandled exception 0xc0000005 at ucrtbase.dll+0x159f2 (write 0x14ac30000: read-only)
  miniz_oxide inflate <- dstorage.rs:850 inflate <- :835 <- :958 into_destination <- :831 execute <- :453 work

Once the same thing came back from a file read as hr=0x800703e6 (ERROR_NOACCESS: the kernel reports it instead of faulting). The title then took its own breakpoint at +0x23d8f03 on the null result. Locally I worked around both: the handler makes such a page writable again and notes it written, and the read retries through a buffer. That is a band-aid, not a root cause; it looks like a race between the guard's protect and a remap. I can share it if it helps.

wave64 on 64-lane hosts: retry without early-outs/skips, then widen
diff --git a/crates/victory-shader/src/emit/lower.rs b/crates/victory-shader/src/emit/lower.rs
index 600139a..4e052c8 100644
--- a/crates/victory-shader/src/emit/lower.rs
+++ b/crates/victory-shader/src/emit/lower.rs
@@ -1994,9 +1994,8 @@ impl<'a> Lower<'a> {
             all_lane_blocks(self.x.st).is_some_and(|all| all.get(self.cur_ir).copied().unwrap_or(false))
         };
         if !every {
-            if halves {
-                need(self.cur_ir);
-            }
+            // (on a 64-lane host too: `emit`'s 64-lane retry widens the branches around it)
+            need(self.cur_ir);
             return Err(WHERE);
         }
         let c = self.cur;
diff --git a/crates/victory-shader/src/emit/mod.rs b/crates/victory-shader/src/emit/mod.rs
index b667241..90d662a 100644
--- a/crates/victory-shader/src/emit/mod.rs
+++ b/crates/victory-shader/src/emit/mod.rs
@@ -462,6 +462,58 @@ pub fn emit(
             }
         }
     }
+    // Local fix: a console wave64 compute program on a host of 64-lane waves (AMD RDNA)
+    // stopped where not every lane runs got none of the retries above, which are for
+    // 32-lane hosts. The exact ones apply here as well: the program without its early-outs
+    // or skips, then its per-lane branches taken wave-wide ([`widen`]), which on such a
+    // host needs no group barrier (one console wave is one host wave).
+    // `ZTRX_WAVE64_RETRY=0` turns it off.
+    if native.stage == HwStage::Cs
+        && native.wave64
+        && lower::host_max_wave() >= 64
+        && std::env::var_os("ZTRX_WAVE64_RETRY").is_none_or(|v| v != "0")
+        && matches!(&original, Err(ShaderError::Unsupported { what, .. }) if lower::needs_every_lane(what))
+    {
+        let why = std::env::var_os("VICTORY_WAVE_WHY").is_some();
+        let mut bases = Vec::new();
+        for (name, q) in [
+            ("without early-outs", ir::without_early_outs(p)),
+            ("without skips", ir::without_skips(p, false)),
+            ("without skips, scalars followed", ir::without_skips(p, true)),
+        ] {
+            let Some(q) = q else { continue };
+            let again = (|| {
+                let st = structure::structure(&q).ok()?;
+                let io = io::raise(&q, native).ok()?;
+                let res = resource::track(&q, &native.layout, native.stage, Some(&st)).ok()?;
+                Some(emit_program(c, native, &q, &st, &io, &res))
+            })();
+            if let Some(again) = again {
+                if why {
+                    match &again {
+                        Ok(_) => eprintln!("WAVE64-HOST64 {name}: translated"),
+                        Err(e) => eprintln!("WAVE64-HOST64 {name}: {e}"),
+                    }
+                }
+                if again.is_ok() {
+                    return again.map(|(shader, _)| shader);
+                }
+            }
+            bases.push(q);
+        }
+        for base in bases.iter().chain(std::iter::once(p)) {
+            let again = widen(c, native, base, why);
+            if why {
+                match &again {
+                    Ok(_) => eprintln!("WAVE64-HOST64 wave-wide branches: translated"),
+                    Err(e) => eprintln!("WAVE64-HOST64 wave-wide branches: {e}"),
+                }
+            }
+            if again.is_ok() {
+                return again.map(|(shader, _)| shader);
+            }
+        }
+    }
     // SCC of a mask operation joined with a scalar test behind a per-lane skip (the 32-lane
     // trace programs): right once the wave takes that skip together ([`widen`]; the
     // lowering has named the skipped blocks).
diff --git a/crates/victory-shader/src/emit/wave64_tests.rs b/crates/victory-shader/src/emit/wave64_tests.rs
index db82f33..e6760e4 100644
--- a/crates/victory-shader/src/emit/wave64_tests.rs
+++ b/crates/victory-shader/src/emit/wave64_tests.rs
@@ -95,10 +95,20 @@ fn native_of(body: &[u32], wave64: bool, threads: u32) -> NativeProgram {
 
 /// `program()` for a host of 32-lane waves, with the branches closing `wide` taken wave-wide.
 fn lowered(native: &NativeProgram, p: &ir::Program, wide: &HashSet<usize>) -> Result<HostShader, ShaderError> {
+    lowered_on(32, native, p, wide)
+}
+
+/// [`lowered`] for a host whose widest wave is `host_wave` lanes.
+fn lowered_on(
+    host_wave: u32,
+    native: &NativeProgram,
+    p: &ir::Program,
+    wide: &HashSet<usize>,
+) -> Result<HostShader, ShaderError> {
     let st = structure::structure_wide(p, wide).expect("structure");
     let res = resource::track(p, &native.layout, native.stage, Some(&st)).expect("resource::track");
     let io = io::raise(p, native).expect("io::raise");
-    let was = lower::TEST_HOST_WAVE.replace(Some(32));
+    let was = lower::TEST_HOST_WAVE.replace(Some(host_wave));
     let lowered = lower::lower(&lower::Parts {
         native,
         p,
@@ -258,6 +268,53 @@ fn a_16_bit_sum_rounds_to_nearest_when_asked_to() {
     }
 }
 
+#[test]
+fn a_16_bit_wave_sum_inside_a_lane_branch_on_a_64_lane_host_is_taken_wave_wide() {
+    // Local fix: `program()` with the wave OR's v_or_b32 turned into v_add_f16 (as in
+    // `a_sum_of_halves_over_the_wave_is_the_consoles_tree_bit_for_bit`): a 16-bit float wave
+    // sum inside `if (t < s0)`, on a host of 64-lane waves (AMD RDNA).
+    for (skip, name) in [(0xBF88_0000u32, "s_cbranch_execz"), (0xBF84_0000, "s_cbranch_scc0")] {
+        let mut native = program(skip);
+        let words: Vec<u32> = native
+            .code
+            .as_chunks::<4>()
+            .0
+            .iter()
+            .map(|b| u32::from_le_bytes(*b))
+            .collect();
+        let or = &super::wave::WAVE_OR_V7_TO_S7;
+        let at = words.windows(or.len()).position(|w| w == or).expect("the wave OR");
+        let mut words = words;
+        for w in &mut words[at..at + or.len()] {
+            if *w >> 25 == 28 {
+                *w = *w & 0x01FF_FFFF | 50 << 25;
+            }
+        }
+        native.code = words.iter().flat_map(|w| w.to_le_bytes()).collect();
+        let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build");
+        let branch = (0..p.blocks.len())
+            .find(|&b| p.blocks[b].insts.last().is_some_and(|i| i.name() == name))
+            .expect("the branch");
+        // per lane: refused, and the block is named (before the fix, it was not on this host)
+        lower::take_needs();
+        let per_lane = lowered_on(64, &native, &p, &HashSet::new());
+        assert!(
+            matches!(&per_lane, Err(ShaderError::Unsupported { what, .. }) if *what == "a wave sum of 16-bit floats where not every lane runs"),
+            "{name}: {:?}",
+            per_lane.err()
+        );
+        let needs = lower::take_needs();
+        let st = structure::structure(&p).expect("structure");
+        assert_eq!(lower::branches_around(&st, &needs), Some(vec![branch]), "{name}");
+        // wave-wide: one host wave is the console's wave, every lane runs the sum
+        let shader = lowered_on(64, &native, &p, &HashSet::from([branch])).expect("lower");
+        if let Ok(mut v) = validator::Validator::load(validator::Validator::default_path().as_deref()) {
+            let mut copy = shader.dxil.clone();
+            v.validate(&mut copy).expect("DXIL validation failed");
+        }
+    }
+}
+
 #[test]
 fn a_wave_or_inside_a_lane_branch_needs_the_branch_wave_wide() {
     for (skip, name) in [(0xBF88_0000, "s_cbranch_execz"), (0xBF84_0000, "s_cbranch_scc0")] {
<!-- greyfinch-sync:Zettrox/ztrx:comment:7158490003 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7158490003). Originally posted by [sil-kong](https://github.com/sil-kong) on 2026-11-25T09:33:25Z. --- An RDNA3 data point (RX 7900 XT, 64-lane waves), on `90b529f` + fxceless/victory-fork#115, #110 and #150. It confirms your result on a second AMD card: the prologue renders with characters, faces and hair, and #115 removes the intro's back-and-forth frames here too. #141 didn't apply to `90b529f` without a manual merge, so it isn't in. (This card runs under Linux/Wine, so I'm leaving speed numbers out; they say more about Wine than about AMD.) Two AMD-relevant findings: **1. Wave64 programs on 64-lane hosts get no retry.** Compute `b22a16a178976e1b` failed with `a wave sum of 16-bit floats where not every lane runs`. In `emit::emit`, the retries for programs stopped "where not every lane runs" (without early-outs or skips, then `widen`) only run when `host_max_wave() == 32`. `half_sum` also only records the block (`need`) on the two-host-wave path, so `widen` couldn't find the branch anyway. On a 64-lane host, `widen` is exact and needs no group barrier, since one console wave is one host wave. With the patch below, `b22a16a1` translates and gets a host pipeline in game, with no regression seen. `cargo test -p victory-shader` passes, apart from `stub_pipeline_is_created`, which fails the same way without the patch when the device is vkd3d-proton. **2. A DirectStorage write into a read-only page, with #115.** Twice, inflate or a plain copy into a title destination faulted on a read-only page that the guard's handler declined (the block wasn't in its protected set): ``` VIctory: unhandled exception 0xc0000005 at ucrtbase.dll+0x159f2 (write 0x14ac30000: read-only) miniz_oxide inflate <- dstorage.rs:850 inflate <- :835 <- :958 into_destination <- :831 execute <- :453 work ``` Once the same thing came back from a file read as `hr=0x800703e6` (ERROR_NOACCESS: the kernel reports it instead of faulting). The title then took its own breakpoint at `+0x23d8f03` on the null result. Locally I worked around both: the handler makes such a page writable again and notes it written, and the read retries through a buffer. That is a band-aid, not a root cause; it looks like a race between the guard's protect and a remap. I can share it if it helps. <details><summary>wave64 on 64-lane hosts: retry without early-outs/skips, then widen</summary> ```diff diff --git a/crates/victory-shader/src/emit/lower.rs b/crates/victory-shader/src/emit/lower.rs index 600139a..4e052c8 100644 --- a/crates/victory-shader/src/emit/lower.rs +++ b/crates/victory-shader/src/emit/lower.rs @@ -1994,9 +1994,8 @@ impl<'a> Lower<'a> { all_lane_blocks(self.x.st).is_some_and(|all| all.get(self.cur_ir).copied().unwrap_or(false)) }; if !every { - if halves { - need(self.cur_ir); - } + // (on a 64-lane host too: `emit`'s 64-lane retry widens the branches around it) + need(self.cur_ir); return Err(WHERE); } let c = self.cur; diff --git a/crates/victory-shader/src/emit/mod.rs b/crates/victory-shader/src/emit/mod.rs index b667241..90d662a 100644 --- a/crates/victory-shader/src/emit/mod.rs +++ b/crates/victory-shader/src/emit/mod.rs @@ -462,6 +462,58 @@ pub fn emit( } } } + // Local fix: a console wave64 compute program on a host of 64-lane waves (AMD RDNA) + // stopped where not every lane runs got none of the retries above, which are for + // 32-lane hosts. The exact ones apply here as well: the program without its early-outs + // or skips, then its per-lane branches taken wave-wide ([`widen`]), which on such a + // host needs no group barrier (one console wave is one host wave). + // `ZTRX_WAVE64_RETRY=0` turns it off. + if native.stage == HwStage::Cs + && native.wave64 + && lower::host_max_wave() >= 64 + && std::env::var_os("ZTRX_WAVE64_RETRY").is_none_or(|v| v != "0") + && matches!(&original, Err(ShaderError::Unsupported { what, .. }) if lower::needs_every_lane(what)) + { + let why = std::env::var_os("VICTORY_WAVE_WHY").is_some(); + let mut bases = Vec::new(); + for (name, q) in [ + ("without early-outs", ir::without_early_outs(p)), + ("without skips", ir::without_skips(p, false)), + ("without skips, scalars followed", ir::without_skips(p, true)), + ] { + let Some(q) = q else { continue }; + let again = (|| { + let st = structure::structure(&q).ok()?; + let io = io::raise(&q, native).ok()?; + let res = resource::track(&q, &native.layout, native.stage, Some(&st)).ok()?; + Some(emit_program(c, native, &q, &st, &io, &res)) + })(); + if let Some(again) = again { + if why { + match &again { + Ok(_) => eprintln!("WAVE64-HOST64 {name}: translated"), + Err(e) => eprintln!("WAVE64-HOST64 {name}: {e}"), + } + } + if again.is_ok() { + return again.map(|(shader, _)| shader); + } + } + bases.push(q); + } + for base in bases.iter().chain(std::iter::once(p)) { + let again = widen(c, native, base, why); + if why { + match &again { + Ok(_) => eprintln!("WAVE64-HOST64 wave-wide branches: translated"), + Err(e) => eprintln!("WAVE64-HOST64 wave-wide branches: {e}"), + } + } + if again.is_ok() { + return again.map(|(shader, _)| shader); + } + } + } // SCC of a mask operation joined with a scalar test behind a per-lane skip (the 32-lane // trace programs): right once the wave takes that skip together ([`widen`]; the // lowering has named the skipped blocks). diff --git a/crates/victory-shader/src/emit/wave64_tests.rs b/crates/victory-shader/src/emit/wave64_tests.rs index db82f33..e6760e4 100644 --- a/crates/victory-shader/src/emit/wave64_tests.rs +++ b/crates/victory-shader/src/emit/wave64_tests.rs @@ -95,10 +95,20 @@ fn native_of(body: &[u32], wave64: bool, threads: u32) -> NativeProgram { /// `program()` for a host of 32-lane waves, with the branches closing `wide` taken wave-wide. fn lowered(native: &NativeProgram, p: &ir::Program, wide: &HashSet<usize>) -> Result<HostShader, ShaderError> { + lowered_on(32, native, p, wide) +} + +/// [`lowered`] for a host whose widest wave is `host_wave` lanes. +fn lowered_on( + host_wave: u32, + native: &NativeProgram, + p: &ir::Program, + wide: &HashSet<usize>, +) -> Result<HostShader, ShaderError> { let st = structure::structure_wide(p, wide).expect("structure"); let res = resource::track(p, &native.layout, native.stage, Some(&st)).expect("resource::track"); let io = io::raise(p, native).expect("io::raise"); - let was = lower::TEST_HOST_WAVE.replace(Some(32)); + let was = lower::TEST_HOST_WAVE.replace(Some(host_wave)); let lowered = lower::lower(&lower::Parts { native, p, @@ -258,6 +268,53 @@ fn a_16_bit_sum_rounds_to_nearest_when_asked_to() { } } +#[test] +fn a_16_bit_wave_sum_inside_a_lane_branch_on_a_64_lane_host_is_taken_wave_wide() { + // Local fix: `program()` with the wave OR's v_or_b32 turned into v_add_f16 (as in + // `a_sum_of_halves_over_the_wave_is_the_consoles_tree_bit_for_bit`): a 16-bit float wave + // sum inside `if (t < s0)`, on a host of 64-lane waves (AMD RDNA). + for (skip, name) in [(0xBF88_0000u32, "s_cbranch_execz"), (0xBF84_0000, "s_cbranch_scc0")] { + let mut native = program(skip); + let words: Vec<u32> = native + .code + .as_chunks::<4>() + .0 + .iter() + .map(|b| u32::from_le_bytes(*b)) + .collect(); + let or = &super::wave::WAVE_OR_V7_TO_S7; + let at = words.windows(or.len()).position(|w| w == or).expect("the wave OR"); + let mut words = words; + for w in &mut words[at..at + or.len()] { + if *w >> 25 == 28 { + *w = *w & 0x01FF_FFFF | 50 << 25; + } + } + native.code = words.iter().flat_map(|w| w.to_le_bytes()).collect(); + let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build"); + let branch = (0..p.blocks.len()) + .find(|&b| p.blocks[b].insts.last().is_some_and(|i| i.name() == name)) + .expect("the branch"); + // per lane: refused, and the block is named (before the fix, it was not on this host) + lower::take_needs(); + let per_lane = lowered_on(64, &native, &p, &HashSet::new()); + assert!( + matches!(&per_lane, Err(ShaderError::Unsupported { what, .. }) if *what == "a wave sum of 16-bit floats where not every lane runs"), + "{name}: {:?}", + per_lane.err() + ); + let needs = lower::take_needs(); + let st = structure::structure(&p).expect("structure"); + assert_eq!(lower::branches_around(&st, &needs), Some(vec![branch]), "{name}"); + // wave-wide: one host wave is the console's wave, every lane runs the sum + let shader = lowered_on(64, &native, &p, &HashSet::from([branch])).expect("lower"); + if let Ok(mut v) = validator::Validator::load(validator::Validator::default_path().as_deref()) { + let mut copy = shader.dxil.clone(); + v.validate(&mut copy).expect("DXIL validation failed"); + } + } +} + #[test] fn a_wave_or_inside_a_lane_branch_needs_the_branch_wave_wide() { for (skip, name) in [(0xBF88_0000, "s_cbranch_execz"), (0xBF84_0000, "s_cbranch_scc0")] { ``` </details>
dodo4154 commented 2026-11-25 15:08:45 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T14:27:33Z.


Same driver message we get on RDNA3, so this looks like one AMD problem rather than two: on an RX 7600 (8 GB, RDNA3) the release at 90b529f also ends in 0xc0000005, and one of ours lands inside the driver path rather than in the layer (victory-image+0x23cf683 on a write to 0). Your CS_RaytracingResolve screen is the useful part: 66 hashes that the AMD compiler refuses is a concrete, shareable list, and the fact that a run with them skipped reached the prison cell hands-on at 1-2 FPS matches what we see.

Yes please to the hashes and the prewarm patch. Two things on our side that may save you time:

  • A stack that survives 20 minutes here without any exception, on a card one tier below yours: 90b529f + #141 + #110 + #150 + myokex/victory-amd c6dc4d8c (a write through one view is seen at its other views) + 10ea38ed (kernel reads into title memory beside and copied in), with #115 dropped as the subsumed one. Frame time 422-427 ms, distinct colours/brightness 3881/57.5 against 3434/46.1 before. The second commit is the one that ends a hr=0x800706f8 DirectStorage failure that stopped the title seconds after the first world frame.
  • sil-kong in this thread has a patch for the a wave sum of 16-bit floats where not every lane runs retry that only arms on 32-lane hosts; if your 9070 XT reports 64 lanes like our 7600 does, that may remove one more refused program without any hash list.

If you post the hashes as a file or a comment, I will fold them into the skip list on our card and report whether the 20-minute run still holds.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7165309231 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7165309231). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T14:27:33Z. --- Same driver message we get on RDNA3, so this looks like one AMD problem rather than two: on an RX 7600 (8 GB, RDNA3) the release at `90b529f` also ends in `0xc0000005`, and one of ours lands inside the driver path rather than in the layer (`victory-image+0x23cf683` on a write to 0). Your `CS_RaytracingResolve` screen is the useful part: 66 hashes that the AMD compiler refuses is a concrete, shareable list, and the fact that a run with them skipped reached the prison cell hands-on at 1-2 FPS matches what we see. Yes please to the hashes and the prewarm patch. Two things on our side that may save you time: - A stack that survives 20 minutes here without any exception, on a card one tier below yours: `90b529f` + `#141` + `#110` + `#150` + `myokex/victory-amd` `c6dc4d8c` (a write through one view is seen at its other views) + `10ea38ed` (kernel reads into title memory beside and copied in), with `#115` dropped as the subsumed one. Frame time 422-427 ms, distinct colours/brightness 3881/57.5 against 3434/46.1 before. The second commit is the one that ends a `hr=0x800706f8` DirectStorage failure that stopped the title seconds after the first world frame. - `sil-kong` in this thread has a patch for the `a wave sum of 16-bit floats where not every lane runs` retry that only arms on 32-lane hosts; if your 9070 XT reports 64 lanes like our 7600 does, that may remove one more refused program without any hash list. If you post the hashes as a file or a comment, I will fold them into the skip list on our card and report whether the 20-minute run still holds.
dodo4154 commented 2026-11-25 15:08:45 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T14:27:38Z.


Your wave64 finding is the one I can test directly, because our card is the same wave shape: an RX 7600 reports host wave lanes min=32 max=64, and b22a16a178976e1b is exactly the hash our runs still print as

WARN victory_gpu::pipeline: shader does not translate; its pipelines' draws are dropped stage="compute" hash=b22a16a178976e1b
  error=converter shader.dxil v1: GFX10 code at 0x22c: a wave sum of 16-bit floats where not every lane runs is not supported

so on a 64-lane host that program is being refused for a reason the retry path cannot see. If you can paste the patch — or just the two hunks you describe, the host_max_wave() condition in emit::emit and the need call on the single-wave path in half_sum — I will apply it to 90b529f + #141 + #110 + #150 + myokex/victory-amd c6dc4d8c and 10ea38ed and report whether that program gains a host pipeline here and whether anything regresses over a 20-minute run.

Your second finding matches something we hit and then stopped hitting: with #115 in the tree we lost the title to a DirectStorage read failing with hr=0x800706f8, and 10ea38ed ("kernel reads into title memory are read beside and copied in") is the commit that ends it — it exists precisely because a block could be guarded again between kernel_will_write and the read. That commit also supersedes #115: it carries the every-view guard plus the kernel-read half, which is why we run it instead now.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7165311653 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7165311653). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T14:27:38Z. --- Your wave64 finding is the one I can test directly, because our card is the same wave shape: an RX 7600 reports `host wave lanes min=32 max=64`, and `b22a16a178976e1b` is exactly the hash our runs still print as ``` WARN victory_gpu::pipeline: shader does not translate; its pipelines' draws are dropped stage="compute" hash=b22a16a178976e1b error=converter shader.dxil v1: GFX10 code at 0x22c: a wave sum of 16-bit floats where not every lane runs is not supported ``` so on a 64-lane host that program is being refused for a reason the retry path cannot see. If you can paste the patch — or just the two hunks you describe, the `host_max_wave()` condition in `emit::emit` and the `need` call on the single-wave path in `half_sum` — I will apply it to `90b529f` + `#141` + `#110` + `#150` + `myokex/victory-amd` `c6dc4d8c` and `10ea38ed` and report whether that program gains a host pipeline here and whether anything regresses over a 20-minute run. Your second finding matches something we hit and then stopped hitting: with `#115` in the tree we lost the title to a DirectStorage read failing with `hr=0x800706f8`, and `10ea38ed` ("kernel reads into title memory are read beside and copied in") is the commit that ends it — it exists precisely because a block could be guarded again between `kernel_will_write` and the read. That commit also supersedes `#115`: it carries the every-view guard plus the kernel-read half, which is why we run it instead now.
sil-kong commented 2026-11-25 16:13:06 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by sil-kong on 2026-11-25T15:10:31Z.


@dodo4154 it's already there: the collapsed "wave64 on 64-lane hosts: retry without early-outs/skips, then widen" block at the end of my comment (https://github.com/Zettrox/ztrx/issues/46#issuecomment-7158490003). It holds both hunks, the need(self.cur_ir) change in half_sum (lower.rs) and the 64-lane retry in emit::emit (emit/mod.rs, switch ZTRX_WAVE64_RETRY=0), plus a test in wave64_tests.rs. It's against plain 90b529f; I haven't tried it with #141 or the two myokex/victory-amd commits, so mod.rs may need a small manual merge there. Thanks for the pointer to 10ea38ed, that fits what I saw with #115.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7166421968 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7166421968). Originally posted by [sil-kong](https://github.com/sil-kong) on 2026-11-25T15:10:31Z. --- @dodo4154 it's already there: the collapsed "wave64 on 64-lane hosts: retry without early-outs/skips, then widen" block at the end of my comment (https://github.com/Zettrox/ztrx/issues/46#issuecomment-7158490003). It holds both hunks, the `need(self.cur_ir)` change in `half_sum` (`lower.rs`) and the 64-lane retry in `emit::emit` (`emit/mod.rs`, switch `ZTRX_WAVE64_RETRY=0`), plus a test in `wave64_tests.rs`. It's against plain `90b529f`; I haven't tried it with #141 or the two `myokex/victory-amd` commits, so `mod.rs` may need a small manual merge there. Thanks for the pointer to `10ea38ed`, that fits what I saw with #115.
dodo4154 commented 2026-11-25 16:13:07 +00:00 (Migrated from github.com)
Author

Imported from Zettrox/ztrx. Originally posted by dodo4154 on 2026-11-25T15:14:53Z.


Applied, and it lands cleanly on the stack we run: 90b529f + #141 + #110 + #150 + myokex/victory-amd c6dc4d8c + 10ea38ed, then your patch — lower.rs, mod.rs and wave64_tests.rs all applied without a manual merge, and cargo test -p victory-shader gives 214 passed, 0 failed (213 before it, so your test is running here too).

For the record, I had written the same two hunks by hand from your description before finding your block, and yours is the better version: the ZTRX_WAVE64_RETRY switch and the test that asserts the branch is named and then lowers wave-wide are exactly what a change to half_sum needs. I am keeping yours and dropping mine.

One caveat on how this gets confirmed: the offline census cannot see the difference. set_host_max_wave is only called from victory-gpu/src/host.rs when a D3D12 device is created (WaveLaneCountMax), so victory translate keeps host_max_wave() at 32 and never takes the 64-lane path — the census still lists b22a16a178976e1b as refused. The real check is one game run on the card: whether that hash gains a host pipeline and whether a 20-minute run still holds. I will report both numbers here when I have them.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7166537691 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/issues/46#issuecomment-7166537691). Originally posted by [dodo4154](https://github.com/dodo4154) on 2026-11-25T15:14:53Z. --- Applied, and it lands cleanly on the stack we run: `90b529f` + `#141` + `#110` + `#150` + `myokex/victory-amd` `c6dc4d8c` + `10ea38ed`, then your patch — `lower.rs`, `mod.rs` and `wave64_tests.rs` all applied without a manual merge, and `cargo test -p victory-shader` gives **214 passed, 0 failed** (213 before it, so your test is running here too). For the record, I had written the same two hunks by hand from your description before finding your block, and yours is the better version: the `ZTRX_WAVE64_RETRY` switch and the test that asserts the branch is named and then lowers wave-wide are exactly what a change to `half_sum` needs. I am keeping yours and dropping mine. One caveat on how this gets confirmed: the offline census cannot see the difference. `set_host_max_wave` is only called from `victory-gpu/src/host.rs` when a D3D12 device is created (`WaveLaneCountMax`), so `victory translate` keeps `host_max_wave()` at 32 and never takes the 64-lane path — the census still lists `b22a16a178976e1b` as refused. The real check is one game run on the card: whether that hash gains a host pipeline and whether a 20-minute run still holds. I will report both numbers here when I have them.
Sign in to join this conversation.
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
Zettrox/ztrx#46
No description provided.