Recompiler: compact block-PC table reads one word, and words() counts it #3475

Open
Foniass wants to merge 2 commits from upstream-pr/3475 into main
Foniass commented 2026-11-29 23:25:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T23:25:47Z.


Stacked on #3473; only the top commit (70ed9c60) belongs here.

Follow-ups to KOLESNiii's review of the compact form on #3263 (merged):

  • Plan::words(), which the table limit (MAX_TABLE_WORDS) is checked against, left out the block-PC table and the literal index and pool tables. A program could take the form with more table words than the limit. It now counts them. A plan with a PC table and no block literal no longer emits empty literal tables.
  • The block-PC table (xcl_pc) gets #3473's change: entries of a power-of-two width, read from one word (entry_bits). AMD's driver got the two-word read wrong for the literal index. In the new GPU test the PC values read right on AMD with the old read too, so this one is for consistency, not a failure I saw.
  • The comments said repeated memory ops split out at >= 4 occurrences; the code does it at >= 2.
  • Tests for code that had none (KOLESNiii's third point):
    • the PC-parameterized classes;
    • the far-jump veneer strip, in a compute program and in the kernel form;
    • words() against the table sizes in the DXIL.

On the 4th point, MAX_TABLE_WORDS 12288 → 32768 on every GPU: I kept 32768.

  • On the retail title, one compute program has a 16121-word plan (19840 blocks). It takes the compact form with 32768, and would go back to the plain form with 12288.
  • amd-dev runs 32768 on its RDNA4 machine by default.
  • I could not measure that program's build memory on AMD. The RX 9070 XT 24 GB report (e964ad22) was of the older compact form, before micro-blocks.

What is in it

  • crates/xcl/src/gpu/dxil/compact.rs: Plan::words, Plan::pc_width, Plan::lit_pool, entry_bits, the one-word PC read, the comments
  • crates/xcl/src/gpu/dxil/compact_tests.rs:
    • gpu_compact_form_with_a_block_pc_table_runs_as_the_plain_form
    • dead_far_jump_veneers_are_left_out: all of them in a compute program, all but the last in the kernel form
    • gpu_compact_form_without_dead_veneers_runs_as_the_plain_form
    • the_word_count_includes_the_pc_and_literal_tables: fails without the words() change; it found the empty literal tables too

Tested

  • NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114) and AMD Radeon RDNA2 iGPU (driver 32.0.21030, XCL_ADAPTER=radeon), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke
  • cargo test -p xcl --lib gpu::dxil::compact_tests -- --test-threads=1, 19 passed, 0 failed, on:
    • the 5070 Ti
    • the iGPU, native wave64 (XCL_SPLIT_WAVE64=0) and split (=1)
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 70ed9c60, rebased on main 86e86fcb (5070 Ti): 2894 passed, 0 failed, 51 ignored. SKIPPED: 28 notices, almost all no wave64 (the others: no D3D12 debug layer, heap windows off, driver cache needs Developer Mode). The narrower runs listed here are from before the rebase.
  • Retail title: all compute programs translated (xcl shaders shaders.rpf --direct --only cs --sample 0 --max-bytes 0). 768 reach the compact plan. None has a literal or PC table, so on this title the program choice is unchanged; their table sizes are the numbers above.
  • 60 s smoke run below.

Regression run

main:

xcl-smoke v1
commit: 86e86fcb33f94fa5d0c809d9b50af7b84bf49cce
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1608 (PresentX 1608)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15766 MB

this PR:

xcl-smoke v1
commit: 70ed9c603b013e6726461378c6c1123e00db61f8
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1608 (PresentX 1608)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16091 MB

Not tested

  • RDNA3 / RDNA4, and the 16121-word program's build memory on AMD
  • A retail program with a PC or literal table (none in this title)

