Buffer record counts from the host's table, not a size query (AMD RDNA 4 compiler crash) #55

Open
github-bot wants to merge 2 commits from github-bot/gh-55 into main AGit
Owner

@⁠tightfall on GitHub · 2026-11-26 00:35 UTC · original
tightfall:rdna4-slot-counts → main · +286 −24 · 6 files · 2 commits · open

On RDNA 4 the AMD driver's shader compiler crashes inside CreateComputePipelineState (amdxc64.dll, an access violation reading address 0x8) on translated compute programs that ask for the size of a raw buffer (getDimensions of a ByteAddressBuffer) picked from the view heap or from a descriptor table. The run ends there. On an RX 9070 this happened every few minutes in the world: CS_RaytracingResolve variants, bvh_skinning:CSComputeSkinningTreeAnimVelocity, and in a street chase. Belobug found the same for heap structured buffers (Belobug/VIctory-Belobug-AMD@1503444b); this is that idea on this tree, extended to descriptor tables.

What it does

  • The host's table by heap slot (SLOT_STRIDES) gets a second half: from SLOT_COUNTS_AT on, dword i is the record count of the buffer view at heap slot i as the console's descriptor holds it (elements of a structured or typed view, bytes of a raw one). note_buffer writes it next to the stride (view_records).
  • descriptor_data reads the count there instead of emitting a size query, for views that come from the heap or a table. Root views keep the query.
  • VICTORY_SLOT_COUNTS=0 gives the old size query. It is part of the shader cache key (host_settings), so switching it does not reuse stale translations.
  • The shader test harness binds the table when a shader has the root SRV (waterfall_tests::slot_table). The two record-count tests set the console's count, since their host view is raw.

Tested

RX 9070 (RDNA 4), Windows 11, Adrenalin 26.11.2.

  • Offline (translate --pipelines, one shader at a time): the two programs that crashed the compiler every time now build and validate. Before: a segfault in amdxc64.dll each time.
  • the_record_count_of_a_structured_buffer_read_by_index crashed the test process on this GPU on unmodified main, the same compiler fault. With this change, all 8 size_tests pass on the hardware adapter and on WARP.
  • cargo test -p victory-shader --lib (278 passed) and cargo test -p victory-gpu --lib (326 passed). cargo xtask policy ok.
  • translate --validate over the whole shader pack: the same totals with and without the change (14220 VS/PS, 2677 CS, 8673 mesh validated).
  • In game, with scripts/play.ps1 settings and nothing skipped: 27 minutes and still running, through the street chase where it had crashed before, no compiler crash. Before, four runs in a row ended in this crash after 1 to 10 minutes (the last two already skipping the CS_RaytracingResolve programs).

Not tested on RDNA 3 or other vendors. The change only replaces a size query with a table read, so it should not matter there, but I have no such card to check.

This change was made with AI assistance (Claude Code).

🤖 Generated with Claude Code

**@⁠tightfall** on GitHub · 2026-11-26 00:35 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55) `tightfall:rdna4-slot-counts` → `main` · +286 −24 · 6 files · 2 commits · open On RDNA 4 the AMD driver's shader compiler crashes inside `CreateComputePipelineState` (`amdxc64.dll`, an access violation reading address `0x8`) on translated compute programs that ask for the size of a **raw buffer** (`getDimensions` of a `ByteAddressBuffer`) picked from the view heap or from a descriptor table. The run ends there. On an RX 9070 this happened every few minutes in the world: `CS_RaytracingResolve` variants, `bvh_skinning:CSComputeSkinningTreeAnimVelocity`, and in a street chase. Belobug found the same for heap structured buffers (Belobug/VIctory-Belobug-AMD@1503444b); this is that idea on this tree, extended to descriptor tables. ## What it does - The host's table by heap slot (`SLOT_STRIDES`) gets a second half: from `SLOT_COUNTS_AT` on, dword `i` is the record count of the buffer view at heap slot `i` as the console's descriptor holds it (elements of a structured or typed view, bytes of a raw one). `note_buffer` writes it next to the stride (`view_records`). - `descriptor_data` reads the count there instead of emitting a size query, for views that come from the heap or a table. Root views keep the query. - `VICTORY_SLOT_COUNTS=0` gives the old size query. It is part of the shader cache key (`host_settings`), so switching it does not reuse stale translations. - The shader test harness binds the table when a shader has the root SRV (`waterfall_tests::slot_table`). The two record-count tests set the console's count, since their host view is raw. ## Tested RX 9070 (RDNA 4), Windows 11, Adrenalin 26.11.2. - Offline (`translate --pipelines`, one shader at a time): the two programs that crashed the compiler every time now build and validate. Before: a segfault in `amdxc64.dll` each time. - `the_record_count_of_a_structured_buffer_read_by_index` crashed the test process on this GPU on unmodified `main`, the same compiler fault. With this change, all 8 `size_tests` pass on the hardware adapter and on WARP. - `cargo test -p victory-shader --lib` (278 passed) and `cargo test -p victory-gpu --lib` (326 passed). `cargo xtask policy` ok. - `translate --validate` over the whole shader pack: the same totals with and without the change (14220 VS/PS, 2677 CS, 8673 mesh validated). - In game, with `scripts/play.ps1` settings and nothing skipped: 27 minutes and still running, through the street chase where it had crashed before, no compiler crash. Before, four runs in a row ended in this crash after 1 to 10 minutes (the last two already skipping the `CS_RaytracingResolve` programs). Not tested on RDNA 3 or other vendors. The change only replaces a size query with a table read, so it should not matter there, but I have no such card to check. This change was made with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The AMD driver's compiler (amdxc64.dll, RDNA 4) faults reading 0x8 inside
CreateComputePipelineState on raw buffers' size queries of views picked from
the heap or a descriptor table (bvh_skinning, CS_RaytracingResolve, ...).
The host's table by heap slot (SLOT_STRIDES) gets a second half with each
buffer view's record count as the console's descriptor holds it, and shaders
read it there. VICTORY_SLOT_COUNTS=0: queried as before. After Belobug 1503444b.

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

@⁠FrozenGuy7 on GitHub · 2026-11-26 01:43 UTC · original

Tested on an RX 9070 XT: no compiler crash at all, and no skip list needed.

Host: RX 9070 XT 16 GB (RDNA 4), Adrenalin 26.11.2 (32.0.32029.2010), Ryzen 7 9800X3D, 32 GB, Windows 11 26300. Diagnostics build of 0a43566 + this PR (ae39f3c) + #24 + #53, merged cleanly. Default VICTORY_SHADER_OPT.

