Recompiler: XCL_DECLARED_LDS=1 sizes direct compute LDS from the header (~11 ms less GPU per frame) #2937

Closed
Kalmarv wants to merge 1 commit from upstream-pr/2937 into main
Kalmarv commented 2026-11-27 01:16:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-27T01:16:04Z.


The direct DXIL translator gives every compute program that uses LDS the whole 8,192-dword groupshared block D3D12 allows, with the split form's exchange words at its top. That caps how many groups run at once on a GPU whose LDS per SM is shared by resident groups. With XCL_DECLARED_LDS=1 it declares what the program's header asks for: the static workgroup LDS from COMPUTE_PGM_RSRC2, plus the split form's exchange words and counters (or the arrival counter of a native 2-D/3-D group) placed after it. A header with no size, or one too large to leave room for those, keeps the 8,192-dword layout. LDS addresses are clamped to the declared top. Off by default.

How this differs from #2158 (#1607 group D149)

  • Opt-in vs default-on: this PR is gated behind XCL_DECLARED_LDS=1 (off by default, with separate disk-cache and ComputePolicyKey identities), so default translations stay byte-identical; #2158 (stacked on #2146) enables smaller LDS by default across both HLSL and direct DXIL.
  • Exact size + clamping vs power-of-two + masking: this PR allocates the exact declared + control dwords (no rounding up to the next power of two) and clamps out-of-range guest LDS indices to lds_top (umin) in both wave32 and split-wave64; #2158 rounds up to a power of two and wraps wave32 accesses with a bitmask.

Title shader corpus audit (per @bmjask)
Across all 26,555 blobs in the title's shaders.rpf + XboxBvhBuilder.dll (2,734 unique compute programs, plus 7 duplicates), 497 use LDS (real_lds_access):

  • 0 / 497 have COMPUTE_PGM_RSRC2.LDS_SIZE == 0.
  • 491 / 497 (98.8%) shrink strictly below 8,192 dwords (<= 512: 248, 513..=1024: 104, 1025..=2048: 60, 2049..=4096: 45, 4097..8192: 34 on wave32-hw).
  • 2 / 497 declare 8,192 dwords on native wave32 (1-D group, control = 0, exact 8,192-dword fit).
  • 4 / 497 declare 8,192 dwords in wave64 [1024, 1, 1] (slot = 1, control = 97 in split-wave64 on wave32-hw -> 8,289 > 8,192), so 4 programs take the conservative 8,192-dword fallback on wave32-hw (NVIDIA) and 0 fall back on native wave64-hw (AMD, where control = 0):
    • vfx_proj_decal_hit_detection:CS_ComputeHitDetectionResults_7b0d06e8_Wrapped
    • vfx_proj_decal_hit_detection:CS_ComputeHitDetectionSkinnedResults_7b0d06e8_Wrapped
    • vfx_triangleClip:CS_CollectTriangles_cb481f38_Wrapped
    • vfx_triangleClip:CS_CollectTriangles_Meshlets_cb481f38_Wrapped

What is in it

  • CsInterface::lds_dwords from COMPUTE_PGM_RSRC2 (recomp/mod.rs).
  • setup_storage sizes xcl_lds from it and places the exchange words and counters after the guest LDS; lds_index clamps to the declared top (dxil/lanes.rs, dxil/kernel.rs, dxil/lower_mem.rs); test CsInterface literals follow the new field.
  • The translated-shader disk caches and ComputePolicyKey key the switch apart (recomp/pso.rs, real/compute_build_key.rs).
  • Tests: compute_lds_reservation_matches_descriptor_and_lane_storage (declared size and lane storage per mode, dxil/core_tests.rs), declared_lds_disk_cache_separates_both_direct_routes (disk cache keys, recomp/pso.rs), and every_compute_build_input_splits_the_key (ComputePolicyKey, real/compute_build_key.rs).

Tested

  • Rebased head 5003116e on main 227d2cb3 (NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11 Pro 26200, DXC 1.9.2609.5, debug):
    • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 2,597 passed, 0 failed, 49 ignored across all 41 test binaries, 26 SKIPPED:
      • 21 no wave64 (RTX 5070 Ti is wave32 hardware: gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole, 4 recomp::lower wave64 tests, 14 recomp::lower_dxil wave64 tests, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)
      • 3 per-lane wave32 refusals for #1426 semantics (f16_programs_on_the_gpu arithmetic/packed, f32_programs_on_the_gpu conversions)
      • 2 no heap windows (opt-in: XCL_HEAP_WINDOWS=1) (two_pass_binds_set_the_shared_view_heap, heap_window_out_of_memory_falls_back_to_the_switch_form)
    • With XCL_DECLARED_LDS=1 (RTX 5070 Ti, DXC 1.9.2609.5):
      • cargo test -p xcl --lib -- --test-threads=4 --nocapture lds: 58 passed, 0 failed, 0 ignored (1 SKIPPED: gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64).
      • cargo test -p xcl --lib -- --test-threads=4 --nocapture gpu_compute_mode_dispatch_abi: 1 passed, 0 failed, 0 skipped.
  • Earlier head c4f2a7f3:
    • Title, Series X profile, per-program GPU timestamps over 187–229 s: late frame's compute went from ~89 to ~78 ms per present with the switch on; 66 of the late programs translate differently, and with the switch off translation is byte-identical.
    • Independent GPU readback reports on c4f2a7f3 in comments below from ettehn (RTX 5070 Ti Laptop), andrewDoing (RTX 5070), SzczepanGrela (RX 9070 native wave64, 360 dispatches), and LocranKing (RTX 3060 Ti paired 180 s smoke).