AI use

  • Claude Code with Claude Opus 5.5: wrote the changes and tests, measured the title's table sizes, ran the tests on both GPUs and the smoke runs, wrote this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5556291058 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T23:25:47Z. --- Stacked on #3473; only the top commit (`70ed9c60`) belongs here. Follow-ups to KOLESNiii's review of the compact form on #3263 (merged): - `Plan::words()`, which the table limit (`MAX_TABLE_WORDS`) is checked against, left out the block-PC table and the literal index and pool tables. A program could take the form with more table words than the limit. It now counts them. A plan with a PC table and no block literal no longer emits empty literal tables. - The block-PC table (`xcl_pc`) gets #3473's change: entries of a power-of-two width, read from one word (`entry_bits`). AMD's driver got the two-word read wrong for the literal index. In the new GPU test the PC values read right on AMD with the old read too, so this one is for consistency, not a failure I saw. - The comments said repeated memory ops split out at `>= 4` occurrences; the code does it at `>= 2`. - Tests for code that had none (KOLESNiii's third point): - the PC-parameterized classes; - the far-jump veneer strip, in a compute program and in the kernel form; - `words()` against the table sizes in the DXIL. On the 4th point, `MAX_TABLE_WORDS` 12288 → 32768 on every GPU: I kept 32768. - On the retail title, one compute program has a 16121-word plan (19840 blocks). It takes the compact form with 32768, and would go back to the plain form with 12288. - amd-dev runs 32768 on its RDNA4 machine by default. - I could not measure that program's build memory on AMD. The RX 9070 XT 24 GB report (e964ad22) was of the older compact form, before micro-blocks. **What is in it** - `crates/xcl/src/gpu/dxil/compact.rs`: `Plan::words`, `Plan::pc_width`, `Plan::lit_pool`, `entry_bits`, the one-word PC read, the comments - `crates/xcl/src/gpu/dxil/compact_tests.rs`: - `gpu_compact_form_with_a_block_pc_table_runs_as_the_plain_form` - `dead_far_jump_veneers_are_left_out`: all of them in a compute program, all but the last in the kernel form - `gpu_compact_form_without_dead_veneers_runs_as_the_plain_form` - `the_word_count_includes_the_pc_and_literal_tables`: fails without the `words()` change; it found the empty literal tables too **Tested** - NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114) and AMD Radeon RDNA2 iGPU (driver 32.0.21030, `XCL_ADAPTER=radeon`), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke - `cargo test -p xcl --lib gpu::dxil::compact_tests -- --test-threads=1`, 19 passed, 0 failed, on: - the 5070 Ti - the iGPU, native wave64 (`XCL_SPLIT_WAVE64=0`) and split (`=1`) - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 70ed9c60, rebased on main 86e86fcb (5070 Ti): 2894 passed, 0 failed, 51 ignored. SKIPPED: 28 notices, almost all `no wave64` (the others: no D3D12 debug layer, heap windows off, driver cache needs Developer Mode). The narrower runs listed here are from before the rebase. - Retail title: all compute programs translated (`xcl shaders shaders.rpf --direct --only cs --sample 0 --max-bytes 0`). 768 reach the compact plan. None has a literal or PC table, so on this title the program choice is unchanged; their table sizes are the numbers above. - 60 s smoke run below. **Regression run** main: ``` xcl-smoke v1 commit: 86e86fcb33f94fa5d0c809d9b50af7b84bf49cce gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1608) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15766 MB ``` this PR: ``` xcl-smoke v1 commit: 70ed9c603b013e6726461378c6c1123e00db61f8 gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1608) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16091 MB ``` **Not tested** - RDNA3 / RDNA4, and the 16121-word program's build memory on AMD - A retail program with a PC or literal table (none in this title) **AI use** - Claude Code with Claude Opus 5.5: wrote the changes and tests, measured the title's table sizes, ran the tests on both GPUs and the smoke runs, wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fromthemoonx commented 2026-12-01 23:15:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T23:15:53Z.