Offline, one shader per process: I have 70 compute containers that faulted amdxc64.dll+0x861b9f on 0a43566 in my game runs, kept locally (method on #52). Results, as faults out of 70:

build faults
0a43566 66
0a43566, VICTORY_SHADER_OPT=59 4
0a43566 + this PR (+ #24, #53) 0
the same, VICTORY_SHADER_OPT=59 0

So this covers both triggers on this tree. The 4 that =59 leaves are BrokeAsh's self-sized loads (PastiiJay/klbf-lab#2). The 66 others are the shaders =59 fixes by turning the clean-up pass off.

Whole recorded set: victory warm over the 88,576 pipelines my runs recorded (VICTORY_PIPELINE_BOOK=1), cold AMD DxcCache: 88,507 made in 490 s, and 9 child processes ended. Retried alone, those 9 plus the 60 that had faulted on 0a43566 were all made, with 0 faults. So I read the 9 as collateral from a shared process, not as new faults.

In game: play.ps1 -Safe with #53's FSR and Frame Generation 4.0.2, nothing in VICTORY_SKIP_PIPELINES. 36 min through the prologue into free roam (the first time this machine got there), 3,358 host pipelines made in the run, 0 amdxc64 faults, and #53's compiler guard never triggered. Before this PR, every run on this machine ended in this fault, between 9 s and 12 min.

cargo test -p victory-shader --lib: 278 passed on the merged tree.

AI-assisted: the tests and this text were done with Claude Code; the hardware and runs are mine.

**@⁠FrozenGuy7** on GitHub · 2026-11-26 01:43 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7180065841) **Tested on an RX 9070 XT: no compiler crash at all, and no skip list needed.** **Host:** RX 9070 XT 16 GB (RDNA 4), Adrenalin 26.11.2 (32.0.32029.2010), Ryzen 7 9800X3D, 32 GB, Windows 11 26300. Diagnostics build of `0a43566` + this PR (`ae39f3c`) + #24 + #53, merged cleanly. Default `VICTORY_SHADER_OPT`. **Offline, one shader per process:** I have 70 compute containers that faulted `amdxc64.dll+0x861b9f` on `0a43566` in my game runs, kept locally (method on #52). Results, as faults out of 70: | build | faults | | --- | ---: | | `0a43566` | 66 | | `0a43566`, `VICTORY_SHADER_OPT=59` | 4 | | `0a43566` + this PR (+ #24, #53) | **0** | | the same, `VICTORY_SHADER_OPT=59` | 0 | So this covers both triggers on this tree. The 4 that `=59` leaves are BrokeAsh's self-sized loads (PastiiJay/klbf-lab#2). The 66 others are the shaders `=59` fixes by turning the clean-up pass off. **Whole recorded set:** `victory warm` over the 88,576 pipelines my runs recorded (`VICTORY_PIPELINE_BOOK=1`), cold AMD `DxcCache`: 88,507 made in 490 s, and 9 child processes ended. Retried alone, those 9 plus the 60 that had faulted on `0a43566` were all made, with 0 faults. So I read the 9 as collateral from a shared process, not as new faults. **In game:** `play.ps1 -Safe` with #53's FSR and Frame Generation 4.0.2, nothing in `VICTORY_SKIP_PIPELINES`. 36 min through the prologue into free roam (the first time this machine got there), 3,358 host pipelines made in the run, **0 `amdxc64` faults**, and #53's compiler guard never triggered. Before this PR, every run on this machine ended in this fault, between 9 s and 12 min. `cargo test -p victory-shader --lib`: 278 passed on the merged tree. AI-assisted: the tests and this text were done with Claude Code; the hardware and runs are mine.
Author
Owner

@⁠Toons29 on GitHub · 2026-11-26 03:09 UTC · original

Tested on a plain RX 9070 (non-XT) at the newest main: no compiler crash, into the first mission. Without this PR the same setup crashes at amdxc64.dll+0x861b9f in the opening cutscene.

GPU AMD Radeon RX 9070 (RDNA 4, non-XT), Adrenalin 26.11.2, driver 32.0.32029.2010
CPU / RAM Ryzen 7 7800X3D / 32 GB, Windows 11 build 26300
Build e2a28ec + this PR (ae39f3c), merged cleanly; cargo +stable build --locked --profile diag -p victory --features diagnostics (Rust 1.100.0)
Run scripts\play.ps1 settings, normal mode (no -Safe), Series X profile, title 1.0.2.1, no warm / shaders beforehand, no skip list
e2a28ec alone e2a28ec + #55
Result crash at amdxc64.dll+0x861b9f (read 0x8) about 50 s into the opening cutscene, 6:11 in no crash in 18 min. Ended by closing the window, exit code 0, nothing new in crashes.log
Reached opening cutscene prison cell, the office cutscene, the start of the first robbery
Menus / videos 30 fps 30 fps
Opening cutscene (cold) ~3 fps 2.4-3.6 fps, 200-850 draws/frame dropped while up to 1,392 pipelines were still being made
In the world (prison → robbery) — median 14 fps over 101 frame-rate lines (1.5-23.2; 21 lines under 5 fps), median 402 draws/frame dropped, 0 pipelines being made after the cutscene
Memory 29.4 GB private at the crash up to 38.4 GB private; Windows down to 0.3 GB left to commit at its lowest, but no crash from it

Seen in play (not checked against the PR's base without it, since that build never got this far):

  • The opening cutscene showed mostly the credits art over a dark background, not the scene.
  • Lips don't move in cutscenes and eyes look odd.
  • Some flickering in the prison.

These match what #13 describes for VICTORY_CARD_STEPS, so they are probably not from this PR.

Log warnings in the #55 run: 29× "a pipeline creation method that is not implemented: the title goes without this pipeline", 200× "a texture picked by index changed after its upload", 15× "placed unordered texture view not mirrored". No device removal, no TDR, no PC reset.

AI use: Claude Code (Claude Opus 5.5) built and merged the test build, read the logs and wrote and posted this comment on my behalf with my go-ahead. I played the game myself.

**@⁠Toons29** on GitHub · 2026-11-26 03:09 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7181440142) **Tested on a plain RX 9070 (non-XT) at the newest `main`: no compiler crash, into the first mission. Without this PR the same setup crashes at `amdxc64.dll+0x861b9f` in the opening cutscene.** | | | |---|---| | GPU | AMD Radeon RX 9070 (RDNA 4, non-XT), Adrenalin 26.11.2, driver 32.0.32029.2010 | | CPU / RAM | Ryzen 7 7800X3D / 32 GB, Windows 11 build 26300 | | Build | `e2a28ec` + this PR (`ae39f3c`), merged cleanly; `cargo +stable build --locked --profile diag -p victory --features diagnostics` (Rust 1.100.0) | | Run | `scripts\play.ps1` settings, normal mode (no `-Safe`), Series X profile, title 1.0.2.1, no `warm` / `shaders` beforehand, no skip list | | | `e2a28ec` alone | `e2a28ec` + #55 | |---|---|---| | Result | crash at `amdxc64.dll+0x861b9f` (read 0x8) about 50 s into the opening cutscene, 6:11 in | **no crash in 18 min**. Ended by closing the window, exit code 0, nothing new in `crashes.log` | | Reached | opening cutscene | prison cell, the office cutscene, the start of the first robbery | | Menus / videos | 30 fps | 30 fps | | Opening cutscene (cold) | ~3 fps | 2.4-3.6 fps, 200-850 draws/frame dropped while up to 1,392 pipelines were still being made | | In the world (prison → robbery) | — | median 14 fps over 101 frame-rate lines (1.5-23.2; 21 lines under 5 fps), median 402 draws/frame dropped, 0 pipelines being made after the cutscene | | Memory | 29.4 GB private at the crash | up to 38.4 GB private; Windows down to 0.3 GB left to commit at its lowest, but no crash from it | Seen in play (not checked against the PR's base without it, since that build never got this far): - The opening cutscene showed mostly the credits art over a dark background, not the scene. - Lips don't move in cutscenes and eyes look odd. - Some flickering in the prison. These match what #13 describes for `VICTORY_CARD_STEPS`, so they are probably not from this PR. Log warnings in the #55 run: 29× "a pipeline creation method that is not implemented: the title goes without this pipeline", 200× "a texture picked by index changed after its upload", 15× "placed unordered texture view not mirrored". No device removal, no TDR, no PC reset. AI use: Claude Code (Claude Opus 5.5) built and merged the test build, read the logs and wrote and posted this comment on my behalf with my go-ahead. I played the game myself.
Author
Owner

@⁠whiteblackonezero on GitHub · 2026-11-26 03:03 UTC · original · approved these changes

**@⁠whiteblackonezero** on GitHub · 2026-11-26 03:03 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#pullrequestreview-6067990883) · **approved these changes**
Author
Owner

@⁠Jrjy3 on GitHub · 2026-11-26 05:10 UTC · original

Tested on an AMD Radeon AI PRO R9700 (RDNA 4, 32 GB), driver 32.0.32015.2008, an older build than the 32.0.32029 used above. Same compiler fault, and this PR fixes it.

Windows 11 26300, diag build of b0cfe2b + this PR (ae39f3c), merged cleanly. scripts\play.ps1 settings, no skip list.

  • Before: every run died in the world load (about 45-60 s in) at amdxc64.dll+0x85f80f (read 0x8, rcx 0, the same registers as the reports here; the offset moves with the driver build), inside CreateComputePipelineState. 5 compute programs crashed it across 4 runs: 3fa1fda35402c93f, 52ab310c43b9f99c, 501f0865fdf45dfd, a1266cc7391ae0d6, a73284b60aa303ed. All are near-identical wave32 programs of about 48k lines of DXIL, in which one raw-buffer heap handle feeds a getDimensions and 9-35 rawBufferLoads. Clearing the driver's DXC cache did not change it.
  • With this PR: all 5 build without a fault. In game it reached the world and stayed there more than 5 minutes (up to 7,561 draws/frame, 1,778 host pipelines made) with no exception.
  • size_tests on hardware: the_record_count_of_a_structured_buffer_read_by_index kills the test process on this card on unmodified b0cfe2b. With this PR all 8 pass, and cargo test -p victory-shader --lib passes (278).
  • For comparison, a port of upstream Marvisak/VIctory#2122: on its own it did not help here, because the reuse pass merges the size query's handle back into the loads' handle (the same thing VICTORY_SHADER_OPT=59 works around above). With the handle kept out of that pass it also got past the load in game, but the hardware test above still crashed with it. This PR's table read is the more complete fix.

AI-assisted (Claude Code).

**@⁠Jrjy3** on GitHub · 2026-11-26 05:10 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7183246155) **Tested on an AMD Radeon AI PRO R9700 (RDNA 4, 32 GB), driver 32.0.32015.2008, an older build than the 32.0.32029 used above. Same compiler fault, and this PR fixes it.** Windows 11 26300, diag build of `b0cfe2b` + this PR (`ae39f3c`), merged cleanly. `scripts\play.ps1` settings, no skip list. - **Before:** every run died in the world load (about 45-60 s in) at `amdxc64.dll+0x85f80f` (read `0x8`, `rcx 0`, the same registers as the reports here; the offset moves with the driver build), inside `CreateComputePipelineState`. 5 compute programs crashed it across 4 runs: `3fa1fda35402c93f`, `52ab310c43b9f99c`, `501f0865fdf45dfd`, `a1266cc7391ae0d6`, `a73284b60aa303ed`. All are near-identical wave32 programs of about 48k lines of DXIL, in which one raw-buffer heap handle feeds a `getDimensions` and 9-35 `rawBufferLoad`s. Clearing the driver's DXC cache did not change it. - **With this PR:** all 5 build without a fault. In game it reached the world and stayed there more than 5 minutes (up to 7,561 draws/frame, 1,778 host pipelines made) with no exception. - **`size_tests` on hardware:** `the_record_count_of_a_structured_buffer_read_by_index` kills the test process on this card on unmodified `b0cfe2b`. With this PR all 8 pass, and `cargo test -p victory-shader --lib` passes (278). - **For comparison, a port of upstream Marvisak/VIctory#2122:** on its own it did not help here, because the reuse pass merges the size query's handle back into the loads' handle (the same thing `VICTORY_SHADER_OPT=59` works around above). With the handle kept out of that pass it also got past the load in game, but the hardware test above still crashed with it. This PR's table read is the more complete fix. AI-assisted (Claude Code).
Author
Owner