Regression run
Paired 150 s retail smoke runs on RTX 5070 Ti (warm PC-SBM cache, default XCL_DECLARED_LDS unset, XCL_UMA_WINDOWS=16, XCL_HEAP_WINDOWS=1, XCL_DRED=1, XCL_DIRECT_DXIL=all, XCL_DIRECT_SPLIT_INSTRUCTIONS=0, DXC 1.9.2609.5, XCL_PSO_JOURNAL=0). main exited 0x0 with a 0 B minidump (crashes: 1); head 5003116e exited 0x0 with 0 crashes and 0 device removals (second run after warming 5003116e's new ComputePolicyKey driver PSO blobs; the first cold-PSO run also exited 0x0 with 2,110 frames, 0 crashes, 0 device removals).

main (227d2cb3):

xcl-smoke v1
commit: 227d2cb388f103268dac7635ea720eb3e5352d4e
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 2914 (PresentX 2914)
presents per 2 s (last 3): 44 40 12
device removals: 0
crashes: 1
peak commit: 32755 MB

PR head (5003116e):

xcl-smoke v1
commit: 5003116e91c039be335a8544f807bfe5ff9a559f
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 3284 (PresentX 3284)
presents per 2 s (last 3): 39 43 7
device removals: 0
crashes: 0
peak commit: 32485 MB

Not tested

  • 150 s retail smoke with XCL_DECLARED_LDS=1 on rebased head 5003116e (smoke above ran with default XCL_DECLARED_LDS unset; unit/GPU tests above covered XCL_DECLARED_LDS=1).
  • Native wave64 hardware (AMD) on 5003116e; Intel; Wine; opt-in XCL_HEAP_WINDOWS=1 unit tests; titles other than this one.

AI use

  • Claude Code (Claude Opus 5.5): wrote the original change and tests on our team branch and split it onto main (c4f2a7f3).
  • Antigravity (Gemini 4 Neon): rebased onto main (227d2cb3 -> 5003116e), added declared_lds to ComputePolicyKey, updated workspace CsInterface literals, ran the offline title corpus LDS audit, ran the full workspace test suite + XCL_DECLARED_LDS=1 tests + paired 150 s retail smoke, and updated this description.
<!-- greyfinch-sync:ivall/xcl:issue:5519495248 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-27T01:16:04Z. --- The direct DXIL translator gives every compute program that uses LDS the whole 8,192-dword groupshared block D3D12 allows, with the split form's exchange words at its top. That caps how many groups run at once on a GPU whose LDS per SM is shared by resident groups. With `XCL_DECLARED_LDS=1` it declares what the program's header asks for: the static workgroup LDS from `COMPUTE_PGM_RSRC2`, plus the split form's exchange words and counters (or the arrival counter of a native 2-D/3-D group) placed after it. A header with no size, or one too large to leave room for those, keeps the 8,192-dword layout. LDS addresses are clamped to the declared top. Off by default. **How this differs from #2158 (#1607 group D149)** - **Opt-in vs default-on:** this PR is gated behind `XCL_DECLARED_LDS=1` (off by default, with separate disk-cache and `ComputePolicyKey` identities), so default translations stay byte-identical; #2158 (stacked on #2146) enables smaller LDS by default across both HLSL and direct DXIL. - **Exact size + clamping vs power-of-two + masking:** this PR allocates the exact `declared + control` dwords (no rounding up to the next power of two) and clamps out-of-range guest LDS indices to `lds_top` (`umin`) in both wave32 and split-wave64; #2158 rounds up to a power of two and wraps wave32 accesses with a bitmask. **Title shader corpus audit (per @bmjask)** Across all 26,555 blobs in the title's `shaders.rpf` + `XboxBvhBuilder.dll` (**2,734 unique compute programs**, plus 7 duplicates), **497** use LDS (`real_lds_access`): - **0 / 497** have `COMPUTE_PGM_RSRC2.LDS_SIZE == 0`. - **491 / 497 (98.8%)** shrink strictly below 8,192 dwords (`<= 512`: 248, `513..=1024`: 104, `1025..=2048`: 60, `2049..=4096`: 45, `4097..8192`: 34 on wave32-hw). - **2 / 497** declare 8,192 dwords on native wave32 (1-D group, `control = 0`, exact 8,192-dword fit). - **4 / 497** declare 8,192 dwords in wave64 `[1024, 1, 1]` (`slot = 1`, `control = 97` in split-wave64 on wave32-hw -> `8,289 > 8,192`), so **4** programs take the conservative 8,192-dword fallback on wave32-hw (NVIDIA) and **0** fall back on native wave64-hw (AMD, where `control = 0`): - `vfx_proj_decal_hit_detection:CS_ComputeHitDetectionResults_7b0d06e8_Wrapped` - `vfx_proj_decal_hit_detection:CS_ComputeHitDetectionSkinnedResults_7b0d06e8_Wrapped` - `vfx_triangleClip:CS_CollectTriangles_cb481f38_Wrapped` - `vfx_triangleClip:CS_CollectTriangles_Meshlets_cb481f38_Wrapped` **What is in it** - `CsInterface::lds_dwords` from `COMPUTE_PGM_RSRC2` (`recomp/mod.rs`). - `setup_storage` sizes `xcl_lds` from it and places the exchange words and counters after the guest LDS; `lds_index` clamps to the declared top (`dxil/lanes.rs`, `dxil/kernel.rs`, `dxil/lower_mem.rs`); test `CsInterface` literals follow the new field. - The translated-shader disk caches and `ComputePolicyKey` key the switch apart (`recomp/pso.rs`, `real/compute_build_key.rs`). - Tests: `compute_lds_reservation_matches_descriptor_and_lane_storage` (declared size and lane storage per mode, `dxil/core_tests.rs`), `declared_lds_disk_cache_separates_both_direct_routes` (disk cache keys, `recomp/pso.rs`), and `every_compute_build_input_splits_the_key` (`ComputePolicyKey`, `real/compute_build_key.rs`). **Tested** - Rebased head `5003116e` on `main` `227d2cb3` (NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11 Pro 26200, DXC 1.9.2609.5, debug): - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **2,597 passed, 0 failed, 49 ignored** across all 41 test binaries, **26 `SKIPPED`**: - 21 `no wave64` (RTX 5070 Ti is wave32 hardware: `gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole`, 4 `recomp::lower` wave64 tests, 14 `recomp::lower_dxil` wave64 tests, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`) - 3 per-lane wave32 refusals for `#1426` semantics (`f16_programs_on_the_gpu` arithmetic/packed, `f32_programs_on_the_gpu` conversions) - 2 `no heap windows (opt-in: XCL_HEAP_WINDOWS=1)` (`two_pass_binds_set_the_shared_view_heap`, `heap_window_out_of_memory_falls_back_to_the_switch_form`) - With `XCL_DECLARED_LDS=1` (RTX 5070 Ti, DXC 1.9.2609.5): - `cargo test -p xcl --lib -- --test-threads=4 --nocapture lds`: **58 passed, 0 failed, 0 ignored** (1 `SKIPPED`: `gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64`). - `cargo test -p xcl --lib -- --test-threads=4 --nocapture gpu_compute_mode_dispatch_abi`: **1 passed, 0 failed, 0 skipped**. - Earlier head `c4f2a7f3`: - Title, Series X profile, per-program GPU timestamps over 187–229 s: late frame's compute went from ~89 to ~78 ms per present with the switch on; 66 of the late programs translate differently, and with the switch off translation is byte-identical. - Independent GPU readback reports on `c4f2a7f3` in comments below from ettehn (RTX 5070 Ti Laptop), andrewDoing (RTX 5070), SzczepanGrela (RX 9070 native wave64, 360 dispatches), and LocranKing (RTX 3060 Ti paired 180 s smoke). **Regression run** Paired 150 s retail smoke runs on RTX 5070 Ti (warm `PC-SBM` cache, default `XCL_DECLARED_LDS` unset, `XCL_UMA_WINDOWS=16`, `XCL_HEAP_WINDOWS=1`, `XCL_DRED=1`, `XCL_DIRECT_DXIL=all`, `XCL_DIRECT_SPLIT_INSTRUCTIONS=0`, DXC 1.9.2609.5, `XCL_PSO_JOURNAL=0`). `main` exited `0x0` with a 0 B minidump (`crashes: 1`); head `5003116e` exited `0x0` with 0 crashes and 0 device removals (second run after warming `5003116e`'s new `ComputePolicyKey` driver PSO blobs; the first cold-PSO run also exited `0x0` with 2,110 frames, 0 crashes, 0 device removals). `main` (`227d2cb3`): ``` xcl-smoke v1 commit: 227d2cb388f103268dac7635ea720eb3e5352d4e gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 2914 (PresentX 2914) presents per 2 s (last 3): 44 40 12 device removals: 0 crashes: 1 peak commit: 32755 MB ``` PR head (`5003116e`): ``` xcl-smoke v1 commit: 5003116e91c039be335a8544f807bfe5ff9a559f gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 3284 (PresentX 3284) presents per 2 s (last 3): 39 43 7 device removals: 0 crashes: 0 peak commit: 32485 MB ``` **Not tested** - 150 s retail smoke with `XCL_DECLARED_LDS=1` on rebased head `5003116e` (smoke above ran with default `XCL_DECLARED_LDS` unset; unit/GPU tests above covered `XCL_DECLARED_LDS=1`). - Native wave64 hardware (AMD) on `5003116e`; Intel; Wine; opt-in `XCL_HEAP_WINDOWS=1` unit tests; titles other than this one. **AI use** - Claude Code (Claude Opus 5.5): wrote the original change and tests on our team branch and split it onto `main` (`c4f2a7f3`). - Antigravity (Gemini 4 Neon): rebased onto `main` (`227d2cb3` -> `5003116e`), added `declared_lds` to `ComputePolicyKey`, updated workspace `CsInterface` literals, ran the offline title corpus LDS audit, ran the full workspace test suite + `XCL_DECLARED_LDS=1` tests + paired 150 s retail smoke, and updated this description.
ettehn commented 2026-11-27 01:25:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-27T01:25:59Z.


Independent Windows GPU readback on c4f2a7f: RTX 5070 Ti Laptop (12 GB), NVIDIA 621.24, native D3D12. I used console_wave64_compute_through_the_pso_hook_dispatch_and_read_back, with one local fixture change: rsrc2 |= 1 << 15 to declare the 128 LDS dwords the synthetic program writes before reading its partner lane. Runtime code was unchanged.

With XCL_DIRECT_DXIL=1 and fresh XCL caches per run, all four combinations of XCL_PER_LANE=0/1 and XCL_DECLARED_LDS=0/1 completed the dispatch and passed readback. SDK dxc -dumpbin shows @xcl_lds at 8,192 dwords with the switch off and 141 with it on (128 guest + 13 helper) on both lowering routes. This covers real PSO creation and execution for the split-wave LDS case. No retail timings or smoke results from this machine for this test.

OpenAI Codex (6.2sol) assisted with verification.

<!-- greyfinch-sync:ivall/xcl:comment:7207283221 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7207283221). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-27T01:25:59Z. --- Independent Windows GPU readback on `c4f2a7f`: RTX 5070 Ti Laptop (12 GB), NVIDIA 621.24, native D3D12. I used `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`, with one local fixture change: `rsrc2 |= 1 << 15` to declare the 128 LDS dwords the synthetic program writes before reading its partner lane. Runtime code was unchanged. With `XCL_DIRECT_DXIL=1` and fresh XCL caches per run, all four combinations of `XCL_PER_LANE=0/1` and `XCL_DECLARED_LDS=0/1` completed the dispatch and passed readback. SDK `dxc -dumpbin` shows `@xcl_lds` at 8,192 dwords with the switch off and 141 with it on (128 guest + 13 helper) on both lowering routes. This covers real PSO creation and execution for the split-wave LDS case. No retail timings or smoke results from this machine for this test. OpenAI Codex (6.2sol) assisted with verification.
andrewDoing commented 2026-11-27 02:01:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T02:01:11Z.


Independent synthetic readback on PR head c4f2a7f313db2c85ffd5becadafebc58dee85799 plus a test-only fixture, on an RTX 5070. The guest shader declared 128 dwords of LDS and used 16×8×1 workgroups over 2×3 groups. The test compared each thread's own and mirrored lane coordinates through LDS for 768 threads per run.

Four fresh-process tests passed without reported skips or failures: native wave32 and split guest wave64, each with the new allocation behavior off and on. Disassembly showed 8,192 dwords allocated with the behavior off in both modes; with it on, wave32 allocated 129 dwords including the arrival counter, and split wave64 allocated 141 including exchange/counters. All 6,144 expected output words matched across the four runs.

The fixture and header change were test-only; GTA VI execution, retail timing and performance were not tested. AI use: OpenAI Codex with GPT-6.2 Astra wrote and ran the fixture; Codex coordinated and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7207763219 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7207763219). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T02:01:11Z. --- Independent synthetic readback on PR head `c4f2a7f313db2c85ffd5becadafebc58dee85799` plus a test-only fixture, on an RTX 5070. The guest shader declared 128 dwords of LDS and used 16×8×1 workgroups over 2×3 groups. The test compared each thread's own and mirrored lane coordinates through LDS for 768 threads per run. Four fresh-process tests passed without reported skips or failures: native wave32 and split guest wave64, each with the new allocation behavior off and on. Disassembly showed 8,192 dwords allocated with the behavior off in both modes; with it on, wave32 allocated 129 dwords including the arrival counter, and split wave64 allocated 141 including exchange/counters. All 6,144 expected output words matched across the four runs. The fixture and header change were test-only; GTA VI execution, retail timing and performance were not tested. AI use: OpenAI Codex with GPT-6.2 Astra wrote and ran the fixture; Codex coordinated and prepared this report.
SzczepanGrela commented 2026-11-27 02:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-27T02:03:42Z.