merge-check
base: 38ad22daa6
head: 70ed9c603b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2967 passed, 0 failed, 52 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none
review: correction: the problem I reported here on 2026-12-01 does not exist. I said a block PC at or past dword 65536 overflows the xcl_pc mask. Foniass pointed out that emit_with_nest reads the word directly when pc_w == 32, so (1u32 << pc_w) - 1 is only built for widths of 16 or less. I checked the code at this head and that is right. The literal index has the same guard.

  • I read this PR's own commit, 70ed9c60. It is stacked on #3473 (4afd8a55, still open), which is in the merge tested here but which I did not review. #3473 has to go first or with it.
  • words() now counts the PC table and the literal index and pool, so the MAX_TABLE_WORDS check sees them. A plan with a PC table and no block literal no longer emits literal tables.
  • The one-word PC read matches the packing, now that entry widths are a power of two.
  • The 21 gpu::dxil::compact tests pass in this run, on a wave32 GPU. Wave64 was not run here.
  • No title was run here. By the author's count, no compute program in their title has a PC or literal table, so their smoke pair does not exercise the new read.
    performance: power-of-two entries can make these tables up to twice as wide; words() counts them against the limit. Not measured here. The author's smoke pair has the same frame count (1608) and a peak commit of 16091 MB against 15766 MB.
    verdict: safe to merge
    hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)

This replaces my not yet on the same head.

<!-- greyfinch-sync:ivall/xcl:comment:7329124464 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-01T23:15:53Z. --- merge-check base: 38ad22daa624b0fe415889f480016099a9aae390 head: 70ed9c603b013e6726461378c6c1123e00db61f8 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2967 passed, 0 failed, 52 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none review: **correction: the problem I reported here on 2026-12-01 does not exist.** I said a block PC at or past dword 65536 overflows the `xcl_pc` mask. Foniass pointed out that `emit_with_nest` reads the word directly when `pc_w == 32`, so `(1u32 << pc_w) - 1` is only built for widths of 16 or less. I checked the code at this head and that is right. The literal index has the same guard. - I read this PR's own commit, `70ed9c60`. It is stacked on #3473 (`4afd8a55`, still open), which is in the merge tested here but which I did not review. #3473 has to go first or with it. - `words()` now counts the PC table and the literal index and pool, so the `MAX_TABLE_WORDS` check sees them. A plan with a PC table and no block literal no longer emits literal tables. - The one-word PC read matches the packing, now that entry widths are a power of two. - The 21 `gpu::dxil::compact` tests pass in this run, on a wave32 GPU. Wave64 was not run here. - No title was run here. By the author's count, no compute program in their title has a PC or literal table, so their smoke pair does not exercise the new read. performance: power-of-two entries can make these tables up to twice as wide; `words()` counts them against the limit. Not measured here. The author's smoke pair has the same frame count (1608) and a peak commit of 16091 MB against 15766 MB. verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5) This replaces my `not yet` on the same head.
fromthemoonx commented 2026-12-01 23:22:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T23:22:15Z.


@Foniass merge-check above: with entry_bits, a block PC at or past dword 65536 gives pc_w = 32, and the xcl_pc mask (1u32 << pc_w) - 1 then panics in debug and reads every PC as 0 in release (main capped the width at the plain bit count). Found by reading, not reproduced: https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464

<!-- greyfinch-sync:ivall/xcl:comment:7329261754 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329261754). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-01T23:22:15Z. --- @Foniass merge-check above: with `entry_bits`, a block PC at or past dword 65536 gives `pc_w = 32`, and the `xcl_pc` mask `(1u32 << pc_w) - 1` then panics in debug and reads every PC as 0 in release (main capped the width at the plain bit count). Found by reading, not reproduced: https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464
bmjask commented 2026-12-02 07:14:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T07:14:04Z.

Review: COMMENTED


Review of 70ed9c60: 1 finding(s). 1 are inline.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6146260326 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#pullrequestreview-6146260326). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T07:14:04Z. **Review:** COMMENTED --- Review of `70ed9c60`: 1 finding(s). 1 are inline. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 07:14:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T07:14:05Z.

Code review location: crates/xcl/src/gpu/dxil/compact.rs; line 262

@@ -237,16 +237,56 @@ impl Plan {
         (bits(self.rep.len()), pb)
     }
 