@⁠mavis140 on GitHub · 2026-11-26 07:29 UTC · original

Test report: RX 9070 XT (RDNA 4), 38 minutes, no compiler crash

Hardware: Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010 · Ryzen 7 9800X3D · 32 GB DDR5 · Windows 11 build 26200.
Build: this PR's head ae39f3c, cargo build --locked --profile diag -p victory --features diagnostics, Series X profile.

One thing that differs from a clean checkout: the build also carried the crash guard from Belobug's tree
(0d2f6a6, 95e935d: a pipeline whose creation crashes the driver's compiler is recorded in
crashed.txt and left out). So "no crash" below means the guard caught nothing, not that a crash was hidden.

Before (main e2a28ec + the same guard, same card): 37 pipelines ended up in crashed.txt over the runs of one
evening; without the guard the process died about 3 minutes in at amdxc64.dll+0x861b9f.

With this PR, starting from a copy of the cache with crashed.txt removed:

run settings length compiler crashes caught crashed.txt device removed
1 scripts\play.ps1 defaults 38 min, menus → prologue → world 0 not created 0
2 scripts\play.ps1 -Safe about 20 min 0 not created 0

World frame rate in run 1: about 18 fps (55 ms a frame, 45 ms of it "preparing"); 17 of 438 five-second reports
were under 8 fps, at moments when pipelines were being made for the first time (up to 526 ms waited in a frame).