RX 9070 / RADV native-wave64 verification of c4f2a7f313db2c85ffd5becadafebc58dee85799 against main 8b957bec6f82495aec940944c6bf47faa02db590.

Tested

  • RX 9070 16 GB, Ryzen 7 7700, CachyOS 7.3.0-5-cachyos, RADV / Mesa 26.3.1-arch3.5. Rust 1.97.1 Windows GNU release executables under GE-Proton11-12 / Wine 11.0 Staging; native DXGI/D3D12, vkd3d-proton 8293130ebe370b1+ with local assertions disabled, DXC/DXIL 1.9.2602.17.
  • XCL_ADAPTER='AMD Radeon RX 9070' XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0 XCL_DXC_THREADS=1 XCL_DIRECT_COMPACT=0, private enabled caches. Production files match each pinned revision; only identical local tests were appended.

The two new upstream tests passed on the head at --test-threads=1 and 4: 2 passed, 0 failed, 0 ignored per top-level run. Each also ran its ten successful child harnesses. The cache test covers its synthetic marker-based cache-key separation.

Additional local probes, run through Wine:

<unit.exe> workflow_declared_lds_ --nocapture --test-threads=1

Separate processes for XCL_DECLARED_LDS=0/1, both revisions, three repetitions per configuration:

  • Layout probe: 144 validated containers per process, both direct lowering routes, 1-D/2-D/3-D groups, native wave32/wave64 and split-form IR. Header LDS reservations include unspecified, small, non-power-of-two, near-limit and oversized cases.
  • GPU probe: 30 dispatches per process, HLSL/direct/per-lane, native wave32/wave64 and five header reservations. Each dispatch runs six 16x8 groups. The program is the existing gpu_compute_mode_dispatch_abi program: write own coordinates to LDS, synchronize, read the reversed partner, then export both. Prefix and suffix canaries surround the output.