-    /// 32-bit words of the tables.
+    /// 32-bit words of the tables, the block-PC and literal ones included.
     pub fn words(&self) -> usize {
         let (cb, pb) = self.widths();
         let extra = match self.next_enc {
             NextEnc::Steps => self.steps.len() * 2,
             NextEnc::Inline => 0,
             NextEnc::TargetPool => self.targets.len(),
         };
-        (self.mblocks.len() * (cb + pb) as usize).div_ceil(32) + 1 + extra
+        let packed = |w: u32| (self.mblocks.len() * w as usize).div_ceil(32) + 1;
+        let pc = if self.use_pc { packed(self.pc_width()) } else { 0 };
+        let lit = if self.use_lit {
+            let (pool, _) = self.lit_pool();
+            packed(entry_bits(pool.len())) + pool.len()
+        } else {
+            0
+        };
+        packed(cb + pb) + extra + pc + lit
+    }
+
+    /// Bits of a block's PC entry in `xcl_pc` (PCs in dwords).
+    fn pc_width(&self) -> u32 {
+        let max_pc_dw = self.mblocks.iter().map(|blk| (blk.pc >> 2) as usize).max().unwrap_or(0);
+        entry_bits(max_pc_dw + 1)

pc_width now rounds PC entries up to a power of two (17 bits becomes 32), and words() now counts the PC table against MAX_TABLE_WORDS, so large programs can lose the compact form for a change that fixes no failure anyone has seen. Take a program like the retail one: 19840 blocks, a 16121-word base plan, and code past 256 KB so the largest PC needs 17 bits. The PC table goes from about 10541 to 19841 words, the total of about 35962 exceeds 32768, and automatic_plan returns None. The program falls back to the plain form, the case that causes driver memory spikes. At 17 bits the total would be about 26662, under the limit. The use_pc heuristic (~633) also still prices the table at ~2 B/block, where it's now 4 B/block above 64K code dwords, so it can enable PC parameterization that pushes the plan over the limit. (The xcl_blocks two-word read is noted on #3473.)

<!-- greyfinch-sync:ivall/xcl:review-comment:4765993067 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#discussion_r4765993067). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T07:14:05Z. **Code review location:** `crates/xcl/src/gpu/dxil/compact.rs`; line 262 ~~~~diff @@ -237,16 +237,56 @@ impl Plan { (bits(self.rep.len()), pb) } - /// 32-bit words of the tables. + /// 32-bit words of the tables, the block-PC and literal ones included. pub fn words(&self) -> usize { let (cb, pb) = self.widths(); let extra = match self.next_enc { NextEnc::Steps => self.steps.len() * 2, NextEnc::Inline => 0, NextEnc::TargetPool => self.targets.len(), }; - (self.mblocks.len() * (cb + pb) as usize).div_ceil(32) + 1 + extra + let packed = |w: u32| (self.mblocks.len() * w as usize).div_ceil(32) + 1; + let pc = if self.use_pc { packed(self.pc_width()) } else { 0 }; + let lit = if self.use_lit { + let (pool, _) = self.lit_pool(); + packed(entry_bits(pool.len())) + pool.len() + } else { + 0 + }; + packed(cb + pb) + extra + pc + lit + } + + /// Bits of a block's PC entry in `xcl_pc` (PCs in dwords). + fn pc_width(&self) -> u32 { + let max_pc_dw = self.mblocks.iter().map(|blk| (blk.pc >> 2) as usize).max().unwrap_or(0); + entry_bits(max_pc_dw + 1) ~~~~ --- `pc_width` now rounds PC entries up to a power of two (17 bits becomes 32), and `words()` now counts the PC table against MAX_TABLE_WORDS, so large programs can lose the compact form for a change that fixes no failure anyone has seen. Take a program like the retail one: 19840 blocks, a 16121-word base plan, and code past 256 KB so the largest PC needs 17 bits. The PC table goes from about 10541 to 19841 words, the total of about 35962 exceeds 32768, and `automatic_plan` returns None. The program falls back to the plain form, the case that causes driver memory spikes. At 17 bits the total would be about 26662, under the limit. The `use_pc` heuristic (~633) also still prices the table at ~2 B/block, where it's now 4 B/block above 64K code dwords, so it can enable PC parameterization that pushes the plan over the limit. (The `xcl_blocks` two-word read is noted on #3473.)
Foniass commented 2026-12-02 08:06:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T08:06:33Z.


Reply to the merge-check above (https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464), on the "PC table of 17 bits or more overflows its mask" point: that case is guarded. At 70ed9c60, the xcl_pc read in emit_with_nest (compact.rs ~864-876) is

let pm = if pc_w == 32 {
    word(lw, pc_tbl, b)
} else {
    ...
    lw.andc(pe, (1u32 << pc_w) - 1)
};

so with pc_w == 32 the word is read directly and the (1u32 << pc_w) - 1 mask is never built; it only exists for widths of 16 or less. The literal index has the same guard (lit_w == 32, ~879-888). The table itself is packed through u64 (v << (at % 32) on a u64, ~823-826), which is also fine at 32 bits. So a block PC at or past dword 65536 reads its PC whole rather than panicking or reading 0. The rest of that check (the xaudio2 failure is the race #3551 fixes; the 0xc0000005 is #3586 on main too) matches what I see.

AI-assisted: Claude Code (Claude Opus 5.5), posted by Foniass.

<!-- greyfinch-sync:ivall/xcl:comment:7339013480 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7339013480). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T08:06:33Z. --- Reply to the merge-check above (https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464), on the "PC table of 17 bits or more overflows its mask" point: that case is guarded. At 70ed9c60, the `xcl_pc` read in `emit_with_nest` (`compact.rs` ~864-876) is ```rust let pm = if pc_w == 32 { word(lw, pc_tbl, b) } else { ... lw.andc(pe, (1u32 << pc_w) - 1) }; ``` so with `pc_w == 32` the word is read directly and the `(1u32 << pc_w) - 1` mask is never built; it only exists for widths of 16 or less. The literal index has the same guard (`lit_w == 32`, ~879-888). The table itself is packed through `u64` (`v << (at % 32)` on a `u64`, ~823-826), which is also fine at 32 bits. So a block PC at or past dword 65536 reads its PC whole rather than panicking or reading 0. The rest of that check (the xaudio2 failure is the race #3551 fixes; the 0xc0000005 is #3586 on main too) matches what I see. AI-assisted: Claude Code (Claude Opus 5.5), posted by Foniass.
fromthemoonx commented 2026-12-02 13:42:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-02T13:42:27Z.


@Foniass you are right, and I was wrong: with pc_w == 32 the word is read directly and the mask is never built. I have withdrawn the finding and rerun the PR on current main: 2967 passed, 0 failed, now safe to merge. Sorry for the false alarm. https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464

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

<!-- greyfinch-sync:ivall/xcl:comment:7347315412 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7347315412). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-02T13:42:27Z. --- @Foniass you are right, and I was wrong: with `pc_w == 32` the word is read directly and the mask is never built. I have withdrawn the finding and rerun the PR on current main: 2967 passed, 0 failed, now `safe to merge`. Sorry for the false alarm. https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7329124464 AI use: Claude Code (Claude Opus 5.5) checked the code, ran the tests and wrote this.
bmjask commented 2026-12-02 14:13:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:13:17Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348185551 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7348185551). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:13:17Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
stijn-boer commented 2026-12-02 18:15:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T18:15:33Z.