Not tested: a build of this PR without the guard; other RDNA 4 cards; Linux. The title was read from a hard disk in
these runs, which slows streaming but should not bear on the compiler.

Report written with Claude Code (Claude Fable 5.2) from the run logs; the runs were made on the hardware above.

**@⁠mavis140** on GitHub · 2026-11-26 07:29 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7185521929) **Test report: RX 9070 XT (RDNA 4), 38 minutes, no compiler crash** Hardware: Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010 · Ryzen 7 9800X3D · 32 GB DDR5 · Windows 11 build 26200. Build: this PR's head `ae39f3c`, `cargo build --locked --profile diag -p victory --features diagnostics`, Series X profile. One thing that differs from a clean checkout: the build also carried the crash guard from Belobug's tree (`0d2f6a6`, `95e935d`: a pipeline whose creation crashes the driver's compiler is recorded in `crashed.txt` and left out). So "no crash" below means the guard caught nothing, not that a crash was hidden. Before (main `e2a28ec` + the same guard, same card): 37 pipelines ended up in `crashed.txt` over the runs of one evening; without the guard the process died about 3 minutes in at `amdxc64.dll+0x861b9f`. With this PR, starting from a copy of the cache with `crashed.txt` removed: | run | settings | length | compiler crashes caught | `crashed.txt` | device removed | |---|---|---|---|---|---| | 1 | `scripts\play.ps1` defaults | 38 min, menus → prologue → world | 0 | not created | 0 | | 2 | `scripts\play.ps1 -Safe` | about 20 min | 0 | not created | 0 | World frame rate in run 1: about 18 fps (55 ms a frame, 45 ms of it "preparing"); 17 of 438 five-second reports were under 8 fps, at moments when pipelines were being made for the first time (up to 526 ms waited in a frame). Not tested: a build of this PR without the guard; other RDNA 4 cards; Linux. The title was read from a hard disk in these runs, which slows streaming but should not bear on the compiler. Report written with Claude Code (Claude Fable 5.2) from the run logs; the runs were made on the hardware above.
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:33 UTC · original

Left open: conflicts with main (descriptor/host.rs, emit/mod.rs, emit/shader.rs) and changes translation on every AMD card by default; needs a rebase and an in-game check.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:33 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7185588285) Left open: conflicts with main (descriptor/host.rs, emit/mod.rs, emit/shader.rs) and changes translation on every AMD card by default; needs a rebase and an in-game check.
Author
Owner

@⁠Jrjy3 on GitHub · 2026-11-26 08:06 UTC · original

A rebase onto main 39031cb, in case it saves a step: Jrjy3:fix/slot-counts-on-main, one commit (e4cd768), author kept. The three conflicts are one collision, and the cache key needs a fix besides:

  1. The slot table's second part. Main's VIEW_ADDRESSES (8 bytes per slot after the strides) took the place this PR used for SLOT_COUNTS_AT, so taking either side alone writes one table over the other. In the rebase the counts follow the addresses: SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4, SLOT_STRIDES_BYTES covers all three, note_buffer writes the stride, the count and the address. view_addresses_follow_the_strides takes the address slice to its end and failed with that layout; it now bounds the slice and checks that the counts are left alone.
  2. The cache key (needed after 1162d38). The cache is now keyed by TRANSLATOR_VERSION and host_settings, not by the translator's source. With VICTORY_SLOT_COUNTS on (the default) this PR's host_settings word equals main's, so a build with this PR and one without it share entries at version 1. Whichever translated first serves the other, and an RDNA 4 card can be handed main's size queries, which is the crash again. In the rebase "on" sets a bit of its own (1 << 30; "off" keeps 1 << 31). Bumping TRANSLATOR_VERSION on merge would do the same job.
  3. run's doc comment in waterfall_tests.rs had ended up above the new thread_local! (clippy unused_doc_comments, which CI denies). It is back on run.