For these 2-D GPU cases, the head with the switch on declares 129 / 257 / 385 dwords for 128 / 256 / 384 guest dwords, including the native arrival counter. Unspecified and oversized cases retain 8,192 dwords. HLSL retains 8,192. The layout-only probe also verified the split exchange/counter reservations and fallback cases.

All GPU payloads and guards matched independently computed values: 360 dispatches, including 180 native wave64, 552,960 payload words and 28,800 guard words. Containers have the expected WaveSize and thread-group metadata. Captures repeat byte-for-byte across the three repetitions. Default-off containers match main byte-for-byte in both probes; HLSL and fallback controls remain unchanged with the switch on.

The head reports 2 passed / 0 failed in every configuration. Main with the switch off also passes both probes; with it on, the GPU probe passes and the layout probe fails as expected on 72 size assertions per process, since main retains the old allocation.

Not tested

Retail/smoke, frame-time or occupancy gains, runtime PSO-hook integration, real driver-blob cache reuse, the full suite, or forced-split GPU execution. Split-form coverage here is translation/validation only.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, prepared local test-only probes, ran the comparisons, independently checked layout arithmetic and raw GPU output, and drafted this report. Publication authorized by the account owner.

<!-- greyfinch-sync:ivall/xcl:comment:7207798832 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7207798832). Originally posted by [SzczepanGrela](https://github.com/SzczepanGrela) on 2026-11-27T02:03:42Z. --- RX 9070 / RADV native-wave64 verification of `c4f2a7f313db2c85ffd5becadafebc58dee85799` against `main` `8b957bec6f82495aec940944c6bf47faa02db590`. **Tested** - RX 9070 16 GB, Ryzen 7 7700, CachyOS 7.3.0-5-cachyos, RADV / Mesa 26.3.1-arch3.5. Rust 1.97.1 Windows GNU release executables under GE-Proton11-12 / Wine 11.0 Staging; native DXGI/D3D12, vkd3d-proton `8293130ebe370b1+` with local assertions disabled, DXC/DXIL 1.9.2602.17. - `XCL_ADAPTER='AMD Radeon RX 9070' XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0 XCL_DXC_THREADS=1 XCL_DIRECT_COMPACT=0`, private enabled caches. Production files match each pinned revision; only identical local tests were appended. The two new upstream tests passed on the head at `--test-threads=1` and `4`: **2 passed, 0 failed, 0 ignored** per top-level run. Each also ran its ten successful child harnesses. The cache test covers its synthetic marker-based cache-key separation. Additional local probes, run through Wine: ```text <unit.exe> workflow_declared_lds_ --nocapture --test-threads=1 ``` Separate processes for `XCL_DECLARED_LDS=0/1`, both revisions, three repetitions per configuration: - Layout probe: 144 validated containers per process, both direct lowering routes, 1-D/2-D/3-D groups, native wave32/wave64 and split-form IR. Header LDS reservations include unspecified, small, non-power-of-two, near-limit and oversized cases. - GPU probe: 30 dispatches per process, HLSL/direct/per-lane, native wave32/wave64 and five header reservations. Each dispatch runs six 16x8 groups. The program is the existing `gpu_compute_mode_dispatch_abi` program: write own coordinates to LDS, synchronize, read the reversed partner, then export both. Prefix and suffix canaries surround the output. For these 2-D GPU cases, the head with the switch on declares **129 / 257 / 385 dwords** for 128 / 256 / 384 guest dwords, including the native arrival counter. Unspecified and oversized cases retain 8,192 dwords. HLSL retains 8,192. The layout-only probe also verified the split exchange/counter reservations and fallback cases. All GPU payloads and guards matched independently computed values: **360 dispatches**, including **180 native wave64**, **552,960 payload words** and **28,800 guard words**. Containers have the expected WaveSize and thread-group metadata. Captures repeat byte-for-byte across the three repetitions. Default-off containers match main byte-for-byte in both probes; HLSL and fallback controls remain unchanged with the switch on. The head reports **2 passed / 0 failed** in every configuration. Main with the switch off also passes both probes; with it on, the GPU probe passes and the layout probe fails as expected on 72 size assertions per process, since main retains the old allocation. **Not tested** Retail/smoke, frame-time or occupancy gains, runtime PSO-hook integration, real driver-blob cache reuse, the full suite, or forced-split GPU execution. Split-form coverage here is translation/validation only. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, prepared local test-only probes, ran the comparisons, independently checked layout arithmetic and raw GPU output, and drafted this report. Publication authorized by the account owner.
LocranKing commented 2026-11-27 10:00:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-27T10:00:29Z.


Tested PR #2937 (c4f2a7f3) against main (8b957bec) on Windows 11 (26300), Ryzen 5 5500 (6C/12T), RTX 3060 Ti 8 GiB (driver 621.40), rustc 1.100.0, DXC 1.9.2602.17.

Unit Test (cargo test --locked -p xcl)

  • gpu::recomp::pso::shader_cache_tests::declared_lds_disk_cache_separates_both_direct_routes: passed (1 passed, 0 failed in lib and all invoked subprocess modes).

Paired 180 s Retail Smoke (9cc6a39e, Series S lockhart, XCL_HEAP_WINDOWS=1, XCL_DIRECT_DXIL=all, XCL_DIRECT_SPLIT_INSTRUCTIONS=0, XCL_PSO_WAIT_MS=50)

Note: XCL_DECLARED_LDS=1 changes the direct-DXIL translator key as designed, so PR #2937 ran from a pre-warmed XCL_DECLARED_LDS=1 DXIL snapshot and entered the world at 231.3 s (109.4 s guest entry, 58.1 s in-world) vs main's 188.4 s (67.2 s entry, 58.9 s in-world).

Build Frames shown (~58 s world) World presents (2s windows) Peak commit Peak local / non-local VRAM Console stats Crashes / Removals
main (8b957bec) 1240 14 (28 windows) 29,411 MB 14,281 / 2,241 MB 9,178 draws, 34,068 dispatches (88 skipped) 0 / 0 (exit: 0x0)
PR #2937 (c4f2a7f3, XCL_DECLARED_LDS=1) 1173 22 (28 windows) 30,010 MB 14,522 / 2,851 MB 12,394 draws, 65,536 dispatches (2,578 skipped) 0 / 0 (exit: 0x0)

Both runs stayed clean (0 crashes, 0 device removals, exit: 0x0). In the matched 28 two-second world windows, PR #2937 logged more presents (22 vs 14) and roughly 2x dispatches (65,536 vs 34,068).

Not tested: Per-dispatch GPU timestamp breakdown (XCL_LOOK_STATS), or longer steady-state runs past PSO build-out on 8 GiB VRAM.

<!-- greyfinch-sync:ivall/xcl:comment:7215363211 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7215363211). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-27T10:00:29Z. --- Tested PR #2937 (`c4f2a7f3`) against `main` (`8b957bec`) on Windows 11 (26300), Ryzen 5 5500 (6C/12T), RTX 3060 Ti 8 GiB (driver `621.40`), `rustc 1.100.0`, DXC `1.9.2602.17`. ### Unit Test (`cargo test --locked -p xcl`) - `gpu::recomp::pso::shader_cache_tests::declared_lds_disk_cache_separates_both_direct_routes`: passed (`1 passed, 0 failed` in lib and all invoked subprocess modes). ### Paired 180 s Retail Smoke (`9cc6a39e`, Series S `lockhart`, `XCL_HEAP_WINDOWS=1`, `XCL_DIRECT_DXIL=all`, `XCL_DIRECT_SPLIT_INSTRUCTIONS=0`, `XCL_PSO_WAIT_MS=50`) Note: `XCL_DECLARED_LDS=1` changes the direct-DXIL translator key as designed, so PR #2937 ran from a pre-warmed `XCL_DECLARED_LDS=1` DXIL snapshot and entered the world at `231.3 s` (`109.4 s` guest entry, `58.1 s` in-world) vs `main`'s `188.4 s` (`67.2 s` entry, `58.9 s` in-world). | Build | Frames shown (`~58 s` world) | World presents (`2s` windows) | Peak commit | Peak local / non-local VRAM | Console stats | Crashes / Removals | | --- | --- | --- | --- | --- | --- | --- | | `main` (`8b957bec`) | `1240` | `14` (`28` windows) | `29,411 MB` | `14,281 / 2,241 MB` | `9,178` draws, `34,068` dispatches (`88` skipped) | `0 / 0` (`exit: 0x0`) | | PR #2937 (`c4f2a7f3`, `XCL_DECLARED_LDS=1`) | `1173` | `22` (`28` windows) | `30,010 MB` | `14,522 / 2,851 MB` | `12,394` draws, `65,536` dispatches (`2,578` skipped) | `0 / 0` (`exit: 0x0`) | Both runs stayed clean (`0` crashes, `0` device removals, `exit: 0x0`). In the matched `28` two-second world windows, PR #2937 logged more presents (`22` vs `14`) and roughly 2x dispatches (`65,536` vs `34,068`). **Not tested:** Per-dispatch GPU timestamp breakdown (`XCL_LOOK_STATS`), or longer steady-state runs past PSO build-out on 8 GiB VRAM.
throny commented 2026-11-27 14:42:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T14:42:13Z.