merge-check
base: 817eb1fc9f
head: 70ed9c603b
verdict: not yet: the targeted AMD tests passed and the workspace and retail smoke runs ended early on both builds. The large retail shader workload was not verified.

Windows / AMD RDNA4 (native D3D12) — compact DXIL table checks on 70ed9c6

Clean merge onto main at 817eb1f (merge commit 05d91c71df84eed58a78e030157dd6a84d318116). git diff --check was clean.

Setup

  • AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332
  • Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching d3d12SDKLayers.dll, DXC 1.9.2609.5

Tested

cargo build --workspace passed. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command.

Build Passed Failed Ignored SKIPPED notices
main 340 3 23 0
Merged PR 345 3 23 0

Counts are partial because two test processes aborted on each build.

  • Tests that failed on the PR and passed on main — none observed in the comparable results.
  • New focused tests — 5 passed, 0 failed, 0 ignored, 0 skip notices with --test-threads=1 --show-output --nocapture. The two GPU tests compared compact and plain output on AMD. The other checks covered the PC/literal word count, one-word literal index, and dead far-jump veneers.
  • Debug-layer coverage — both debug-layer E2E tests, including DRED, and uploads_start_from_each_subresources_state passed.
Shared failures and process aborts
  • fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs reported failures on both builds.
  • The library and gpu_compute_e2e test processes exited with 0xc0000409 on both builds.