Checked on the R9700 (RDNA 4, driver 32.0.32015.2008), Windows 11, with the rebased code: cargo test -p victory-shader --lib 286 passed, including the_record_count_of_a_structured_buffer_read_by_index on hardware (that test kills the process on this card without the PR). cargo test -p victory-gpu --lib 338 passed. Clippy shows nothing in the changed files. cargo xtask policy ok. In game, a release build of the same code with two more local commits (Belobug's rx9070xt fixes, #147), scripts\play.ps1 settings: all 25,790 shaders translated ahead, then idle on the water in the first boat mission, 61.3 ms (16.3 fps) at about 3,900 draws, 2 minutes steady, no compiler crash. That was one session, not the hour the earlier reports here ran.

AI-assisted (Claude Code).

**@⁠Jrjy3** on GitHub · 2026-11-26 08:06 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7186185908) **A rebase onto main `39031cb`, in case it saves a step:** [`Jrjy3:fix/slot-counts-on-main`](https://github.com/Jrjy3/VIctory-7900XTX/tree/fix/slot-counts-on-main), one commit (`e4cd768`), author kept. The three conflicts are one collision, and the cache key needs a fix besides: 1. **The slot table's second part.** Main's `VIEW_ADDRESSES` (8 bytes per slot after the strides) took the place this PR used for `SLOT_COUNTS_AT`, so taking either side alone writes one table over the other. In the rebase the counts follow the addresses: `SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4`, `SLOT_STRIDES_BYTES` covers all three, `note_buffer` writes the stride, the count and the address. `view_addresses_follow_the_strides` takes the address slice to its end and failed with that layout; it now bounds the slice and checks that the counts are left alone. 2. **The cache key (needed after `1162d38`).** The cache is now keyed by `TRANSLATOR_VERSION` and `host_settings`, not by the translator's source. With `VICTORY_SLOT_COUNTS` on (the default) this PR's `host_settings` word equals main's, so a build with this PR and one without it share entries at version 1. Whichever translated first serves the other, and an RDNA 4 card can be handed main's size queries, which is the crash again. In the rebase "on" sets a bit of its own (`1 << 30`; "off" keeps `1 << 31`). Bumping `TRANSLATOR_VERSION` on merge would do the same job. 3. `run`'s doc comment in `waterfall_tests.rs` had ended up above the new `thread_local!` (clippy `unused_doc_comments`, which CI denies). It is back on `run`. **Checked** on the R9700 (RDNA 4, driver 32.0.32015.2008), Windows 11, with the rebased code: `cargo test -p victory-shader --lib` 286 passed, including `the_record_count_of_a_structured_buffer_read_by_index` on hardware (that test kills the process on this card without the PR). `cargo test -p victory-gpu --lib` 338 passed. Clippy shows nothing in the changed files. `cargo xtask policy` ok. In game, a release build of the same code with two more local commits (Belobug's rx9070xt fixes, #147), `scripts\play.ps1` settings: all 25,790 shaders translated ahead, then idle on the water in the first boat mission, 61.3 ms (16.3 fps) at about 3,900 draws, 2 minutes steady, no compiler crash. That was one session, not the hour the earlier reports here ran. AI-assisted (Claude Code).
Author
Owner

@⁠towade on GitHub · 2026-11-26 10:06 UTC · original

In-game check of the rebased code on an RX 9070 XT (RDNA 4), 64 GB, Intel CPU: past the point where main crashes, no compiler crash.

Hardware: Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010 · Core i7-14700K (UHD 770 present) · 64 GB · Windows 11 26300.

I rebased independently onto 39031cb before seeing @⁠Jrjy3's branch and ended up with the same table layout (counts after VIEW_ADDRESSES, SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4), plus a TRANSLATOR_VERSION bump instead of the separate host_settings bit. Jrjy3's branch is the more complete one (it also fixes the clippy doc comment), so this is only a test report for that layout.

  • Tests: cargo test -p victory-shader -p victory-gpu on the rebase: 286 + 338 passed. On plain main 39031cb the victory-shader test process dies with 0xc0000005 in size_tests::the_record_count_of_a_structured_buffer_read_by_index (reproduced with --test-threads=1), same as on the R9700.
  • Cache key (point 2 above), confirmed: with the PR at TRANSLATOR_VERSION = 1, victory shaders reported 22,517 of 25,790 cached translations as different from what main had cached. So without the bump or the extra bit, a cache shared with a main build hands RDNA 4 the old size queries.
  • In game: diag build, scripts\play.ps1 -Safe, fresh victory shaders run first, no extra commits. Plain main (f249fe0) had crashed for me in amdxc64.dll+0x861b9f (CreateComputePipelineState) about 9 minutes after start, right after the intro (sound but no picture, then the crash), after ~380 host pipelines. With the rebase: 16 minutes, about 14 of them in the world, no crash; 2,806 host pipelines made; I ended the session myself by closing the window, the game was still running. Frame rate in the world: median 11.6 fps, range 0.8–27.9, up to ~12,800 draws per frame.
  • Seen while playing, likely not caused by this PR (I can't compare, since main crashes before that point): recurring stutter, broken shadows, some other graphical glitches.

AI-assisted (Claude Code).

**@⁠towade** on GitHub · 2026-11-26 10:06 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7188921298) **In-game check of the rebased code on an RX 9070 XT (RDNA 4), 64 GB, Intel CPU: past the point where main crashes, no compiler crash.** Hardware: Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010 · Core i7-14700K (UHD 770 present) · 64 GB · Windows 11 26300. I rebased independently onto `39031cb` before seeing @⁠Jrjy3's branch and ended up with the same table layout (counts after `VIEW_ADDRESSES`, `SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4`), plus a `TRANSLATOR_VERSION` bump instead of the separate `host_settings` bit. Jrjy3's branch is the more complete one (it also fixes the clippy doc comment), so this is only a test report for that layout. - **Tests:** `cargo test -p victory-shader -p victory-gpu` on the rebase: 286 + 338 passed. On plain main `39031cb` the `victory-shader` test process dies with `0xc0000005` in `size_tests::the_record_count_of_a_structured_buffer_read_by_index` (reproduced with `--test-threads=1`), same as on the R9700. - **Cache key (point 2 above), confirmed:** with the PR at `TRANSLATOR_VERSION = 1`, `victory shaders` reported 22,517 of 25,790 cached translations as different from what main had cached. So without the bump or the extra bit, a cache shared with a main build hands RDNA 4 the old size queries. - **In game:** diag build, `scripts\play.ps1 -Safe`, fresh `victory shaders` run first, no extra commits. Plain main (`f249fe0`) had crashed for me in `amdxc64.dll+0x861b9f` (`CreateComputePipelineState`) about 9 minutes after start, right after the intro (sound but no picture, then the crash), after ~380 host pipelines. With the rebase: 16 minutes, about 14 of them in the world, no crash; 2,806 host pipelines made; I ended the session myself by closing the window, the game was still running. Frame rate in the world: median 11.6 fps, range 0.8–27.9, up to ~12,800 draws per frame. - Seen while playing, likely not caused by this PR (I can't compare, since main crashes before that point): recurring stutter, broken shadows, some other graphical glitches. AI-assisted (Claude Code).
Author
Owner

@⁠SpositoDouglas on GitHub · 2026-11-26 14:59 UTC · original

Tested on an RX 9060 XT (RDNA 4, Navi 44) on current main with the renderer patches: the street-chase crash is gone, 20 minutes with no compiler fault.

Host: Radeon RX 9060 XT 16 GB, Adrenalin 26.11.2 (32.0.32029.2010) · Ryzen 7 5800XT · 32 GB + 48 GB page file · Windows 11 26300.

Build: c9c932c + @⁠Jrjy3's rebase (e4cd768), cherry-picked. One conflict, the pub use shader::{…} list in emit/mod.rs: kept both sides (SLOT_COUNTS_AT and constants_raw). cargo build --locked --profile diag -p victory --features diagnostics. Shaders translated again with this exe (victory shaders) before the run.

Settings: play.ps1 (not -Safe) + VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1 + VICTORY_SHADER_OPT=59, Series S, the same save restored before each run, the title left standing.

size_tests, on the hardware adapter:

  • c9c932c: the test process dies with 0xc0000005 (STATUS_ACCESS_VIOLATION) after the first two tests.
  • With this change: 8 passed.

In game:

c9c932c (3 runs) c9c932c + this change
ended amdxc64.dll+0x861b9f (read 0x8) at 13 min 24 s, 13 min 42 s and 14 min 49 s stopped by my script at 20 min
last shader translated before the end compute f16876929fa64f9f, every time —
f16876929fa64f9f — translated and its host pipeline made at 16 min 38 s, kept running
first-chance exceptions / device removed 1 each run 0 / 0

f16876929fa64f9f is the second crasher @⁠0xmp3 found in #44. Here it comes at the change from the street chase to the cutscene that follows it. Frame rate and memory look the same as without the change (5.8 fps median at 3,740 draws a frame; private memory about 39 GB at the end).

Not tested: the same run without VICTORY_SHADER_OPT=59. Kept it on so the runs before and after differ only by this change.

Written with Claude Code (Claude Opus 5.5); the runs are mine, on the PC above.

**@⁠SpositoDouglas** on GitHub · 2026-11-26 14:59 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7195628349) **Tested on an RX 9060 XT (RDNA 4, Navi 44) on current `main` with the renderer patches: the street-chase crash is gone, 20 minutes with no compiler fault.** **Host:** Radeon RX 9060 XT 16 GB, Adrenalin 26.11.2 (32.0.32029.2010) · Ryzen 7 5800XT · 32 GB + 48 GB page file · Windows 11 26300. **Build:** `c9c932c` + @⁠Jrjy3's rebase (`e4cd768`), cherry-picked. One conflict, the `pub use shader::{…}` list in `emit/mod.rs`: kept both sides (`SLOT_COUNTS_AT` and `constants_raw`). `cargo build --locked --profile diag -p victory --features diagnostics`. Shaders translated again with this exe (`victory shaders`) before the run. **Settings:** `play.ps1` (not `-Safe`) + `VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1` + `VICTORY_SHADER_OPT=59`, Series S, the same save restored before each run, the title left standing. **`size_tests`, on the hardware adapter:** - `c9c932c`: the test process dies with `0xc0000005` (STATUS_ACCESS_VIOLATION) after the first two tests. - With this change: 8 passed. **In game:** | | `c9c932c` (3 runs) | `c9c932c` + this change | |---|---|---| | ended | `amdxc64.dll+0x861b9f` (read 0x8) at 13 min 24 s, 13 min 42 s and 14 min 49 s | stopped by my script at 20 min | | last shader translated before the end | `compute f16876929fa64f9f`, every time | — | | `f16876929fa64f9f` | — | translated and its host pipeline made at 16 min 38 s, kept running | | first-chance exceptions / device removed | 1 each run | 0 / 0 | `f16876929fa64f9f` is the second crasher @⁠0xmp3 found in #44. Here it comes at the change from the street chase to the cutscene that follows it. Frame rate and memory look the same as without the change (5.8 fps median at 3,740 draws a frame; private memory about 39 GB at the end). Not tested: the same run without `VICTORY_SHADER_OPT=59`. Kept it on so the runs before and after differ only by this change. Written with Claude Code (Claude Opus 5.5); the runs are mine, on the PC above.
Author
Owner

@⁠Jrjy3 on GitHub · 2026-11-26 18:23 UTC · original

With this PR, faces stop animating: mouths, faces and blend shapes (hair, eyelashes and beards still move, and a heavy character's head is the slim default). Fix: bca6fe1 on top of the rebase in Jrjy3:fix/slot-counts-on-main.

Cause. The record counts in the slot table are written only by note_buffer, which runs for title slots mirrored into the host heap. A draw's descriptor tables are made in dynamic slots (HostHeap::make_at, make_listed, make_null from draw.rs). A shader reads a table view's count at that dynamic slot (SLOT_COUNTS_AT + slot), and that slot's count was never written, so it read 0 or the count of the view that held the slot before. The face network (compute_graph_ops:* → ped_standard_head_cs:CS_Blendshape*, see fxceless #927) sizes its tensors this way and computed nothing. The PR's description says tables are covered. They are for slots taken from the heap, but not for a draw's own table slots.

Fix. make_at and make_listed write the slot's count, and make_null writes 0. make_listed keeps the count with its cached descriptor, so it is worked out once per recording, not once per draw. New test a_dynamic_slots_record_count_is_written_where_shaders_read_it: without the fix it reads (0, 0) where it expects (64, 256) (a typed and a raw view).

Checked on an AMD Radeon AI PRO R9700 (RDNA 4), driver 32.0.32015.2008, in the opening cutscenes, three runs:

Build Faces
main c9c932c + this PR still
same, VICTORY_SLOT_COUNTS=0 (the size query again) move. With the size query back, a warm-up over 3,500 pipelines had 35 of them crash amdxc64.dll, which is why this PR is needed
same + bca6fe1 move, no compiler crash

cargo test -p victory-gpu --lib: 339 passed (watch::tests::what_the_kernel_writes_through_is_not_guarded_for_another_view failed once in the full run and passed 5 of 5 alone). Clippy shows nothing in descriptor/host.rs.

AI-assisted (Claude Code).

**@⁠Jrjy3** on GitHub · 2026-11-26 18:23 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7200417527) **With this PR, faces stop animating: mouths, faces and blend shapes (hair, eyelashes and beards still move, and a heavy character's head is the slim default). Fix:** [`bca6fe1`](https://github.com/Jrjy3/VIctory-7900XTX/commit/bca6fe1) on top of the rebase in [`Jrjy3:fix/slot-counts-on-main`](https://github.com/Jrjy3/VIctory-7900XTX/tree/fix/slot-counts-on-main). **Cause.** The record counts in the slot table are written only by `note_buffer`, which runs for title slots mirrored into the host heap. A draw's descriptor tables are made in **dynamic** slots (`HostHeap::make_at`, `make_listed`, `make_null` from `draw.rs`). A shader reads a table view's count at that dynamic slot (`SLOT_COUNTS_AT + slot`), and that slot's count was never written, so it read 0 or the count of the view that held the slot before. The face network (`compute_graph_ops:*` → `ped_standard_head_cs:CS_Blendshape*`, see fxceless #927) sizes its tensors this way and computed nothing. The PR's description says tables are covered. They are for slots taken from the heap, but not for a draw's own table slots. **Fix.** `make_at` and `make_listed` write the slot's count, and `make_null` writes 0. `make_listed` keeps the count with its cached descriptor, so it is worked out once per recording, not once per draw. New test `a_dynamic_slots_record_count_is_written_where_shaders_read_it`: without the fix it reads `(0, 0)` where it expects `(64, 256)` (a typed and a raw view). **Checked** on an AMD Radeon AI PRO R9700 (RDNA 4), driver 32.0.32015.2008, in the opening cutscenes, three runs: | Build | Faces | |---|---| | main `c9c932c` + this PR | still | | same, `VICTORY_SLOT_COUNTS=0` (the size query again) | move. With the size query back, a warm-up over 3,500 pipelines had 35 of them crash `amdxc64.dll`, which is why this PR is needed | | same + `bca6fe1` | move, no compiler crash | `cargo test -p victory-gpu --lib`: 339 passed (`watch::tests::what_the_kernel_writes_through_is_not_guarded_for_another_view` failed once in the full run and passed 5 of 5 alone). Clippy shows nothing in `descriptor/host.rs`. AI-assisted (Claude Code).
Author
Owner

@⁠SpositoDouglas on GitHub · 2026-11-26 18:25 UTC · original

Correction to my report above: the runs were on the Series X profile (the runtime's default, no --console passed), not Series S as I wrote. Everything else in it stands.

**@⁠SpositoDouglas** on GitHub · 2026-11-26 18:25 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7200447481) Correction to my report above: the runs were on the Series X profile (the runtime's default, no `--console` passed), not Series S as I wrote. Everything else in it stands.
Author
Owner

@⁠lorddie on GitHub · 2026-11-26 18:50 UTC · original

Test report on RX 9070 XT (RDNA 4) + Ryzen 5 5600X + 32 GB: Jrjy3's rebase (e4cd768) on top of Belobug's rx9070xt branch (cd8dfc06, which carries his compiler crash guard), diag build, with the default VICTORY_SHADER_OPT and no compiler skip list (only 39f0e9aeb156a61c, CS_ScreenProbes_ActivateRays, left out because it does nothing without rays). Three runs, about 40 minutes in all (Series S, Series S with the title's own upscaler, and Series X with PC FSR 4.1.2): no amdxc64.dll fault, and the guard recorded nothing. Without this change the same card needed VICTORY_SHADER_OPT=59 and two skipped programs. I have now added bca6fe13 (record counts for a draw's table slots) and will report whether faces move.

**@⁠lorddie** on GitHub · 2026-11-26 18:50 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7200915824) Test report on RX 9070 XT (RDNA 4) + Ryzen 5 5600X + 32 GB: Jrjy3's rebase (`e4cd768`) on top of Belobug's `rx9070xt` branch (`cd8dfc06`, which carries his compiler crash guard), diag build, with the default `VICTORY_SHADER_OPT` and no compiler skip list (only `39f0e9aeb156a61c`, `CS_ScreenProbes_ActivateRays`, left out because it does nothing without rays). Three runs, about 40 minutes in all (Series S, Series S with the title's own upscaler, and Series X with PC FSR 4.1.2): no `amdxc64.dll` fault, and the guard recorded nothing. Without this change the same card needed `VICTORY_SHADER_OPT=59` and two skipped programs. I have now added `bca6fe13` (record counts for a draw's table slots) and will report whether faces move.
Author
Owner

@⁠lorddie on GitHub · 2026-11-26 20:00 UTC · original

Follow-up: with bca6fe13 added, faces and mouths move in dialogue (I hadn't checked before it, so I can't say whether they were still on this card). Also, with VICTORY_BVH_BUILDER=1 the CS_RaytracingResolve programs, which used to crash this card's compiler, now build without a fault (8 minutes, Series S, the title's own upscaler). Here it costs a lot (4.6 vs 14.1 fps at 6-9k draws), and shaders read pages that have no copy (title memory by address: shaders touched pages that had no copy, 210 pages), which stretches an animated character's geometry. That warning does not appear with the builder off.

**@⁠lorddie** on GitHub · 2026-11-26 20:00 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7202200243) Follow-up: with `bca6fe13` added, faces and mouths move in dialogue (I hadn't checked before it, so I can't say whether they were still on this card). Also, with `VICTORY_BVH_BUILDER=1` the `CS_RaytracingResolve` programs, which used to crash this card's compiler, now build without a fault (8 minutes, Series S, the title's own upscaler). Here it costs a lot (4.6 vs 14.1 fps at 6-9k draws), and shaders read pages that have no copy (`title memory by address: shaders touched pages that had no copy`, 210 pages), which stretches an animated character's geometry. That warning does not appear with the builder off.
Author
Owner