Two contributors checked independently and found that #2158 solves the same problem in a different way: #1607, group D149. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7221120425 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7221120425). Originally posted by [throny](https://github.com/throny) on 2026-11-27T14:42:13Z. --- <!-- xcl-1607-hint:D149 --> Two contributors checked independently and found that #2158 solves the same problem in a different way: #1607, group D149. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
throny commented 2026-11-27 15:38:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T15:38:04Z.


Triage note (from https://github.com/xcl-dev/xcl/issues/1607#issuecomment-7222291116, a check from the outside against CONTRIBUTING.md, not a code review):

PR description is red because the two xcl-smoke blocks (a commit of main, and this head) are missing; the body says they are queued. #2158 addresses the same thing another way (group D149 on #1607), so a line on how the two differ would help whoever merges.

AI use: Claude Code (Claude Fable 5.2).

<!-- greyfinch-sync:ivall/xcl:comment:7222296109 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7222296109). Originally posted by [throny](https://github.com/throny) on 2026-11-27T15:38:04Z. --- Triage note (from https://github.com/xcl-dev/xcl/issues/1607#issuecomment-7222291116, a check from the outside against CONTRIBUTING.md, not a code review): `PR description` is red because the two `xcl-smoke` blocks (a commit of `main`, and this head) are missing; the body says they are queued. #2158 addresses the same thing another way (group D149 on #1607), so a line on how the two differ would help whoever merges. AI use: Claude Code (Claude Fable 5.2).
bmjask commented 2026-11-28 22:04:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-28T22:04:24Z.

Review: COMMENTED


The occupancy result is promising and the implementation is opt-in, but this draft is not review-ready yet: it conflicts, the description still says full tests and smoke runs are queued, and the smoke evidence predates the current review state.

Please resolve the conflict as a focused LDS-sizing change, run the full exact-head suite, and attach required main/head smoke blocks. Include the count of programs that retain the conservative 8,192-dword layout and all GPU-test skips.

Reviewed at c4f2a7f313 with Codex (GPT-5).

<!-- greyfinch-sync:ivall/xcl:review:6100275529 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#pullrequestreview-6100275529). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-28T22:04:24Z. **Review:** COMMENTED --- The occupancy result is promising and the implementation is opt-in, but this draft is not review-ready yet: it conflicts, the description still says full tests and smoke runs are queued, and the smoke evidence predates the current review state. Please resolve the conflict as a focused LDS-sizing change, run the full exact-head suite, and attach required main/head smoke blocks. Include the count of programs that retain the conservative 8,192-dword layout and all GPU-test skips. Reviewed at c4f2a7f313db2c85ffd5becadafebc58dee85799 with Codex (GPT-5).
Kalmarv commented 2026-11-28 23:34:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T23:34:10Z.


Rebased onto main (227d2cb3 -> 5003116e) as a focused LDS-sizing change, including declared_lds in main's ComputePolicyKey (pso.rs / compute_build_key.rs) and updating all new CsInterface test literals.

Also added a short comparison against #2158 (#1607 D149) to the description per @throny's note (opt-in XCL_DECLARED_LDS=1 with exact declared + control sizing and umin clamping in both wave32 and split-wave64 vs #2158's default-on power-of-two sizing across HLSL + direct DXIL).

Targeted tests run on 5003116e (RTX 5070 Ti, debug, Windows SDK DXC 1.7.2308):

  • cargo test --workspace --no-run: ok
  • compute_lds_reservation_matches_descriptor_and_lane_storage, declared_lds_disk_cache_separates_both_direct_routes, every_compute_build_input_splits_the_key: 3 passed, 0 failed, 0 skipped
  • gpu_compute_mode_dispatch_abi: 1 passed, 0 failed, 0 skipped
  • lds filter: 58 passed, 0 failed, 0 ignored (2 SKIPPED lines on dispatch_chain_native_wave64_builds_whole: DXC 1.7 < 1.8 and no wave64)

Still pending before ready for final review per @bmjask: exact-head full workspace suite, paired main/5003116e xcl-smoke blocks, and the count of programs retaining the conservative 8,192-dword layout.

AI use: Antigravity (Gemini 4 Neon) rebased the branch, ran the targeted tests, updated the PR body, and posted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7247518229 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7247518229). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-28T23:34:10Z. --- Rebased onto `main` (`227d2cb3` -> `5003116e`) as a focused LDS-sizing change, including `declared_lds` in `main`'s `ComputePolicyKey` (`pso.rs` / `compute_build_key.rs`) and updating all new `CsInterface` test literals. Also added a short comparison against #2158 (#1607 D149) to the description per @throny's note (opt-in `XCL_DECLARED_LDS=1` with exact `declared + control` sizing and `umin` clamping in both wave32 and split-wave64 vs #2158's default-on power-of-two sizing across HLSL + direct DXIL). Targeted tests run on `5003116e` (RTX 5070 Ti, debug, Windows SDK DXC 1.7.2308): - `cargo test --workspace --no-run`: ok - `compute_lds_reservation_matches_descriptor_and_lane_storage`, `declared_lds_disk_cache_separates_both_direct_routes`, `every_compute_build_input_splits_the_key`: 3 passed, 0 failed, 0 skipped - `gpu_compute_mode_dispatch_abi`: 1 passed, 0 failed, 0 skipped - `lds` filter: 58 passed, 0 failed, 0 ignored (2 `SKIPPED` lines on `dispatch_chain_native_wave64_builds_whole`: DXC 1.7 < 1.8 and no wave64) Still pending before ready for final review per @bmjask: exact-head full workspace suite, paired `main`/`5003116e` `xcl-smoke` blocks, and the count of programs retaining the conservative 8,192-dword layout. AI use: Antigravity (Gemini 4 Neon) rebased the branch, ran the targeted tests, updated the PR body, and posted this comment.
Kalmarv commented 2026-11-29 00:30:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T00:30:14Z.


Updated PR description with the offline title corpus LDS audit (per @bmjask), full workspace test suite, and paired exact-head 150 s retail smoke on 5003116e:

Title shader corpus LDS fallback count (shaders.rpf + XboxBvhBuilder.dll, 2,734 unique compute shaders, 497 using LDS):

  • 0 / 497 have COMPUTE_PGM_RSRC2.LDS_SIZE == 0.
  • 491 / 497 (98.8%) shrink strictly below 8,192 dwords (<= 512: 248, 513..=1024: 104, 1025..=2048: 60, 2049..=4096: 45, 4097..8192: 34 on wave32-hw).
  • 2 / 497 declare 8,192 dwords on native wave32 (1-D, control = 0, exact 8,192 fit).
  • 4 / 497 declare 8,192 dwords in wave64 [1024, 1, 1] (slot = 1, control = 97 in split-wave64 -> 8,289 > 8,192) and retain the conservative 8,192-dword fallback on wave32-hw (NVIDIA), 0 fall back on native wave64-hw (AMD): vfx_proj_decal_hit_detection:CS_ComputeHitDetectionResults_7b0d06e8_Wrapped, vfx_proj_decal_hit_detection:CS_ComputeHitDetectionSkinnedResults_7b0d06e8_Wrapped, vfx_triangleClip:CS_CollectTriangles_cb481f38_Wrapped, vfx_triangleClip:CS_CollectTriangles_Meshlets_cb481f38_Wrapped.

Tests & paired 150 s smoke on 5003116e (RTX 5070 Ti, DXC 1.9.2609.5):

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 2,597 passed, 0 failed, 49 ignored, 26 SKIPPED (21 no wave64, 3 #1426 per-lane refusals, 2 no heap windows).
  • With XCL_DECLARED_LDS=1: lds filter 58 passed, 0 failed (1 SKIPPED: no wave64); gpu_compute_mode_dispatch_abi 1 passed, 0 failed, 0 skipped.
  • 150 s smoke (ea3b5e4d, default XCL_DECLARED_LDS unset): main 227d2cb3 = 2,914 frames / 32,755 MB peak commit vs head 5003116e = 3,284 frames / 32,485 MB peak commit, 0 crashes, 0 device removals.
  • Local scripts/pr_check.py --local: description ok.

AI use: Antigravity (Gemini 4 Neon) ran the corpus audit, full workspace test suite, XCL_DECLARED_LDS=1 tests, and paired smoke, updated the PR body, and posted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7248157454 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7248157454). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T00:30:14Z. --- Updated PR description with the offline title corpus LDS audit (per @bmjask), full workspace test suite, and paired exact-head 150 s retail smoke on `5003116e`: **Title shader corpus LDS fallback count (`shaders.rpf` + `XboxBvhBuilder.dll`, 2,734 unique compute shaders, 497 using LDS):** - **0 / 497** have `COMPUTE_PGM_RSRC2.LDS_SIZE == 0`. - **491 / 497 (98.8%)** shrink strictly below 8,192 dwords (`<= 512`: 248, `513..=1024`: 104, `1025..=2048`: 60, `2049..=4096`: 45, `4097..8192`: 34 on wave32-hw). - **2 / 497** declare 8,192 dwords on native wave32 (1-D, `control = 0`, exact 8,192 fit). - **4 / 497** declare 8,192 dwords in wave64 `[1024, 1, 1]` (`slot = 1`, `control = 97` in split-wave64 -> `8,289 > 8,192`) and retain the conservative 8,192-dword fallback on wave32-hw (NVIDIA), **0** fall back on native wave64-hw (AMD): `vfx_proj_decal_hit_detection:CS_ComputeHitDetectionResults_7b0d06e8_Wrapped`, `vfx_proj_decal_hit_detection:CS_ComputeHitDetectionSkinnedResults_7b0d06e8_Wrapped`, `vfx_triangleClip:CS_CollectTriangles_cb481f38_Wrapped`, `vfx_triangleClip:CS_CollectTriangles_Meshlets_cb481f38_Wrapped`. **Tests & paired 150 s smoke on `5003116e` (RTX 5070 Ti, DXC 1.9.2609.5):** - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **2,597 passed, 0 failed, 49 ignored, 26 `SKIPPED`** (21 `no wave64`, 3 `#1426` per-lane refusals, 2 `no heap windows`). - With `XCL_DECLARED_LDS=1`: `lds` filter **58 passed, 0 failed** (1 `SKIPPED`: `no wave64`); `gpu_compute_mode_dispatch_abi` **1 passed, 0 failed, 0 skipped**. - 150 s smoke (`ea3b5e4d`, default `XCL_DECLARED_LDS` unset): `main` `227d2cb3` = 2,914 frames / 32,755 MB peak commit vs head `5003116e` = 3,284 frames / 32,485 MB peak commit, 0 crashes, 0 device removals. - Local `scripts/pr_check.py --local`: `description ok`. AI use: Antigravity (Gemini 4 Neon) ran the corpus audit, full workspace test suite, `XCL_DECLARED_LDS=1` tests, and paired smoke, updated the PR body, and posted this comment.
andrewDoing commented 2026-11-29 00:36:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T00:36:08Z.


I measured warm GPU dispatch time for a synthetic direct-DXIL compute shader at 5003116e91c039be335a8544f807bfe5ff9a559f on an RTX 5070 (driver 616.92). The shader writes a coordinate into LDS, synchronizes one 16×2 wave32 workgroup, reads its mirrored lane, and stores both values. All output DWORDs were checked against a CPU oracle for both translations.

Workgroups per dispatch Output DWORDs checked per variant Switch off XCL_DECLARED_LDS=1
1,024 65,536 3.392 µs 1.632 µs
16,384 1,048,576 38.128 µs 11.264 µs

Values are the median of four within-block medians per setting. The same guest program declared 128 dwords of static LDS; disassembly showed 8,192 dwords off and 129 on, including the 2-D arrival word. I generated the two DXIL blobs in separate processes and timed both in one process. The block order was off/on/on/off/on/off/off/on, 25 dispatches per block, dropping the first five. Each measured interval is bracketed by native D3D12 GPU timestamps and excludes PSO creation, upload and CPU waiting. On the larger workload, off block medians ranged from 38.080–38.192 µs and on from 11.168–11.296 µs.

This measures the complete switch-generated shader, including address-lowering differences. I did not collect hardware occupancy counters. A prior 16×8 multiwave mirror fixture now reaches the direct translator's multiwave barrier refusal, so I used the supported single-wave configuration for these numbers. The timings describe only this synthetic dispatch; they do not reproduce the title frame-time measurement.

AI use: OpenAI Codex adapted the mirror fixture, ran the paired timestamps and output checks, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7248225793 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7248225793). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-29T00:36:08Z. --- I measured warm GPU dispatch time for a synthetic direct-DXIL compute shader at `5003116e91c039be335a8544f807bfe5ff9a559f` on an RTX 5070 (driver 616.92). The shader writes a coordinate into LDS, synchronizes one 16×2 wave32 workgroup, reads its mirrored lane, and stores both values. All output DWORDs were checked against a CPU oracle for both translations. | Workgroups per dispatch | Output DWORDs checked per variant | Switch off | XCL_DECLARED_LDS=1 | |---:|---:|---:|---:| | 1,024 | 65,536 | 3.392 µs | 1.632 µs | | 16,384 | 1,048,576 | 38.128 µs | 11.264 µs | Values are the median of four within-block medians per setting. The same guest program declared 128 dwords of static LDS; disassembly showed 8,192 dwords off and 129 on, including the 2-D arrival word. I generated the two DXIL blobs in separate processes and timed both in one process. The block order was off/on/on/off/on/off/off/on, 25 dispatches per block, dropping the first five. Each measured interval is bracketed by native D3D12 GPU timestamps and excludes PSO creation, upload and CPU waiting. On the larger workload, off block medians ranged from 38.080–38.192 µs and on from 11.168–11.296 µs. This measures the complete switch-generated shader, including address-lowering differences. I did not collect hardware occupancy counters. A prior 16×8 multiwave mirror fixture now reaches the direct translator's multiwave barrier refusal, so I used the supported single-wave configuration for these numbers. The timings describe only this synthetic dispatch; they do not reproduce the title frame-time measurement. AI use: OpenAI Codex adapted the mirror fixture, ran the paired timestamps and output checks, and drafted this report.
iggyvilla commented 2026-11-29 08:13:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-29T08:13:01Z.