Retail smoke

Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary> with XCL_UMA_DRIVER=mixed for title hash 2c508222.

Build Exit Frames logged Device removals logged Peak commit
main 0xc0000409 None 0 1321 MB
Merged PR, first attempt 0xc0000409 None 0 6272 MB
Merged PR, repeat from fresh data root 0xc0000409 None 0 1320 MB

The first run's higher startup commit did not reproduce. These exits leave frame and steady-state memory behavior unverified.

Diff review

The table count now includes packed PC and literal data. Power-of-two entry widths keep indices within one word, with a separate direct load for 32-bit entries.

Not tested

Remaining workspace tests after the aborts, retail performance, the referenced 16,121-word shader workload, and RDNA2/RDNA3 hardware.

AI use

Codex (GPT-6) merged and built the PR, ran the tests, compared the results with main, reviewed the diff, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7354234537 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3475#issuecomment-7354234537). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T18:15:33Z. --- merge-check base: 817eb1fc9fb0763008ae5d8de1f7f586f442b51d head: 70ed9c603b013e6726461378c6c1123e00db61f8 verdict: not yet: the targeted AMD tests passed and the workspace and retail smoke runs ended early on both builds. The large retail shader workload was not verified. **Windows / AMD RDNA4 (native D3D12) — compact DXIL table checks on `70ed9c6`** Clean merge onto `main` at `817eb1f` (merge commit `05d91c71df84eed58a78e030157dd6a84d318116`). `git diff --check` was clean. **Setup** - AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 - Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching `d3d12SDKLayers.dll`, DXC 1.9.2609.5 **Tested** `cargo build --workspace` passed. `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command. | Build | Passed | Failed | Ignored | `SKIPPED` notices | |---|---:|---:|---:|---:| | `main` | 340 | 3 | 23 | 0 | | Merged PR | 345 | 3 | 23 | 0 | Counts are partial because two test processes aborted on each build. - **Tests that failed on the PR and passed on `main`** — none observed in the comparable results. - **New focused tests** — 5 passed, 0 failed, 0 ignored, 0 skip notices with `--test-threads=1 --show-output --nocapture`. The two GPU tests compared compact and plain output on AMD. The other checks covered the PC/literal word count, one-word literal index, and dead far-jump veneers. - **Debug-layer coverage** — both debug-layer E2E tests, including DRED, and `uploads_start_from_each_subresources_state` passed. <details><summary>Shared failures and process aborts</summary> - `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` reported failures on both builds. - The library and `gpu_compute_e2e` test processes exited with `0xc0000409` on both builds. </details> **Retail smoke** Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>` with `XCL_UMA_DRIVER=mixed` for title hash `2c508222`. | Build | Exit | Frames logged | Device removals logged | Peak commit | |---|---|---|---:|---:| | `main` | `0xc0000409` | None | 0 | 1321 MB | | Merged PR, first attempt | `0xc0000409` | None | 0 | 6272 MB | | Merged PR, repeat from fresh data root | `0xc0000409` | None | 0 | 1320 MB | The first run's higher startup commit did not reproduce. These exits leave frame and steady-state memory behavior unverified. **Diff review** The table count now includes packed PC and literal data. Power-of-two entry widths keep indices within one word, with a separate direct load for 32-bit entries. **Not tested** Remaining workspace tests after the aborts, retail performance, the referenced 16,121-word shader workload, and RDNA2/RDNA3 hardware. **AI use** Codex (GPT-6) merged and built the PR, ran the tests, compared the results with `main`, reviewed the diff, and drafted this report.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.

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

git switch 'main'
git merge --no-ff 'upstream-pr/3475'
git switch 'upstream-pr/3475'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3475'
git switch 'upstream-pr/3475'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3475'
git switch 'main'
git merge --squash 'upstream-pr/3475'
git switch 'main'
git merge --ff-only 'upstream-pr/3475'
git switch 'main'
git merge 'upstream-pr/3475'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3475
No description provided.