@⁠WHOISJARDAS on GitHub · 2026-11-26 20:35 UTC · original

Tested on an RX 9070 XT (RDNA 4, Adrenalin 32.0.32029.2010), Ryzen 7 9800X3D, Windows 11 26200, with this pull request rebased onto main 0ce46d5:

  • The 70 compute programs that crash the compiler at amdxc64.dll+0x861b9f on unmodified main (translate --validate --pipelines, one program at a time): 70 of 70 build and validate with it.
  • cargo test -p victory-shader --lib: 301 passed, 0 failed (your 8 size_tests included, on the hardware adapter and on WARP).

The branch no longer applies to main, though: 027e367 gave the strides buffer's second table to the views' title addresses (VIEW_ADDRESSES, two dwords per slot), which is where this puts the record counts. The resolution I used puts the counts after the addresses:

pub const VIEW_ADDRESSES: u32 = SLOT_STRIDES_COUNT * 4;
pub const SLOT_COUNTS_AT: u32 = (VIEW_ADDRESSES + SLOT_STRIDES_COUNT * 8) / 4;
pub const SLOT_STRIDES_BYTES: u32 = (SLOT_COUNTS_AT + SLOT_STRIDES_COUNT) * 4;

with the strides buffer allocated as SLOT_STRIDES_BYTES (32 MiB a heap instead of 24), and note_buffer writing the stride, the record count and the address. Since the shader cache is now keyed by TRANSLATOR_VERSION (1162d38), that also needs to go from 1 to 2, or caches made before keep serving the size queries.