Tested (RDNA2 data point on a retail world-load run; the thread has NVIDIA and RDNA4/RADV reports so far)

  • RX 6650 XT 8 GB (RDNA2, DXGI local budget about 6.3-6.6 GB), Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11, release build, Series S profile (lockhart), XCL_NETWORK=0.
  • Not the current head. I ported the diff of c4f2a7f3 (+122/-29) by hand onto a local fork of amd-dev (7c795f5e plus local VRAM work), so this says nothing about the rebase to 5003116e. The CS pipelines were re-precompiled once because the DXIL keys change (136 new pipelines, 0 refused, 48 s).
  • Two 600 s retail runs of the same world-load script, identical except for the port (the job files differ only in XCL_DECLARED_LDS=1; the builds differ only by the port commit): each is a single run, not paired or repeated, so run-to-run noise is unmeasured.
600 s run without with XCL_DECLARED_LDS=1
exit clean clean, 0 errors
presents 2,684 2,879
FPS, frames 2100-2400 2.9 4.1
peak local VRAM 9,787 MB 8,213 MB (flat 8,064 MB for the last 250 s)
peak commit 29.3 GB 27.1 GB

The run with the switch on was also the first to get past frame 2,700. I did not isolate how much of the VRAM and commit drop comes from smaller LDS allocations and how much from the run reaching different content, so treat the VRAM/commit rows as an observation, not a measured effect. On this card the 8 GB budget makes a lower LDS reservation matter more than on the 12-16 GB cards above.

AI use: Claude Code (Claude Sonnet 5.5, effort high) ported the diff, built and ran both runs, and wrote this comment. The account owner did not write it and approved posting it without reading it.

<!-- greyfinch-sync:ivall/xcl:comment:7252961179 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7252961179). Originally posted by [iggyvilla](https://github.com/iggyvilla) on 2026-11-29T08:13:01Z. --- **Tested** (RDNA2 data point on a retail world-load run; the thread has NVIDIA and RDNA4/RADV reports so far) - RX 6650 XT 8 GB (RDNA2, DXGI local budget about 6.3-6.6 GB), Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11, release build, Series S profile (`lockhart`), `XCL_NETWORK=0`. - Not the current head. I ported the diff of `c4f2a7f3` (+122/-29) by hand onto a local fork of `amd-dev` (`7c795f5e` plus local VRAM work), so this says nothing about the rebase to `5003116e`. The CS pipelines were re-precompiled once because the DXIL keys change (136 new pipelines, 0 refused, 48 s). - Two 600 s retail runs of the same world-load script, identical except for the port (the job files differ only in `XCL_DECLARED_LDS=1`; the builds differ only by the port commit): each is a single run, not paired or repeated, so run-to-run noise is unmeasured. | 600 s run | without | with `XCL_DECLARED_LDS=1` | |---|---:|---:| | exit | clean | clean, 0 errors | | presents | 2,684 | 2,879 | | FPS, frames 2100-2400 | 2.9 | 4.1 | | peak local VRAM | 9,787 MB | 8,213 MB (flat 8,064 MB for the last 250 s) | | peak commit | 29.3 GB | 27.1 GB | The run with the switch on was also the first to get past frame 2,700. I did not isolate how much of the VRAM and commit drop comes from smaller LDS allocations and how much from the run reaching different content, so treat the VRAM/commit rows as an observation, not a measured effect. On this card the 8 GB budget makes a lower LDS reservation matter more than on the 12-16 GB cards above. AI use: Claude Code (Claude Sonnet 5.5, effort high) ported the diff, built and ran both runs, and wrote this comment. The account owner did not write it and approved posting it without reading it.
Foniass commented 2026-11-30 00:00:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-30T00:00:06Z.


For coordination: #3478 combines this PR with raylitebull's amd-dev version of it (5e488781, on by default there). It is rebased on main, after the safe multi-wave barrier (#3264) and on #3468's LDS clamp, and credits you as co-author. It keeps your lds_dwords, layout, ComputePolicyKey field and clamp condition. It adds amd-dev's safe-barrier placement, makes the default on, and tests native wave64 on an AMD RDNA2 iGPU. Your 89 → 78 ms measurement is quoted there. If you'd rather carry it here, say so and I'll close #3478.

(Claude Code, Claude Opus 5.5, for Foniass)

<!-- greyfinch-sync:ivall/xcl:comment:7264886118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7264886118). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-30T00:00:06Z. --- For coordination: #3478 combines this PR with raylitebull's amd-dev version of it (`5e488781`, on by default there). It is rebased on main, after the safe multi-wave barrier (#3264) and on #3468's LDS clamp, and credits you as co-author. It keeps your `lds_dwords`, layout, `ComputePolicyKey` field and clamp condition. It adds amd-dev's safe-barrier placement, makes the default on, and tests native wave64 on an AMD RDNA2 iGPU. Your 89 → 78 ms measurement is quoted there. If you'd rather carry it here, say so and I'll close #3478. (Claude Code, Claude Opus 5.5, for Foniass)
Foniass commented 2026-12-01 06:01:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:01:58Z.