For comparison, keeping the size query but giving it a handle of its own, bounded one slot below the handle of the reads (through raw_twin for the twin views), also builds the same 70; I can open that as a separate pull request if a smaller change is preferred.

Testing and this comment were done with Claude Code (Claude Opus 5.5).

**@⁠WHOISJARDAS** on GitHub · 2026-11-26 20:35 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7202863955) Tested on an RX 9070 XT (RDNA 4, Adrenalin 32.0.32029.2010), Ryzen 7 9800X3D, Windows 11 26200, with this pull request rebased onto main `0ce46d5`: - The 70 compute programs that crash the compiler at `amdxc64.dll+0x861b9f` on unmodified main (`translate --validate --pipelines`, one program at a time): **70 of 70 build and validate** with it. - `cargo test -p victory-shader --lib`: 301 passed, 0 failed (your 8 `size_tests` included, on the hardware adapter and on WARP). The branch no longer applies to main, though: `027e367` gave the strides buffer's second table to the views' title addresses (`VIEW_ADDRESSES`, two dwords per slot), which is where this puts the record counts. The resolution I used puts the counts after the addresses: ```rust pub const VIEW_ADDRESSES: u32 = SLOT_STRIDES_COUNT * 4; pub const SLOT_COUNTS_AT: u32 = (VIEW_ADDRESSES + SLOT_STRIDES_COUNT * 8) / 4; pub const SLOT_STRIDES_BYTES: u32 = (SLOT_COUNTS_AT + SLOT_STRIDES_COUNT) * 4; ``` with the strides buffer allocated as `SLOT_STRIDES_BYTES` (32 MiB a heap instead of 24), and `note_buffer` writing the stride, the record count and the address. Since the shader cache is now keyed by `TRANSLATOR_VERSION` (`1162d38`), that also needs to go from 1 to 2, or caches made before keep serving the size queries. For comparison, keeping the size query but giving it a handle of its own, bounded one slot below the handle of the reads (through `raw_twin` for the twin views), also builds the same 70; I can open that as a separate pull request if a smaller change is preferred. Testing and this comment were done with Claude Code (Claude Opus 5.5).
github-bot force-pushed github-bot/gh-55 from ae39f3c5e7 to c7b3853ed8 2026-11-27 00:56:50 +00:00 Compare
Author
Owner