Review (head 5003116e, diff read, not a merge-check; it conflicts with main, so not built or run):

  • Mostly superseded. The lds_index clamp change is already on main (ada50ec5, #3497), and open #3478 carries the rest rebased onto current main (on by default, crediting this PR, with a GPU test).
  • A straight rebase would break the safe barrier. Main's setup_storage (lanes.rs ~25-47) now keeps words 8189-8190 for the safe barrier's counters and lowers the program's top to 8188. This PR's layout leaves no room for them, so with a smaller xcl_lds those counters would land past the end of the array. #3478 already handles this.
  • Smaller points: an LDS access past the declared size is now clamped onto the program's last declared dword, where the 8,192-dword layout left it in unused words (only matters if a title indexes past its LDS_SIZE); the new test only checks the array size in the disassembly, with no GPU run of the moved 2-D / 3-D arrival counter (xw at words-1).

Fine: LDS_SIZE decoding (x128 dwords), the fallback to 8,192 for no size or one too large, off by default, and the disk cache and ComputePolicyKey kept apart. Recommendation: close in favour of #3478.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7302401315 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7302401315). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:01:58Z. --- Review (head 5003116e, diff read, not a merge-check; it conflicts with main, so not built or run): - **Mostly superseded.** The `lds_index` clamp change is already on main (ada50ec5, #3497), and open #3478 carries the rest rebased onto current main (on by default, crediting this PR, with a GPU test). - **A straight rebase would break the safe barrier.** Main's `setup_storage` (`lanes.rs` ~25-47) now keeps words 8189-8190 for the safe barrier's counters and lowers the program's top to 8188. This PR's layout leaves no room for them, so with a smaller `xcl_lds` those counters would land past the end of the array. #3478 already handles this. - Smaller points: an LDS access past the declared size is now clamped onto the program's last declared dword, where the 8,192-dword layout left it in unused words (only matters if a title indexes past its LDS_SIZE); the new test only checks the array size in the disassembly, with no GPU run of the moved 2-D / 3-D arrival counter (`xw` at `words-1`). Fine: LDS_SIZE decoding (x128 dwords), the fallback to 8,192 for no size or one too large, off by default, and the disk cache and `ComputePolicyKey` kept apart. Recommendation: close in favour of #3478. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
throny commented 2026-12-01 15:59:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T15:59:07Z.


Closing as superseded: the same change is in #3478 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7316843040 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2937#issuecomment-7316843040). Originally posted by [throny](https://github.com/throny) on 2026-12-01T15:59:07Z. --- Closing as superseded: the same change is in #3478 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5).

Pull request closed

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