@⁠tightfall on GitHub · 2026-11-26 21:28 UTC · original

Rebased onto main 126acb3 (head now c7b3853), so it applies again. Thanks to everyone who tested this on RDNA 4 cards.

The branch now has two commits:

  1. The fix, rebased. I took @⁠Jrjy3's rebase (e4cd768). Main's VIEW_ADDRESSES now uses the space after the strides, so the record counts follow the addresses: SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4. The only conflict left on 126acb3 was the pub use shader::{…} list in emit/mod.rs; I kept both sides (SLOT_COUNTS_AT and constants_raw).
  2. @⁠Jrjy3's bca6fe1, authorship kept. The record counts were written only for title slots mirrored into the host heap. A draw's descriptor tables live in dynamic slots, which read a count of 0, so faces and blend shapes stood still. Dynamic slots now write their counts too. That was my bug; thanks for finding it.

About the concern that this changes translation on every AMD card: the change only replaces a size query (GetDimensions) of raw/structured buffers picked from the heap or a descriptor table with a count from the host's table. The counts come from the same title view records the host already reads, so the result should be the same on every vendor. VICTORY_SLOT_COUNTS=0 brings back the old size query, and it is part of the shader cache key.

Tested on this branch (c7b3853) on an RX 9070, Windows 11, Adrenalin 26.11.2: cargo test -p victory-shader --lib 302 passed; cargo test -p victory-gpu 384 passed, 1 failed (watch::tests::a_refresh_leaves_open_what_the_kernel_is_writing, which this change does not touch; it passes alone, so it was timing under load). rustfmt --check flags the touched files, but main's own versions of them fail it the same way, so I left formatting alone to keep the diff small. The in-game checks are the reports above (RX 9070, 9070 XT, 9060 XT, R9700), and lorddie confirmed faces with bca6fe1.

This PR was made with AI assistance (Claude Code).

**@⁠tightfall** on GitHub · 2026-11-26 21:28 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/55#issuecomment-7203768173) Rebased onto main `126acb3` (head now `c7b3853`), so it applies again. Thanks to everyone who tested this on RDNA 4 cards. The branch now has two commits: 1. **The fix, rebased.** I took @⁠Jrjy3's rebase (`e4cd768`). Main's `VIEW_ADDRESSES` now uses the space after the strides, so the record counts follow the addresses: `SLOT_COUNTS_AT = (VIEW_ADDRESSES + 8 * SLOT_STRIDES_COUNT) / 4`. The only conflict left on `126acb3` was the `pub use shader::{…}` list in `emit/mod.rs`; I kept both sides (`SLOT_COUNTS_AT` and `constants_raw`). 2. **@⁠Jrjy3's `bca6fe1`, authorship kept.** The record counts were written only for title slots mirrored into the host heap. A draw's descriptor tables live in dynamic slots, which read a count of 0, so faces and blend shapes stood still. Dynamic slots now write their counts too. That was my bug; thanks for finding it. About the concern that this changes translation on every AMD card: the change only replaces a size query (`GetDimensions`) of raw/structured buffers picked from the heap or a descriptor table with a count from the host's table. The counts come from the same title view records the host already reads, so the result should be the same on every vendor. `VICTORY_SLOT_COUNTS=0` brings back the old size query, and it is part of the shader cache key. Tested on this branch (`c7b3853`) on an RX 9070, Windows 11, Adrenalin 26.11.2: `cargo test -p victory-shader --lib` 302 passed; `cargo test -p victory-gpu` 384 passed, 1 failed (`watch::tests::a_refresh_leaves_open_what_the_kernel_is_writing`, which this change does not touch; it passes alone, so it was timing under load). `rustfmt --check` flags the touched files, but main's own versions of them fail it the same way, so I left formatting alone to keep the diff small. The in-game checks are the reports above (RX 9070, 9070 XT, 9060 XT, R9700), and lorddie confirmed faces with `bca6fe1`. This PR was made with AI assistance (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/55/head:github-bot/gh-55'
git switch 'github-bot/gh-55'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-55'
git switch 'github-bot/gh-55'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-55'
git switch 'github-bot/gh-55'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-55'
git switch 'main'
git merge --squash 'github-bot/gh-55'
git switch 'main'
git merge --ff-only 'github-bot/gh-55'
git switch 'main'
git merge 'github-bot/gh-55'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.