Recompiler: share scalar-load bodies in direct DXIL compute shaders #2557

Closed
Kalmarv wants to merge 7 commits from upstream-pr/2567 into main
Kalmarv commented 2026-11-25 23:04:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-25T23:04:50Z.


Part of #1096.

On native Windows D3D12 (RTX 5070 Ti), 80e3aaf5 fixes a deterministic readback mismatch on one seeded cascade compute program from title: ea3b5e4d. Two consecutive eight-word scalar loads provided descriptors for different image stores. On the earlier head, a later use of the first returned descriptor index selected the second texture. The loads had valid addresses and all 128 lanes reached the instrumented block. Separate caller storage for the first wide call alone reproduced the failure. Writing every result word through the output parameter restored both textures.

Cascade run Words changed from input Full-readback differences vs main Expected texels matched
Main 2,048 0 256/256
Earlier four-site implementation 1,024 1,024 256/256
Corrected translator 2,048 0 256/256
Repeated main control 2,048 0 256/256

A source-only GPU regression loads four different image descriptors through the same helper and checks every texel of all four output textures. The inline run passed before the fix, while the outlined run left the first texture untouched. Both pass after the fix. All three scalar-load tests passed on 80e3aaf5.

In the direct DXIL compute translator, each scalar load repeats its memory-window address calculation, window guard and load. On NVIDIA with XCL_DXIL_OUTLINE=1, the translator emits one internal noinline function for each addressing form and width used at four or more emitted load sites. Less frequent shapes stay inline. The default remains inline. Enabling outlining on NVIDIA bypasses the translated compute shader cache for A/B measurements. Graphics stages retain their usual cache behavior.

What is in it

  • Commit d051d271 enables scalar-load outlining only for NVIDIA (PCI vendor ID 0x10de). In a title, XCL uses the adapter on which it created the device, including any fallback. The offline shader tool uses its selected DXGI adapter. On AMD, Intel, WARP or an unidentified adapter, requesting outlining logs the reason once, keeps scalar loads inline and preserves the normal compute cache.

  • Both forms use the existing lowering for signed offsets, carry across a 4 GiB window and per-word buffer bounds. Each helper returns void and writes every word into caller-local storage. The caller loads the results immediately after the call.

  • The direct bitcode writer retains nested helper definitions and their module globals. Feature scans follow calls through reachable blocks for FMad, double extensions, instruction types and resource flags. Dispatch pieces recreate the return storage locally.

Measured bound DXIL

The offline workload was the 802 compute programs bound in a capture of title: ea3b5e4d. Both forms translated 802/802 with four guarded heap windows and split wave64 on wave32. For a split program the totals include its bound pieces once each. Instruction totals include helper bodies.

Minimum sites per form and width Bound DXIL bytes DXIL instructions Programs split Programs larger than inline Total growth among those programs
Inline 251,069,680 31,926,579 220 — —
1 211,625,876 27,180,567 217 205 179,160 B
3 211,533,168 27,167,079 219 66 119,232 B
4 sites, earlier return convention 211,534,620 27,169,353 219 21 102,564 B
4 sites, corrected output convention 213,902,552 27,465,783 219 36 90,144 B

With the corrected output convention, four sites saved 37,167,128 bound DXIL bytes (14.8%) and 4,460,796 instructions (14.0%) against inline. All 802 programs translated. The count excludes reloads reused from earlier instructions and counts shared compact-block bodies once. The inline baseline used 6d12f58a; only the README changed between it and PR base e1d84b7d. The earlier one-, three- and four-site rows show the original threshold experiment. Moving from three to four sites in that experiment cost 1,452 bytes across the set and avoided growth on 45 programs. The corrected row uses the production changes committed in 80e3aaf5.

Tested

On native Windows with the RTX 5070 Ti, the full library suite at 3c0fc4b9 reported 1,316 passed, 0 failed and 27 ignored. Fourteen named tests reported explicit skips. The view-end and descriptor-preservation GPU fixtures, DXIL validation and the strict vendor regression all passed without a skip.

On 3c0fc4b9, the strict-mode regression exercises both XCL_REQUIRE_GPU=wave64 and mesh with simulated vendor IDs. In both modes a known AMD adapter is excluded, NVIDIA proceeds, and missing vendor discovery still raises a required-GPU failure. The Windows DXIL core tests with no matching adapter reported 25 passed, 0 failed and 1 ignored, with 8 tests reporting explicit skips.

The Windows CPU-only library suite on the rebased head 89e1a91d reported 1,043 passed, 0 failed, 23 ignored and 276 filtered out. Of the reported passes, 212 tests explicitly skipped.

On native Windows with the RTX 5070 Ti, the full workspace suite on 89e1a91d reported 1,441 passed, 0 failed and 47 ignored with four test threads, direct DXIL and outlining enabled. 15 named tests emitted explicit skips within these totals.

On d051d271, the Windows CPU-only library run below reported 1,033 passed, 0 failed, 22 ignored and 275 filtered out. Of the reported passes, 211 tests printed an explicit skip. The vendor regression accepts NVIDIA and rejects AMD, Intel, Microsoft software and an unidentified vendor. Requesting outlining with no matching adapter emitted one inline-fallback diagnostic during the run.

Windows x64, Ryzen 9 9950X, Rust 1.99.0, DXC 1.9. On 4b80fb51, both direct DXIL and outlining were enabled, and XCL_ADAPTER=no-such-adapter selected the CPU-only run. The libtest result was 1031 passed, 0 failed, 22 ignored and 275 filtered out. Of the reported passes, 210 tests emitted an explicit skip. The filters exclude tests that create a D3D device directly.

cargo test -p xcl --lib -- --test-threads=4 --skip hle::d3d12x --skip gpu::texture --skip hle::mfplat --skip gpu_arena_partial_commit_probe --skip probe_standard_swizzle_support

outlined_scalar_loads_validate translated, validated and disassembled an outlined shader with one root window, four root windows and four guarded heap windows.

Regression tests distinguish three versus four emitted sites per shape, cover duplicate reloads, and validate nested helpers with a groupshared global and feature-bearing instructions. Dead-block calls are excluded from those checks.

On Windows D3D12 with an RTX 5070 Ti, 39c25eba with direct DXIL and outlining enabled reported 51 passed, 0 failed, 3 ignored across the wave64, split, dispatch-chain and scalar-load filters. Three reported passes explicitly skipped for lack of native wave64. The four-site view-end fixture matched the expected words on wave32 and split wave64.

GPU correctness on Wine/vkd3d-proton

On the NVIDIA-gated head d051d271, the vendor-policy test passed on the RTX 2060. With DXVK 3.1.1 configured to report the physical NVIDIA vendor ID (dxgi.hideNvidiaGpu = False), all three scalar-load tests passed with zero explicit skips. The default DXVK configuration reported an AMD vendor ID, so the runtime selected inline loads.

On the RTX 2060, the full library suite on corrected head 80e3aaf5 reported 1,295 passed, 8 failed, 26 ignored. The fresh main baseline (e1d84b7d) reported 1,289 passed, 9 failed, 26 ignored. All eight failures on the PR also occurred on main, including one intermittent sparse-memory test. Both builds emitted the same explicit skip messages across 14 tests. The new four-texture descriptor test, the view-end output test and DXIL validation all passed on the corrected head.

This comparison used clean Windows GNU release builds, NVIDIA 595.91, WineHQ wine-staging 11.21, vkd3d-proton 30b0eb9, DXC 1.9.2609, both direct DXIL and outlining switches enabled, and four test threads.

On an RTX 2060 (NVIDIA 595.91) with Wine 11.21, vkd3d-proton 30b0eb9, DXC 1.9.2609 and Windows GNU release builds, main e1d84b7d and 39c25eba each reported 49 passed, 0 failed, 3 ignored for the wave64, split and dispatch-chain filters. Both switches were set on both runs. Main ignores XCL_DXIL_OUTLINE. Both pass counts include the same three explicit native-wave64 skips.

On 39c25eba, the two PR-specific scalar-load tests passed. The four-site view-end fixture matched inline output on wave32 and split wave64, and the DXIL validation test passed. This adapter cannot exercise the native-wave64 subcase. Main has neither test.

On the previous head 3cf12a52, DXC validated all six affected modules, but vkd3d-proton rejected the outlined wave32 view-end shader because its private output parameter lacked noalias. The cross-half test also failed on that head. Both failures cleared after the parameter attribute was added.

A fresh full-library comparison on WineHQ wine-staging 11.21, vkd3d-proton 30b0eb9, DXVK 3.1.1 DXGI and the same RTX 2060 used both switches on both builds. 39c25eba reported 1,294 passed, 8 failed, 26 ignored. Main e1d84b7d reported 1,289 passed, 9 failed, 26 ignored. Both produced the same 28 explicit skip messages across 14 tests. Seven failures occurred on both heads. Two sparse-memory tests failed only on main in the parallel run and passed three times each in isolation on both heads.

The PR-only mesh-cache test failed three times in isolation. The same failure reproduced on Windows. Compute outlining had bypassed the mesh shader cache even though it only changes compute translation. Commit 4b80fb51 scopes the bypass to compute. The original mesh-cache test and the stage-specific cache-policy regression both pass on Windows with both switches enabled. The full Wine rerun on 4b80fb51 reported 1,295 passed, 7 failed, 26 ignored. The mesh-cache test passed. All seven failures also occurred on main, which reported 1,289 passed, 9 failed, 26 ignored under the same settings. The two additional main failures were the sparse-memory tests described above. The final head and main produced the same 28 explicit skip messages across 14 tests.

Tested by others

  • veyn-sudo measured 926 compute records common to all builds on an RTX 2070 SUPER 8 GB (driver 617.14). The offline comparison was cumulative. Against a 328.3 MB baseline, #2576 alone brought cached driver code to 308.1 MB (−6.2%). Enabling #2567 outlining at 3c0fc4b9 then brought it to 256.6 MB (−21.8% cumulative), an additional 15.6 percentage points of the baseline. DXIL fell from 220.8 to 179.4 MB at that step. Enabling #2427 flat windows last brought driver code to 253.6 MB (−22.7% cumulative). The earlier title runs used only #2576 and #2567 of these three changes, with flat windows off. Bound graphics and compute code totaled 323–353 MB versus 381–410 MB across local baseline configurations. Two baseline runs saw device removal around 196 s. Both outlined runs ended without removal (RAM guard at 207 s and a full 331 s). Offline step measurements · Title runs

On 3c0fc4b, upipibi tested an RTX 3070 8 GB (driver 616.56) with XCL_DIRECT_DXIL=1 and XCL_DXIL_OUTLINE=1. The view-end comparison, descriptor-preservation check and strict vendor regression each passed three out of three runs with zero skips. The library suite reported 1,307 passed, 0 failed and 27 ignored, with 25 explicit skip notices. They excluded hle::xaudio2 because it also hangs on main on their machine. upipibi’s RTX 3070 report

On the same head and with both switches enabled, thehollowedone ran all four outlined_scalar_loads tests on an RTX 3080 Ti (driver 621.35). All four passed with zero skips. The full workspace reported 1,442 passed, 0 failed and 47 ignored across 37 targets, with 25 explicit GPU skip notices. Both reports cover correctness tests only. Neither contributor ran a retail title or measured performance. thehollowedone’s RTX 3080 Ti report

Thank you to upipibi for testing 89e1a91 on Windows 11 with an RTX 3070 (driver 616.56). The library suite, excluding hle::xaudio2 on both heads, reported 1,305 passes and one failure on the first PR run, 1,306 passes and zero failures on the second, and 1,300 passes and zero failures on base b49be18. Each run had 27 ignored tests. The flake occurred in main’s cpu_writes::tests::writes_land_after_the_queue, in a file this PR leaves unchanged. The assertion printed [7, 9] on both sides. Upipibi suggested that waiting only for the first word could explain the result. With XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1, the validation and view-end equivalence tests both passed in all three runs, with zero skips. upipibi’s RTX 3070 report

Thank you to pvfreis for the first native NVIDIA size measurement on Ampere for this PR. On Windows 11 with an RTX 3060 (driver 617.14), they tested 89e1a91d in tree 2ec6aec4, built on main b49be183 with #2427 (c8c2b7a6), #2428 (970823e4) and #2496 (78bba5ca). They toggled only XCL_DXIL_OUTLINE in the same build. Both arms used flat heap windows, no-carry addressing, one pipeline per record and disabled translation caches.

Across 60 preselected compute records (30 largest and 30 sampled), enabling outlining reduced total GetCachedBlob size from 34.755 to 32.875 MB (5.4%). Of the 60 records, 47 shrank, five stayed the same and eight grew. DXIL fell from 26.739 to 24.631 MB (7.9%). Both validators accepted all 120 containers, and all 60 pipelines built in each arm. With dispatch chains enabled on the same 60 records, outlining reduced cached driver code from 41.129 to 39.203 MB (4.7%). The size runs omitted the suite, output checks, build and dispatch timing, and title runs. pvfreis’s Ampere measurements

Thank you to bielfreedom for isolating the native Windows failure on an RX 9070 XT (driver 32.0.32029.2010). They tested 39c25eb and 80e3aaf on 26 large compute programs. With outlining enabled, 0 pipelines built and 60 were refused, reproduced in both runs. With outlining disabled, all 76 built. An isolated 8,744-byte outlined shader failed at CreateComputePipelineState. In the full run, the other 59 refusals occurred during root-signature creation. Device loss was suspected and remains unconfirmed. Across 2,689 compute programs, offline DXIL fell from 885.9 to 646.7 MB (27.0%). The pipeline failures motivated the NVIDIA vendor gate. bielfreedom’s AMD report

Thank you to bielfreedom for retesting the vendor gate on the same RX 9070 XT at 89e1a91 on main b49be18. With XCL_DXIL_OUTLINE=1, XCL logged the fallback once and kept scalar loads inline. All 2,689 compute programs produced byte-identical DXIL with the switch on and off (885.9 MB in each case). Across the 26 large programs, 76 of 76 pipelines built with zero refusals in both switch-on runs. Both interleaved switch-off controls also built all 76. bielfreedom’s AMD rerun

Thanks to DavidM1911 for running the library suite on Windows 11 with an RTX 3060 Ti after merging the branch into their current main. They reported 0 failures and 26 ignored. The exact head, pass count and outlining setting were unreported. DavidM1911’s test report

Thanks to KDenKC for the RTX 5090 measurements, the call-site threshold experiment and the helper-feature review. On Windows 11, driver 621.24 and head 3cf12a52, their six-program sample went from 8.91 to 7.64 MiB of cached driver blobs (−14.3%) and from 51.6 to 41.0 seconds of cold compilation. One program grew 8.1% in native bytes. Across their separate 810-program offline set, DXIL shrank 16.0% overall, with 195 programs growing by a combined 127 KiB. Their three- and four-site screens reduced that count to 59 and 18. Thank you to KDenKC for extending the test to the full used compute set.

On d9b261e9, one commit before the four-site threshold in 39c25eba, KDenKC ran a cold precompile with isolated caches over approximately 810 compute programs used by title: ea3b5e4d. Enabling scalar-load outlining reduced cached native driver blobs from 311.31 to 274.95 MiB (36.36 MiB, 11.7%) and precompile wall time from 339.2 to 317.4 seconds (6.4%). Pipeline count fell from 2,585 to 2,278, with zero refusals in both runs. The cache recorded builds over 250 ms, leaving roughly 30–40 small pipelines per arm outside the byte totals. Both GPU tests passed on that head. These native results cover the earlier return convention. KDenKC’s measurements and review

Thanks to SlopTart for the first AMD run. They tested a clean local merge of the then-current PR head (d9b261e9) onto their current origin/main on a Radeon RX 7900 XT, Arch Linux 7.2.15, Mesa RADV 26.2.5, Wine 11.0 and XCL-patched vkd3d-proton 3.1, using a Windows GNU build. The cold-cache gpu_ suite reported 165 passed, 3 failed, no crashes. SlopTart identified all three as existing baseline failures: the seed-1003 fuzz case, MAD/MAC contraction and promoted UAV clear (#2490). The exact merge SHA and the setting of XCL_DXIL_OUTLINE were unreported, so coverage of the opt-in path remains unconfirmed on AMD. The run did not include a retail title. SlopTart’s test report

Regression run

Both 120-second runs used native Windows D3D12 with direct DXIL and outlining enabled.

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 2384 (PresentX 2384)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 16721 MB
xcl-smoke v1
commit: 3c0fc4b96a6b3706d8bac16492760bef6bb5ff12
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 3094 (PresentX 3094)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15855 MB

Not tested

  • Native Windows comparison across all six programs on this exact PR head. The seeded cascade now matches main over the full readback. The other five programs await a comparison on the corrected head.
  • Standalone native NVIDIA GetCachedBlob size on the rebased head with its default window settings. Cold PSO creation time and dispatch time on that head also remain unmeasured.

AI use

OpenAI Codex (GPT-6) wrote the implementation and tests, ran the offline measurements, and drafted this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5500698443 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-25T23:04:50Z. --- Part of #1096. On native Windows D3D12 (RTX 5070 Ti), `80e3aaf5` fixes a deterministic readback mismatch on one seeded cascade compute program from title: ea3b5e4d. Two consecutive eight-word scalar loads provided descriptors for different image stores. On the earlier head, a later use of the first returned descriptor index selected the second texture. The loads had valid addresses and all 128 lanes reached the instrumented block. Separate caller storage for the first wide call alone reproduced the failure. Writing every result word through the output parameter restored both textures. | Cascade run | Words changed from input | Full-readback differences vs main | Expected texels matched | | --- | ---: | ---: | ---: | | Main | 2,048 | 0 | 256/256 | | Earlier four-site implementation | 1,024 | 1,024 | 256/256 | | Corrected translator | 2,048 | 0 | 256/256 | | Repeated main control | 2,048 | 0 | 256/256 | A source-only GPU regression loads four different image descriptors through the same helper and checks every texel of all four output textures. The inline run passed before the fix, while the outlined run left the first texture untouched. Both pass after the fix. All three scalar-load tests passed on `80e3aaf5`. In the direct DXIL compute translator, each scalar load repeats its memory-window address calculation, window guard and load. On NVIDIA with `XCL_DXIL_OUTLINE=1`, the translator emits one internal `noinline` function for each addressing form and width used at four or more emitted load sites. Less frequent shapes stay inline. The default remains inline. Enabling outlining on NVIDIA bypasses the translated compute shader cache for A/B measurements. Graphics stages retain their usual cache behavior. **What is in it** - Commit `d051d271` enables scalar-load outlining only for NVIDIA (PCI vendor ID `0x10de`). In a title, XCL uses the adapter on which it created the device, including any fallback. The offline shader tool uses its selected DXGI adapter. On AMD, Intel, WARP or an unidentified adapter, requesting outlining logs the reason once, keeps scalar loads inline and preserves the normal compute cache. - Both forms use the existing lowering for signed offsets, carry across a 4 GiB window and per-word buffer bounds. Each helper returns void and writes every word into caller-local storage. The caller loads the results immediately after the call. - The direct bitcode writer retains nested helper definitions and their module globals. Feature scans follow calls through reachable blocks for FMad, double extensions, instruction types and resource flags. Dispatch pieces recreate the return storage locally. **Measured bound DXIL** The offline workload was the 802 compute programs bound in a capture of title: ea3b5e4d. Both forms translated 802/802 with four guarded heap windows and split wave64 on wave32. For a split program the totals include its bound pieces once each. Instruction totals include helper bodies. | Minimum sites per form and width | Bound DXIL bytes | DXIL instructions | Programs split | Programs larger than inline | Total growth among those programs | | --- | ---: | ---: | ---: | ---: | ---: | | Inline | 251,069,680 | 31,926,579 | 220 | — | — | | 1 | 211,625,876 | 27,180,567 | 217 | 205 | 179,160 B | | 3 | 211,533,168 | 27,167,079 | 219 | 66 | 119,232 B | | 4 sites, earlier return convention | 211,534,620 | 27,169,353 | 219 | 21 | 102,564 B | | **4 sites, corrected output convention** | **213,902,552** | **27,465,783** | **219** | **36** | **90,144 B** | With the corrected output convention, four sites saved **37,167,128 bound DXIL bytes (14.8%)** and **4,460,796 instructions (14.0%)** against inline. All 802 programs translated. The count excludes reloads reused from earlier instructions and counts shared compact-block bodies once. The inline baseline used `6d12f58a`; only the README changed between it and PR base `e1d84b7d`. The earlier one-, three- and four-site rows show the original threshold experiment. Moving from three to four sites in that experiment cost 1,452 bytes across the set and avoided growth on 45 programs. The corrected row uses the production changes committed in `80e3aaf5`. **Tested** On native Windows with the RTX 5070 Ti, the full library suite at `3c0fc4b9` reported **1,316 passed, 0 failed and 27 ignored**. Fourteen named tests reported explicit skips. The view-end and descriptor-preservation GPU fixtures, DXIL validation and the strict vendor regression all passed without a skip. On `3c0fc4b9`, the strict-mode regression exercises both `XCL_REQUIRE_GPU=wave64` and `mesh` with simulated vendor IDs. In both modes a known AMD adapter is excluded, NVIDIA proceeds, and missing vendor discovery still raises a required-GPU failure. The Windows DXIL core tests with no matching adapter reported 25 passed, 0 failed and 1 ignored, with 8 tests reporting explicit skips. The Windows CPU-only library suite on the rebased head `89e1a91d` reported **1,043 passed, 0 failed, 23 ignored and 276 filtered out**. Of the reported passes, 212 tests explicitly skipped. On native Windows with the RTX 5070 Ti, the full workspace suite on `89e1a91d` reported **1,441 passed, 0 failed and 47 ignored** with four test threads, direct DXIL and outlining enabled. 15 named tests emitted explicit skips within these totals. On `d051d271`, the Windows CPU-only library run below reported **1,033 passed, 0 failed, 22 ignored and 275 filtered out**. Of the reported passes, 211 tests printed an explicit skip. The vendor regression accepts NVIDIA and rejects AMD, Intel, Microsoft software and an unidentified vendor. Requesting outlining with no matching adapter emitted one inline-fallback diagnostic during the run. Windows x64, Ryzen 9 9950X, Rust 1.99.0, DXC 1.9. On `4b80fb51`, both direct DXIL and outlining were enabled, and `XCL_ADAPTER=no-such-adapter` selected the CPU-only run. The libtest result was 1031 passed, 0 failed, 22 ignored and 275 filtered out. Of the reported passes, 210 tests emitted an explicit skip. The filters exclude tests that create a D3D device directly. ```text cargo test -p xcl --lib -- --test-threads=4 --skip hle::d3d12x --skip gpu::texture --skip hle::mfplat --skip gpu_arena_partial_commit_probe --skip probe_standard_swizzle_support ``` `outlined_scalar_loads_validate` translated, validated and disassembled an outlined shader with one root window, four root windows and four guarded heap windows. Regression tests distinguish three versus four emitted sites per shape, cover duplicate reloads, and validate nested helpers with a groupshared global and feature-bearing instructions. Dead-block calls are excluded from those checks. On Windows D3D12 with an RTX 5070 Ti, `39c25eba` with direct DXIL and outlining enabled reported **51 passed, 0 failed, 3 ignored** across the wave64, split, dispatch-chain and scalar-load filters. Three reported passes explicitly skipped for lack of native wave64. The four-site view-end fixture matched the expected words on wave32 and split wave64. **GPU correctness on Wine/vkd3d-proton** On the NVIDIA-gated head `d051d271`, the vendor-policy test passed on the RTX 2060. With DXVK 3.1.1 configured to report the physical NVIDIA vendor ID (`dxgi.hideNvidiaGpu = False`), all three scalar-load tests passed with zero explicit skips. The default DXVK configuration reported an AMD vendor ID, so the runtime selected inline loads. On the RTX 2060, the full library suite on corrected head `80e3aaf5` reported **1,295 passed, 8 failed, 26 ignored**. The fresh main baseline (`e1d84b7d`) reported **1,289 passed, 9 failed, 26 ignored**. All eight failures on the PR also occurred on main, including one intermittent sparse-memory test. Both builds emitted the same explicit skip messages across 14 tests. The new four-texture descriptor test, the view-end output test and DXIL validation all passed on the corrected head. This comparison used clean Windows GNU release builds, NVIDIA 595.91, WineHQ wine-staging 11.21, vkd3d-proton `30b0eb9`, DXC 1.9.2609, both direct DXIL and outlining switches enabled, and four test threads. On an RTX 2060 (NVIDIA 595.91) with Wine 11.21, vkd3d-proton `30b0eb9`, DXC 1.9.2609 and Windows GNU release builds, main `e1d84b7d` and `39c25eba` each reported **49 passed, 0 failed, 3 ignored** for the wave64, split and dispatch-chain filters. Both switches were set on both runs. Main ignores `XCL_DXIL_OUTLINE`. Both pass counts include the same three explicit native-wave64 skips. On `39c25eba`, the two PR-specific scalar-load tests passed. The four-site view-end fixture matched inline output on wave32 and split wave64, and the DXIL validation test passed. This adapter cannot exercise the native-wave64 subcase. Main has neither test. On the previous head `3cf12a52`, DXC validated all six affected modules, but vkd3d-proton rejected the outlined wave32 view-end shader because its private output parameter lacked `noalias`. The cross-half test also failed on that head. Both failures cleared after the parameter attribute was added. A fresh full-library comparison on WineHQ wine-staging 11.21, vkd3d-proton `30b0eb9`, DXVK 3.1.1 DXGI and the same RTX 2060 used both switches on both builds. `39c25eba` reported **1,294 passed, 8 failed, 26 ignored**. Main `e1d84b7d` reported **1,289 passed, 9 failed, 26 ignored**. Both produced the same 28 explicit skip messages across 14 tests. Seven failures occurred on both heads. Two sparse-memory tests failed only on main in the parallel run and passed three times each in isolation on both heads. The PR-only mesh-cache test failed three times in isolation. The same failure reproduced on Windows. Compute outlining had bypassed the mesh shader cache even though it only changes compute translation. Commit `4b80fb51` scopes the bypass to compute. The original mesh-cache test and the stage-specific cache-policy regression both pass on Windows with both switches enabled. The full Wine rerun on `4b80fb51` reported **1,295 passed, 7 failed, 26 ignored**. The mesh-cache test passed. All seven failures also occurred on main, which reported **1,289 passed, 9 failed, 26 ignored** under the same settings. The two additional main failures were the sparse-memory tests described above. The final head and main produced the same 28 explicit skip messages across 14 tests. **Tested by others** - veyn-sudo measured 926 compute records common to all builds on an RTX 2070 SUPER 8 GB (driver 617.14). The offline comparison was cumulative. Against a 328.3 MB baseline, #2576 alone brought cached driver code to 308.1 MB (−6.2%). Enabling #2567 outlining at `3c0fc4b9` then brought it to **256.6 MB (−21.8% cumulative)**, an additional 15.6 percentage points of the baseline. DXIL fell from 220.8 to 179.4 MB at that step. Enabling #2427 flat windows last brought driver code to 253.6 MB (−22.7% cumulative). The earlier title runs used only #2576 and #2567 of these three changes, with flat windows off. Bound graphics and compute code totaled 323–353 MB versus 381–410 MB across local baseline configurations. Two baseline runs saw device removal around 196 s. Both outlined runs ended without removal (RAM guard at 207 s and a full 331 s). [Offline step measurements](https://github.com/xcl-dev/xcl/issues/2403#issuecomment-7191174254) · [Title runs](https://github.com/xcl-dev/xcl/issues/2403#issuecomment-7189887455) On `3c0fc4b`, upipibi tested an RTX 3070 8 GB (driver 616.56) with `XCL_DIRECT_DXIL=1` and `XCL_DXIL_OUTLINE=1`. The view-end comparison, descriptor-preservation check and strict vendor regression each passed three out of three runs with zero skips. The library suite reported 1,307 passed, 0 failed and 27 ignored, with 25 explicit skip notices. They excluded `hle::xaudio2` because it also hangs on main on their machine. [upipibi’s RTX 3070 report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7187136280) On the same head and with both switches enabled, thehollowedone ran all four `outlined_scalar_loads` tests on an RTX 3080 Ti (driver 621.35). All four passed with zero skips. The full workspace reported 1,442 passed, 0 failed and 47 ignored across 37 targets, with 25 explicit GPU skip notices. Both reports cover correctness tests only. Neither contributor ran a retail title or measured performance. [thehollowedone’s RTX 3080 Ti report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7187147160) Thank you to upipibi for testing `89e1a91` on Windows 11 with an RTX 3070 (driver 616.56). The library suite, excluding `hle::xaudio2` on both heads, reported 1,305 passes and one failure on the first PR run, 1,306 passes and zero failures on the second, and 1,300 passes and zero failures on base `b49be18`. Each run had 27 ignored tests. The flake occurred in main’s `cpu_writes::tests::writes_land_after_the_queue`, in a file this PR leaves unchanged. The assertion printed `[7, 9]` on both sides. Upipibi suggested that waiting only for the first word could explain the result. With `XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1`, the validation and view-end equivalence tests both passed in all three runs, with zero skips. [upipibi’s RTX 3070 report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7183095340) Thank you to pvfreis for the first native NVIDIA size measurement on Ampere for this PR. On Windows 11 with an RTX 3060 (driver 617.14), they tested `89e1a91d` in tree `2ec6aec4`, built on main `b49be183` with #2427 (`c8c2b7a6`), #2428 (`970823e4`) and #2496 (`78bba5ca`). They toggled only `XCL_DXIL_OUTLINE` in the same build. Both arms used flat heap windows, no-carry addressing, one pipeline per record and disabled translation caches. Across 60 preselected compute records (30 largest and 30 sampled), enabling outlining reduced total `GetCachedBlob` size from **34.755 to 32.875 MB (5.4%)**. Of the 60 records, 47 shrank, five stayed the same and eight grew. DXIL fell from 26.739 to 24.631 MB (7.9%). Both validators accepted all 120 containers, and all 60 pipelines built in each arm. With dispatch chains enabled on the same 60 records, outlining reduced cached driver code from **41.129 to 39.203 MB (4.7%)**. The size runs omitted the suite, output checks, build and dispatch timing, and title runs. [pvfreis’s Ampere measurements](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7181947618) Thank you to bielfreedom for isolating the native Windows failure on an RX 9070 XT (driver 32.0.32029.2010). They tested `39c25eb` and `80e3aaf` on 26 large compute programs. With outlining enabled, 0 pipelines built and 60 were refused, reproduced in both runs. With outlining disabled, all 76 built. An isolated 8,744-byte outlined shader failed at `CreateComputePipelineState`. In the full run, the other 59 refusals occurred during root-signature creation. Device loss was suspected and remains unconfirmed. Across 2,689 compute programs, offline DXIL fell from 885.9 to 646.7 MB (27.0%). The pipeline failures motivated the NVIDIA vendor gate. [bielfreedom’s AMD report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7180280674) Thank you to bielfreedom for retesting the vendor gate on the same RX 9070 XT at `89e1a91` on main `b49be18`. With `XCL_DXIL_OUTLINE=1`, XCL logged the fallback once and kept scalar loads inline. All 2,689 compute programs produced byte-identical DXIL with the switch on and off (885.9 MB in each case). Across the 26 large programs, **76 of 76 pipelines built with zero refusals in both switch-on runs**. Both interleaved switch-off controls also built all 76. [bielfreedom’s AMD rerun](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7181461991) Thanks to DavidM1911 for running the library suite on Windows 11 with an RTX 3060 Ti after merging the branch into their current main. They reported 0 failures and 26 ignored. The exact head, pass count and outlining setting were unreported. [DavidM1911’s test report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7177405644) Thanks to KDenKC for the RTX 5090 measurements, the call-site threshold experiment and the helper-feature review. On Windows 11, driver 621.24 and head `3cf12a52`, their six-program sample went from 8.91 to 7.64 MiB of cached driver blobs (−14.3%) and from 51.6 to 41.0 seconds of cold compilation. One program grew 8.1% in native bytes. Across their separate 810-program offline set, DXIL shrank 16.0% overall, with 195 programs growing by a combined 127 KiB. Their three- and four-site screens reduced that count to 59 and 18. Thank you to KDenKC for extending the test to the full used compute set. On `d9b261e9`, one commit before the four-site threshold in `39c25eba`, KDenKC ran a cold precompile with isolated caches over approximately 810 compute programs used by title: ea3b5e4d. Enabling scalar-load outlining reduced cached native driver blobs from **311.31 to 274.95 MiB** (36.36 MiB, 11.7%) and precompile wall time from **339.2 to 317.4 seconds** (6.4%). Pipeline count fell from 2,585 to 2,278, with zero refusals in both runs. The cache recorded builds over 250 ms, leaving roughly 30–40 small pipelines per arm outside the byte totals. Both GPU tests passed on that head. These native results cover the earlier return convention. [KDenKC’s measurements and review](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7178037582) Thanks to SlopTart for the first AMD run. They tested a clean local merge of the then-current PR head (`d9b261e9`) onto their current `origin/main` on a Radeon RX 7900 XT, Arch Linux 7.2.15, Mesa RADV 26.2.5, Wine 11.0 and XCL-patched vkd3d-proton 3.1, using a Windows GNU build. The cold-cache `gpu_` suite reported **165 passed, 3 failed, no crashes**. SlopTart identified all three as existing baseline failures: the seed-1003 fuzz case, MAD/MAC contraction and promoted UAV clear (#2490). The exact merge SHA and the setting of `XCL_DXIL_OUTLINE` were unreported, so coverage of the opt-in path remains unconfirmed on AMD. The run did not include a retail title. [SlopTart’s test report](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7177910758) **Regression run** Both 120-second runs used native Windows D3D12 with direct DXIL and outlining enabled. ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 2384 (PresentX 2384) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 16721 MB ``` ``` xcl-smoke v1 commit: 3c0fc4b96a6b3706d8bac16492760bef6bb5ff12 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 3094 (PresentX 3094) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15855 MB ``` **Not tested** - Native Windows comparison across all six programs on this exact PR head. The seeded cascade now matches main over the full readback. The other five programs await a comparison on the corrected head. - Standalone native NVIDIA `GetCachedBlob` size on the rebased head with its default window settings. Cold PSO creation time and dispatch time on that head also remain unmeasured. **AI use** OpenAI Codex (GPT-6) wrote the implementation and tests, ran the offline measurements, and drafted this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-26 00:05:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T23:19:19Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7177405644 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7177405644). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T23:19:19Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
SlopTart commented 2026-11-26 00:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T23:41:19Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV.
No new test names; the new scalar-load sharing path is covered by the existing suite, which is green on this lane apart from the baseline three.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7177910758 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7177910758). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T23:41:19Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV. No new test names; the new scalar-load sharing path is covered by the existing suite, which is green on this lane apart from the baseline three. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
KDenKC commented 2026-11-26 00:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-25T23:46:44Z.


@Kalmarv the native numbers you asked for, from an RTX 5090, and a threshold that removes most of the shaders outlining makes bigger.

Tested 3cf12a52 (sections 1–3) and d9b261e9 (section 4) on Windows 11, RTX 5090 32 GB (driver 621.24), DXC 1.9.2602.17, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1.

1. Native driver code (GetCachedBlob), 6 retail-title compute programs, cold isolated caches, XCL_DXIL_OUTLINE unset vs 1. The two GPU tests (outlined_scalar_loads_validate, outlined_scalar_loads_match_inline_at_view_end) pass.

program form inline outlined native
73fb752d7f62c3a5 wave64 split, whole 2,232 KiB 1,801 KiB −19.3 %
062468c09af883b9 wave64 split, whole 2,021 KiB 1,589 KiB −21.3 %
95cc13288a27a96e 32×1×1 1,403 KiB 1,303 KiB −7.1 %
fb1c6d2d04361754 + d28941bb8378ebc5 split chains 2,978 KiB (24 pieces) 2,595 KiB (20 pieces) −12.8 %
8994bb33444988e6 medium, few loads 492 KiB 531 KiB +8.1 % (DXIL −5.1 %)
total 8.91 MiB (28 PSOs) 7.64 MiB (24) −14.3 %

So on this driver the native code shrinks with the DXIL (−12.5 % DXIL here), which is consistent with the driver keeping the helpers out of line. The cold compile time of the six fell from 51.6 to 41.0 s. The one that grew has few scalar-load sites, so the call and return-slot overhead outweighs the shared body.

2. Offline, the 810 compute programs the title used (whole and pieces all pass IDxcValidator). Bound DXIL (pieces counted where split):

mode bound DXIL split pieces programs that grew
inline 256.77 MiB 2,000 –
XCL_DXIL_OUTLINE=1 as in this PR 215.76 MiB (−16.0 %) 1,692 195 (24 %), +127 KiB total
outline a (buffer, count) form only at ≥ 3 sites 215.66 MiB (−16.0 %) 1,692 59, +75 KiB
outline only at ≥ 4 sites 215.68 MiB (−16.0 %) 1,692 18, +70 KiB

Suggestion: a per-form call-site threshold (≥ 3 or ≥ 4 emitted sites, reload hits not counted) keeps all of the −16 % and all 308 fewer pieces, and removes 70–91 % of the programs that grow.

3. Two things to know if helpers get richer (checked by two of us against 3cf12a52; not defects for today's leaf scalar-load helpers):

  • finish_helper (module.rs:662-671) doesn't carry a helper's globals back and drops nested helpers; write_bitcode (module.rs:909-914) scans helper instructions once, including unreachable blocks, rather than following calls between helpers.
  • uses_fmad (shader.rs:619-631), uses_double_extensions and insts_use_type (module.rs:1510-1534) look only at the entry function, so an FMad or a wide type used only inside a helper would be missed.
  • Since internal noinline functions were reported to fail on AMD RDNA3/4 in #1901, the switch staying opt-in (or NVIDIA-only if it ever becomes a default) matters.

4. Added: native A/B over the full used set (the ~810 compute programs the title used, 1,188 pipelines; cold isolated caches; --precompile --only cs --used-only --pipelines), on the current head d9b261e9 (GPU tests 2/2 pass):

arm precompile wall pipelines (refused) split pieces native GetCachedBlob ≥ 1 MiB blobs
inline 339.2 s 2,585 (0) 2,000 311.31 MiB 6
XCL_DXIL_OUTLINE=1 (this PR) 317.4 s (−6.4 %) 2,278 (0) 1,692 274.95 MiB (−11.7 %) 3
+ typed-buffer format helpers outlined (our prototype on top) 300.6 s (−11.4 %) 2,177 (0) 1,590 261.55 MiB (−16.0 %) 2

So on this driver the PR saves 36 MiB of native code over the whole used set, about 7 % of NVIDIA's 512 MiB code heap (#2403), and 308 split pieces. Outlining the format decode/encode helpers the same way saves another 13 MiB; if that's of interest, we can offer it as a follow-up on top of this PR, keeping your XCL_DXIL_OUTLINE=1 meaning unchanged. (The driver-blob cache keeps only builds over 250 ms, so ~30–40 tiny pipelines per arm are left out of the totals, equally in each arm.)

Not tested: AMD, runtime cost of the calls.

As ever, your loyal testing minion and their 5090 await the next head.

AI use: Antigravity CLI (Gemini 4 Neon) ran the GPU tests, the native and offline measurements and the threshold sweep; Codex (GPT-6.1-Sol) cross-checked the two review points; Claude Code (Claude Opus 5.5) reviewed the results and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7178037582 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7178037582). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-25T23:46:44Z. --- @Kalmarv the native numbers you asked for, from an RTX 5090, and a threshold that removes most of the shaders outlining makes bigger. **Tested** `3cf12a52` (sections 1–3) and `d9b261e9` (section 4) on Windows 11, RTX 5090 32 GB (driver 621.24), DXC 1.9.2602.17, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`. **1. Native driver code (`GetCachedBlob`), 6 retail-title compute programs, cold isolated caches, `XCL_DXIL_OUTLINE` unset vs `1`.** The two GPU tests (`outlined_scalar_loads_validate`, `outlined_scalar_loads_match_inline_at_view_end`) pass. | program | form | inline | outlined | native | |---|---|---:|---:|---:| | `73fb752d7f62c3a5` | wave64 split, whole | 2,232 KiB | 1,801 KiB | −19.3 % | | `062468c09af883b9` | wave64 split, whole | 2,021 KiB | 1,589 KiB | −21.3 % | | `95cc13288a27a96e` | 32×1×1 | 1,403 KiB | 1,303 KiB | −7.1 % | | `fb1c6d2d04361754` + `d28941bb8378ebc5` | split chains | 2,978 KiB (24 pieces) | 2,595 KiB (20 pieces) | −12.8 % | | `8994bb33444988e6` | medium, few loads | 492 KiB | 531 KiB | **+8.1 %** (DXIL −5.1 %) | | **total** | | **8.91 MiB** (28 PSOs) | **7.64 MiB** (24) | **−14.3 %** | So on this driver the native code shrinks with the DXIL (−12.5 % DXIL here), which is consistent with the driver keeping the helpers out of line. The cold compile time of the six fell from 51.6 to 41.0 s. The one that grew has few scalar-load sites, so the call and return-slot overhead outweighs the shared body. **2. Offline, the 810 compute programs the title used (whole and pieces all pass `IDxcValidator`).** Bound DXIL (pieces counted where split): | mode | bound DXIL | split pieces | programs that grew | |---|---:|---:|---:| | inline | 256.77 MiB | 2,000 | – | | `XCL_DXIL_OUTLINE=1` as in this PR | 215.76 MiB (−16.0 %) | 1,692 | **195 (24 %)**, +127 KiB total | | outline a `(buffer, count)` form only at ≥ 3 sites | 215.66 MiB (−16.0 %) | 1,692 | 59, +75 KiB | | outline only at ≥ 4 sites | 215.68 MiB (−16.0 %) | 1,692 | **18**, +70 KiB | **Suggestion:** a per-form call-site threshold (≥ 3 or ≥ 4 emitted sites, `reload` hits not counted) keeps all of the −16 % and all 308 fewer pieces, and removes 70–91 % of the programs that grow. **3. Two things to know if helpers get richer** (checked by two of us against `3cf12a52`; not defects for today's leaf scalar-load helpers): - `finish_helper` (`module.rs:662-671`) doesn't carry a helper's globals back and drops nested helpers; `write_bitcode` (`module.rs:909-914`) scans helper instructions once, including unreachable blocks, rather than following calls between helpers. - `uses_fmad` (`shader.rs:619-631`), `uses_double_extensions` and `insts_use_type` (`module.rs:1510-1534`) look only at the entry function, so an `FMad` or a wide type used only inside a helper would be missed. - Since internal `noinline` functions were reported to fail on AMD RDNA3/4 in #1901, the switch staying opt-in (or NVIDIA-only if it ever becomes a default) matters. **4. Added: native A/B over the full used set** (the ~810 compute programs the title used, 1,188 pipelines; cold isolated caches; `--precompile --only cs --used-only --pipelines`), on the current head `d9b261e9` (GPU tests 2/2 pass): | arm | precompile wall | pipelines (refused) | split pieces | native `GetCachedBlob` | ≥ 1 MiB blobs | |---|---:|---:|---:|---:|---:| | inline | 339.2 s | 2,585 (0) | 2,000 | 311.31 MiB | 6 | | `XCL_DXIL_OUTLINE=1` (this PR) | 317.4 s (−6.4 %) | 2,278 (0) | 1,692 | **274.95 MiB (−11.7 %)** | 3 | | + typed-buffer format helpers outlined (our prototype on top) | 300.6 s (−11.4 %) | 2,177 (0) | 1,590 | **261.55 MiB (−16.0 %)** | 2 | So on this driver the PR saves 36 MiB of native code over the whole used set, about 7 % of NVIDIA's 512 MiB code heap (#2403), and 308 split pieces. Outlining the format decode/encode helpers the same way saves another 13 MiB; if that's of interest, we can offer it as a follow-up on top of this PR, keeping your `XCL_DXIL_OUTLINE=1` meaning unchanged. (The driver-blob cache keeps only builds over 250 ms, so ~30–40 tiny pipelines per arm are left out of the totals, equally in each arm.) **Not tested:** AMD, runtime cost of the calls. As ever, your loyal testing minion and their 5090 await the next head. AI use: Antigravity CLI (Gemini 4 Neon) ran the GPU tests, the native and offline measurements and the threshold sweep; Codex (GPT-6.1-Sol) cross-checked the two review points; Claude Code (Claude Opus 5.5) reviewed the results and wrote this.
DavidM1911 commented 2026-11-26 02:08:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:36:27Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179942386 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7179942386). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:36:27Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
bielfreedom commented 2026-11-26 02:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bielfreedom on 2026-11-26T01:55:13Z.


AMD Windows: on an RX 9070 XT, AMD's driver refuses the outlined form. With XCL_DXIL_OUTLINE=1 no compute pipeline of 26 large retail programs is built (0 made, 60 refused, 2 of 2 runs at 39c25eb and 2 of 2 at 80e3aaf). Without the switch all 76 are built. The DXIL itself is 27 % smaller over all 2,689 programs, so the size gain is real, but on AMD it does not reach the driver.

Setup

  • GPU: RX 9070 XT 16 GB (RDNA4, native wave64), AMD driver 32.0.32029.2010.
  • CPU and memory: Ryzen 7 7700 (16 threads), 32 GB RAM, Windows 11, release.
  • Builds: this PR merged onto main 08db802, first at 39c25eb and again at the current head 80e3aaf. Both carry a local timing patch in xcl shaders that writes each program's DXIL size and each CreateComputePipelineState time and result to a file. One binary per head for both arms; only the switch differs.
  • Offline: xcl shaders <retail shaders.rpf> --precompile --only cs --pipelines with XCL_DIRECT_DXIL=1, switch windows, XCL_PSO_DISK_CACHE=0, one driver thread, a fresh translation cache and a fresh executable name for every run.

DXIL size, all 2,689 compute programs (translation only, 80e3aaf)

switch off XCL_DXIL_OUTLINE=1
total direct DXIL 885.9 MB (same bytes as main) 646.7 MB (−27.0 %)
programs changed 2,227

Driver, 26 large programs

head arm pipelines made / refused driver time
39c25eb off 76 / 0 77.6 / 83.8 s
39c25eb outline 0 / 60 process ends in under 2 s
80e3aaf off 76 / 0 85.8 / 83.9 s
80e3aaf outline 0 / 60 process ends in under 2 s

Narrowing it down (80e3aaf, outline on)

  • 326bb2122a5c2c4e alone (9,188 B plain, 8,744 B outlined): CreateComputePipelineState fails in 6 ms, 0 made, 1 refused.
  • aa89214561445ea5 alone, which outlining leaves unchanged (6,492 B): built.
  • Both in one run: the unchanged one is built, the outlined one fails.
  • In the 26-program run only the first pipeline reaches CreateComputePipelineState and fails. The other 59 are refused earlier, at root signature creation, including programs outlining did not change. That looks like the device is lost after the first refusal. I did not read GetDeviceRemovedReason or run the debug layer, so that part is unconfirmed.

So on AMD every outlined program that reached the driver failed, a 9 KB one included, and one failure may take the rest of the pass with it. Since the driver numbers above come from an RTX 5090, I'd keep the switch off on AMD, or gate it on the adapter, until the cause is known.

Not tested: heap windows, GPU output, and a title run.

AI use: Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this report; I posted it.

<!-- greyfinch-sync:ivall/xcl:comment:7180280674 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7180280674). Originally posted by [bielfreedom](https://github.com/bielfreedom) on 2026-11-26T01:55:13Z. --- **AMD Windows: on an RX 9070 XT, AMD's driver refuses the outlined form. With `XCL_DXIL_OUTLINE=1` no compute pipeline of 26 large retail programs is built (0 made, 60 refused, 2 of 2 runs at `39c25eb` and 2 of 2 at `80e3aaf`). Without the switch all 76 are built.** The DXIL itself is 27 % smaller over all 2,689 programs, so the size gain is real, but on AMD it does not reach the driver. **Setup** - GPU: RX 9070 XT 16 GB (RDNA4, native wave64), AMD driver 32.0.32029.2010. - CPU and memory: Ryzen 7 7700 (16 threads), 32 GB RAM, Windows 11, release. - Builds: this PR merged onto `main` `08db802`, first at `39c25eb` and again at the current head `80e3aaf`. Both carry a local timing patch in `xcl shaders` that writes each program's DXIL size and each `CreateComputePipelineState` time and result to a file. One binary per head for both arms; only the switch differs. - Offline: `xcl shaders <retail shaders.rpf> --precompile --only cs --pipelines` with `XCL_DIRECT_DXIL=1`, switch windows, `XCL_PSO_DISK_CACHE=0`, one driver thread, a fresh translation cache and a fresh executable name for every run. **DXIL size, all 2,689 compute programs (translation only, `80e3aaf`)** | | switch off | `XCL_DXIL_OUTLINE=1` | |---|---:|---:| | total direct DXIL | 885.9 MB (same bytes as `main`) | 646.7 MB (−27.0 %) | | programs changed | | 2,227 | **Driver, 26 large programs** | head | arm | pipelines made / refused | driver time | |---|---|---:|---:| | `39c25eb` | off | 76 / 0 | 77.6 / 83.8 s | | `39c25eb` | outline | 0 / 60 | process ends in under 2 s | | `80e3aaf` | off | 76 / 0 | 85.8 / 83.9 s | | `80e3aaf` | outline | 0 / 60 | process ends in under 2 s | **Narrowing it down (`80e3aaf`, outline on)** - `326bb2122a5c2c4e` alone (9,188 B plain, 8,744 B outlined): `CreateComputePipelineState` fails in 6 ms, 0 made, 1 refused. - `aa89214561445ea5` alone, which outlining leaves unchanged (6,492 B): built. - Both in one run: the unchanged one is built, the outlined one fails. - In the 26-program run only the first pipeline reaches `CreateComputePipelineState` and fails. The other 59 are refused earlier, at root signature creation, including programs outlining did not change. That looks like the device is lost after the first refusal. I did not read `GetDeviceRemovedReason` or run the debug layer, so that part is unconfirmed. So on AMD every outlined program that reached the driver failed, a 9 KB one included, and one failure may take the rest of the pass with it. Since the driver numbers above come from an RTX 5090, I'd keep the switch off on AMD, or gate it on the adapter, until the cause is known. **Not tested:** heap windows, GPU output, and a title run. **AI use:** Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this report; I posted it.
bielfreedom commented 2026-11-26 04:07:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bielfreedom on 2026-11-26T03:10:28Z.


@Kalmarv the AMD rerun you asked for, with the vendor gate: at 89e1a91 on the RX 9070 XT, XCL_DXIL_OUTLINE=1 falls back to inline loads, and all 26 large programs build again: 76 of 76 pipelines, none refused, 2 of 2 runs.

  • xcl shaders prints XCL_DXIL_OUTLINE=1 requires an NVIDIA adapter. Using inline scalar loads. once.
  • DXIL, all 2,689 compute programs: the switch on gives the same bytes as the switch off, program for program (885.9 MB, as on main).
  • Driver, the same 26 programs, 4 interleaved runs:
arm pipelines made / refused DXIL to driver driver time r1 / r2 peak memory
switch on 76 / 0 9.63 MB 109.7 / 108.2 s 1.51 / 1.47 GB
switch off 76 / 0 9.63 MB 107.9 / 109.6 s 1.47 GB

The times are higher than in my first report because the machine was busier this time; the two arms match.

Setup: as in my comment above. This PR is merged onto main b49be18. Only my local timing patch is added: it writes each CreateComputePipelineState time and result to a file. Fresh translation cache and fresh exe name per run.

AI use: Claude Code (Claude Opus 5.5) built the binary, ran the measurements and wrote this; I posted it.

<!-- greyfinch-sync:ivall/xcl:comment:7181461991 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7181461991). Originally posted by [bielfreedom](https://github.com/bielfreedom) on 2026-11-26T03:10:28Z. --- @Kalmarv the AMD rerun you asked for, with the vendor gate: **at `89e1a91` on the RX 9070 XT, `XCL_DXIL_OUTLINE=1` falls back to inline loads, and all 26 large programs build again: 76 of 76 pipelines, none refused, 2 of 2 runs.** - `xcl shaders` prints `XCL_DXIL_OUTLINE=1 requires an NVIDIA adapter. Using inline scalar loads.` once. - **DXIL, all 2,689 compute programs:** the switch on gives the same bytes as the switch off, program for program (885.9 MB, as on `main`). - **Driver, the same 26 programs, 4 interleaved runs:** | arm | pipelines made / refused | DXIL to driver | driver time r1 / r2 | peak memory | |---|---:|---:|---:|---:| | switch on | 76 / 0 | 9.63 MB | 109.7 / 108.2 s | 1.51 / 1.47 GB | | switch off | 76 / 0 | 9.63 MB | 107.9 / 109.6 s | 1.47 GB | The times are higher than in my first report because the machine was busier this time; the two arms match. **Setup:** as in my comment above. This PR is merged onto `main` `b49be18`. Only my local timing patch is added: it writes each `CreateComputePipelineState` time and result to a file. Fresh translation cache and fresh exe name per run. **AI use:** Claude Code (Claude Opus 5.5) built the binary, ran the measurements and wrote this; I posted it.
pvfreis commented 2026-11-26 04:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-26T03:42:03Z.


Test report for 89e1a91d, stacked on flat heap + no-carry: NVIDIA driver code size (GetCachedBlob) on Ampere.

Tested

  • RTX 3060 (617.14), Ryzen 9 5900XT, Windows 11. Sandbox: non-interactive session, Low integrity, debug, --test-threads=4, NVIDIA 32-lane waves only. One run per setting.
  • Tree 2ec6aec4: main b49be183 + #2427 c8c2b7a6 + #2428 970823e4 + #2496 78bba5ca + this PR 89e1a91d. #2428 has since been pushed to c6e5af86; not rerun on it (its new commit doesn't change compute translation). Three conflicts, both sides kept: kernel.rs (#2496 against main's doc line; this PR's outline argument next to #2496's with_no_carry), real.rs (this PR's vendor id next to #2428's set_adapter_vendor).
  • Command: cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4 with only the size test enabled.
  • Size only: our size test (not in this PR) translates 60 compute records of one retail title (30 largest, 30 sampled, chosen beforehand), builds each with CreateComputePipelineState and sums GetCachedBlob sizes. Settings: XCL_DIRECT_DXIL=1, XCL_DIRECT_SPLIT_INSTRUCTIONS=0 (one pipeline per record), XCL_WINDOW_NO_CARRY=1, flat heap windows (0x304), translated caches off. Under this PR is flat heap + no-carry (#2427/#2428 + #2496). The arm is XCL_DXIL_OUTLINE unset vs 1 in the same build, so the delta is this PR's alone.
    • driver code: 34.755 MB → 32.875 MB (−5.4 %); 47 records smaller, 5 the same, 8 larger; per record 0.903–1.054
    • DXIL: 26.739 → 24.631 MB (−7.9 %); per record 0.895–1.055
    • helpers emitted in 55 of 60 records (the other 5 are the 5 unchanged); all 120 containers pass both validators; every pipeline built (60/60 per arm)
  • Dispatch chains on (XCL_DIRECT_SPLIT_INSTRUCTIONS unset, so the default split at 12,500 instructions; the same 60 records, tree and other settings; 37 records are split in both arms, and every piece is built and its blob counted):
    • driver code: 41.129 MB → 39.203 MB (−4.7 %); 46 records smaller, 5 the same, 9 larger; per record 0.903–1.048
    • DXIL: 34.425 → 31.691 MB (−7.9 %)
    • pieces: 359 → 306; every piece built (359/359 and 306/306)
  • The baseline reproduces: the same 60 at flat heap + no-carry (chains off) gave 34.76 MB on main e1d84b7d (our report on #2496).
  • Not paired with KDenKC's −11.7 % (5090, guarded heap, d9b261e9, the full used set): different GPU, head, set and window form.

Not tested: the suite, this PR's GPU tests, or any output check with the switch on (nothing here says outlined code is correct, alone or on flat heap + no-carry); timing (build or dispatch); a title run; graphics; other GPUs.

AI use: Claude Code. Claude Opus 5.5 wrote the size test, ran it and wrote this; Claude Fable 5.2 rechecked it.

<!-- greyfinch-sync:ivall/xcl:comment:7181947618 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7181947618). Originally posted by [pvfreis](https://github.com/pvfreis) on 2026-11-26T03:42:03Z. --- Test report for `89e1a91d`, stacked on flat heap + no-carry: NVIDIA driver code size (`GetCachedBlob`) on Ampere. **Tested** - RTX 3060 (617.14), Ryzen 9 5900XT, Windows 11. Sandbox: non-interactive session, Low integrity, debug, `--test-threads=4`, NVIDIA 32-lane waves only. One run per setting. - Tree `2ec6aec4`: `main` `b49be183` + #2427 `c8c2b7a6` + #2428 `970823e4` + #2496 `78bba5ca` + this PR `89e1a91d`. #2428 has since been pushed to `c6e5af86`; not rerun on it (its new commit doesn't change compute translation). Three conflicts, both sides kept: `kernel.rs` (#2496 against `main`'s doc line; this PR's `outline` argument next to #2496's `with_no_carry`), `real.rs` (this PR's vendor id next to #2428's `set_adapter_vendor`). - Command: `cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4` with only the size test enabled. - **Size only:** our size test (not in this PR) translates 60 compute records of one retail title (30 largest, 30 sampled, chosen beforehand), builds each with `CreateComputePipelineState` and sums `GetCachedBlob` sizes. Settings: `XCL_DIRECT_DXIL=1`, `XCL_DIRECT_SPLIT_INSTRUCTIONS=0` (one pipeline per record), `XCL_WINDOW_NO_CARRY=1`, flat heap windows (`0x304`), translated caches off. Under this PR is flat heap + no-carry (#2427/#2428 + #2496). The arm is `XCL_DXIL_OUTLINE` unset vs `1` in the same build, so the delta is this PR's alone. - driver code: 34.755 MB → **32.875 MB (−5.4 %)**; 47 records smaller, 5 the same, 8 larger; per record 0.903–1.054 - DXIL: 26.739 → 24.631 MB (−7.9 %); per record 0.895–1.055 - helpers emitted in 55 of 60 records (the other 5 are the 5 unchanged); all 120 containers pass both validators; every pipeline built (60/60 per arm) - **Dispatch chains on** (`XCL_DIRECT_SPLIT_INSTRUCTIONS` unset, so the default split at 12,500 instructions; the same 60 records, tree and other settings; 37 records are split in both arms, and every piece is built and its blob counted): - driver code: 41.129 MB → **39.203 MB (−4.7 %)**; 46 records smaller, 5 the same, 9 larger; per record 0.903–1.048 - DXIL: 34.425 → 31.691 MB (−7.9 %) - pieces: 359 → 306; every piece built (359/359 and 306/306) - The baseline reproduces: the same 60 at flat heap + no-carry (chains off) gave 34.76 MB on `main` `e1d84b7d` (our report on #2496). - Not paired with KDenKC's −11.7 % (5090, guarded heap, `d9b261e9`, the full used set): different GPU, head, set and window form. **Not tested:** the suite, this PR's GPU tests, or any output check with the switch on (nothing here says outlined code is correct, alone or on flat heap + no-carry); timing (build or dispatch); a title run; graphics; other GPUs. **AI use:** Claude Code. Claude Opus 5.5 wrote the size test, ran it and wrote this; Claude Fable 5.2 rechecked it.
upipibi commented 2026-11-26 05:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T05:00:29Z.


NVIDIA test report for 89e1a91: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (the hle::xaudio2 tests hang on this machine, on main too)
  • this PR, run 1: 1305 passed, 1 failed, 27 ignored. The failure is hle::d3d12x::cpu_writes::tests::writes_land_after_the_queue (left: [7, 9], right: [7, 9] at cpu_writes.rs:218). This is the known race in that test (#546): it waits only for the first dword before comparing both. The open #1347 makes it wait for the last store. (Edited: the first version explained it without pointing to #546 / #1347.) This PR does not touch that file.
  • this PR, run 2: 1306 passed, 0 failed, 27 ignored. Base b49be18: 1300 passed, 0 failed, 27 ignored. Both have the same 25 SKIPPED lines (21 "no wave64", 3 f16/f32 per-lane forms refused for #1426 semantics, 1 PSO measurement needing Developer Mode). The 6 extra passes are this PR's new tests.
  • XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1, outlined_scalar_loads_validate and outlined_scalar_loads_match_inline_at_view_end 3 times with --test-threads=1 --nocapture: 2 passed, 0 failed each run, no SKIPPED line.

Lib tests only; no title run.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7183095340 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7183095340). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T05:00:29Z. --- NVIDIA test report for `89e1a91`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (the `hle::xaudio2` tests hang on this machine, on `main` too) - this PR, run 1: 1305 passed, 1 failed, 27 ignored. The failure is `hle::d3d12x::cpu_writes::tests::writes_land_after_the_queue` (`left: [7, 9]`, `right: [7, 9]` at cpu_writes.rs:218). This is the known race in that test (#546): it waits only for the first dword before comparing both. The open #1347 makes it wait for the last store. (Edited: the first version explained it without pointing to #546 / #1347.) This PR does not touch that file. - this PR, run 2: 1306 passed, 0 failed, 27 ignored. Base `b49be18`: 1300 passed, 0 failed, 27 ignored. Both have the same 25 SKIPPED lines (21 "no wave64", 3 f16/f32 per-lane forms refused for #1426 semantics, 1 PSO measurement needing Developer Mode). The 6 extra passes are this PR's new tests. - `XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1`, `outlined_scalar_loads_validate` and `outlined_scalar_loads_match_inline_at_view_end` 3 times with `--test-threads=1 --nocapture`: 2 passed, 0 failed each run, no SKIPPED line. Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
luckyteagirl commented 2026-11-26 06:37:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:37:43Z.

Review: COMMENTED


Both new GPU fixtures call runner::skip_test("scalar-load outlining requires an NVIDIA adapter") before checking wave support. On a healthy AMD wave64 adapter, that intentional vendor exclusion becomes a panic when the suite uses XCL_REQUIRE_GPU=wave64 (or mesh): skip_test() fails on every reason except the specifically exempted missing feature. This would make a strict AMD suite fail two tests even though NVIDIA-only outlining is not coverage AMD can provide. Could the explicit non-NVIDIA vendor case report non-applicability without using the required-GPU skip path, while preserving the normal strict failure when adapter discovery itself fails? A small test of the exclusion under both strict modes would catch it.

Exact-head source review of 89e1a91d348967997afefdea2eb29f71a254c057; I did not run this head on the RX 6800M. AI-assisted review with Codex.

<!-- greyfinch-sync:ivall/xcl:review:6069579935 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#pullrequestreview-6069579935). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T06:37:43Z. **Review:** COMMENTED --- Both new GPU fixtures call `runner::skip_test("scalar-load outlining requires an NVIDIA adapter")` before checking wave support. On a healthy AMD wave64 adapter, that intentional vendor exclusion becomes a panic when the suite uses `XCL_REQUIRE_GPU=wave64` (or `mesh`): `skip_test()` fails on every reason except the specifically exempted missing feature. This would make a strict AMD suite fail two tests even though NVIDIA-only outlining is not coverage AMD can provide. Could the explicit non-NVIDIA vendor case report non-applicability without using the required-GPU skip path, while preserving the normal strict failure when adapter discovery itself fails? A small test of the exclusion under both strict modes would catch it. Exact-head source review of `89e1a91d348967997afefdea2eb29f71a254c057`; I did not run this head on the RX 6800M. AI-assisted review with Codex.
Kalmarv commented 2026-11-26 07:03:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-26T06:44:16Z.


Thanks @luckyteagirl for catching the strict-lane failure. Commit 3c0fc4b9 changes both GPU fixtures to report a known non-NVIDIA adapter as inapplicable and return. If adapter discovery fails, they still call runner::skip_test, so strict GPU coverage still fails. The regression passed for both wave64 and mesh using simulated AMD, NVIDIA and missing-vendor cases. The Windows CPU-only DXIL core run reported 25 passed, 0 failed and 1 ignored, including 8 explicit skips.

AI use: OpenAI Codex (GPT-6) implemented and tested the change and drafted this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7184730913 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7184730913). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-26T06:44:16Z. --- Thanks @luckyteagirl for catching the strict-lane failure. Commit `3c0fc4b9` changes both GPU fixtures to report a known non-NVIDIA adapter as inapplicable and return. If adapter discovery fails, they still call `runner::skip_test`, so strict GPU coverage still fails. The regression passed for both `wave64` and `mesh` using simulated AMD, NVIDIA and missing-vendor cases. The Windows CPU-only DXIL core run reported 25 passed, 0 failed and 1 ignored, including 8 explicit skips. AI use: OpenAI Codex (GPT-6) implemented and tested the change and drafted this reply.
upipibi commented 2026-11-26 09:07:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T08:52:58Z.


NVIDIA test report for 3c0fc4b (asked in #1607): RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug, stock tree at this head.

  • XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1, --exact --test-threads=1 --nocapture, 3 separate runs each:
    • outlined_scalar_loads_match_inline_at_view_end: 3 passed, 0 failed
    • outlined_scalar_loads_preserve_distinct_image_descriptors: 3 passed, 0 failed
    • outlined_scalar_loads_strict_vendor_exclusion: 3 passed, 0 failed
  • No run printed a SKIPPED line. Every early return before the GPU work prints one (the non-NVIDIA return and runner::skip_test), so both fixtures took the NVIDIA path. Each loaded DXC (1.8.2502.11) and took about 4.4 s; the strict test took 0.02 s. The tests print no adapter name; the RTX 3070 is this machine's only hardware adapter.
  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4: 1307 passed, 0 failed, 27 ignored (the hle::xaudio2 tests hang on this machine, on main too). That is 1 more than on 89e1a91: the new strict test. 25 SKIPPED lines, all environmental and as on 89e1a91 and main b49be18: 21 no wave64, 3 per-lane f16/f32 forms refused, 1 PSO measurement needing Developer Mode. None are in this PR's tests.

Lib tests only; no title run.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7187136280 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7187136280). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T08:52:58Z. --- NVIDIA test report for `3c0fc4b` (asked in #1607): RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug, stock tree at this head. - `XCL_DIRECT_DXIL=1 XCL_DXIL_OUTLINE=1`, `--exact --test-threads=1 --nocapture`, 3 separate runs each: - `outlined_scalar_loads_match_inline_at_view_end`: 3 passed, 0 failed - `outlined_scalar_loads_preserve_distinct_image_descriptors`: 3 passed, 0 failed - `outlined_scalar_loads_strict_vendor_exclusion`: 3 passed, 0 failed - No run printed a `SKIPPED` line. Every early return before the GPU work prints one (the non-NVIDIA return and `runner::skip_test`), so both fixtures took the NVIDIA path. Each loaded DXC (1.8.2502.11) and took about 4.4 s; the strict test took 0.02 s. The tests print no adapter name; the RTX 3070 is this machine's only hardware adapter. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4`: 1307 passed, 0 failed, 27 ignored (the `hle::xaudio2` tests hang on this machine, on `main` too). That is 1 more than on `89e1a91`: the new strict test. 25 SKIPPED lines, all environmental and as on `89e1a91` and `main` `b49be18`: 21 no wave64, 3 per-lane f16/f32 forms refused, 1 PSO measurement needing Developer Mode. None are in this PR's tests. Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
Kalmarv commented 2026-11-26 09:07:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-26T08:58:17Z.


Thanks @upipibi for repeating both GPU fixtures and the strict vendor regression three times on the RTX 3070, and @thehollowedone for running all four outlining tests and the full workspace on the RTX 3080 Ti. Both reports are now credited under Tested by others for 3c0fc4b.

AI use: OpenAI Codex (GPT-6) summarized the reports and drafted this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7187247261 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7187247261). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-26T08:58:17Z. --- Thanks @upipibi for repeating both GPU fixtures and the strict vendor regression three times on the RTX 3070, and @thehollowedone for running all four outlining tests and the full workspace on the RTX 3080 Ti. Both reports are now credited under **Tested by others** for `3c0fc4b`. AI use: OpenAI Codex (GPT-6) summarized the reports and drafted this reply.
thehollowedone commented 2026-11-26 09:07:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T08:53:28Z.


Independent Windows/NVIDIA check of PR #2567 head 3c0fc4b, based on main b49be18. Clean exact-head checkout; RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11. XCL_DIRECT_DXIL=1 and XCL_DXIL_OUTLINE=1; DXIL cache isolated under this checkout's target directory.

Tested

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib outlined_scalar_loads -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, 0 skips. The view-end and four-descriptor fixtures ran on this NVIDIA GPU and compared inline with outlined output; DXIL validation and the strict vendor regression also passed.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet: 1,442 passed, 0 failed, 47 ignored across 37 test targets, with 25 explicit GPU skip notices. Those skips are not counted as GPU coverage.

Not tested: a retail title, cold compile or driver-blob size, AMD hardware, and paired smoke runs. This confirms the synthetic correctness checks on Ampere at the current head; it does not measure runtime performance or visual parity in a title.

AI-assisted: Codex (GPT-6.2 Sol) ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7187147160 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7187147160). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-26T08:53:28Z. --- Independent Windows/NVIDIA check of [PR #2567 head `3c0fc4b`](https://github.com/xcl-dev/xcl/commit/3c0fc4b96a6b3706d8bac16492760bef6bb5ff12), based on [main `b49be18`](https://github.com/xcl-dev/xcl/commit/b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Clean exact-head checkout; RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11. `XCL_DIRECT_DXIL=1` and `XCL_DXIL_OUTLINE=1`; DXIL cache isolated under this checkout's `target` directory. **Tested** - `cargo build --offline --locked --workspace`: passed. - `cargo test --offline --locked -p xcl --lib outlined_scalar_loads -- --nocapture --test-threads=1`: **4 passed, 0 failed, 0 ignored, 0 skips**. The view-end and four-descriptor fixtures ran on this NVIDIA GPU and compared inline with outlined output; DXIL validation and the strict vendor regression also passed. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet`: **1,442 passed, 0 failed, 47 ignored** across 37 test targets, with **25 explicit GPU skip notices**. Those skips are not counted as GPU coverage. **Not tested:** a retail title, cold compile or driver-blob size, AMD hardware, and paired smoke runs. This confirms the synthetic correctness checks on Ampere at the current head; it does not measure runtime performance or visual parity in a title. AI-assisted: Codex (GPT-6.2 Sol) ran the tests and drafted this report.
jennydeth commented 2026-11-26 16:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-26T15:25:12Z.


Windows / NVIDIA results for 3c0fc4b with the retail title (1.0.2.1) on an RTX 3060 12 GB, including two runs with XCL_DXIL_OUTLINE=1.

Regression run (default settings, 600 s)

main b49be18:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 2047 (PresentX 2047)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 35859 MB

This PR, 3c0fc4b:

xcl-smoke v1
commit: 3c0fc4b96a6b3706d8bac16492760bef6bb5ff12
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 2155 (PresentX 2155)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 34947 MB
  • This PR has 2,155 frames against main's 2,047 (105 %) and peak commit of 34,947 MB against 35,859 MB (97 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on main and at 106.4 s with this PR, while big compute programs are still compiling.
  • Direct DXIL (XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches, 900 s): the device was lost (0x887a0005, #2403) at 204.6 s, last present at 202.6 s, with the same DRED line as on main (page fault at GPU VA 0x0; allocations there: []; recently freed: []). Three b49be18 runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from main there.
  • With XCL_DXIL_OUTLINE=1 (same switches as the direct DXIL run, 900 s, two runs in a row): no device removal, exit 0x0, 2,064 and 2,193 frames. But presents stopped at 102.6 and 110.1 s, as in a default run, and did not come back.
    • With the translated compute cache bypassed, 56 and 61 driver compiles had no driver blob (8 in the run without outlining). 53 and 58 took ≥ 1 s (6 without). The longest took 89.9 s in the first run and 16.4 s in the second.
    • So the title spent those runs compiling and never reached the point where the other direct DXIL runs lose the device. These two runs don't show whether outlining has any effect on the removal, and I can't separate the outlined code from the cold cache in the compile times.
    • On NVIDIA nothing is logged when outlining is on, so the only sign it took effect is the cache bypass above.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5.
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4 on 3c0fc4b: 1442 passed, 0 failed, 47 ignored. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / d3d12SDKLayers.dll; 1 × no heap windows; 1 × pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache).
  • Retail title 1.0.2.1, scripts/smoke.ps1 -Game <folder> (XCL_NETWORK=0), the same scripted pad presses into the story load in every run; XCL_FRAME_DUMP=300 in the pair, 100 in the direct DXIL runs. Every run was of a copy named xcl-noprofile.exe: this machine has #2590's 1 GiB shader-heap profile on xcl.exe, and a copy under another name does not match it.

Not tested: an outlined run with a warm driver cache that reaches the removal point; per-program instruction counts; AMD / wave64 (the vendor check keeps it inline there).

AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7196240406 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7196240406). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-26T15:25:12Z. --- Windows / NVIDIA results for `3c0fc4b` with the retail title (1.0.2.1) on an RTX 3060 12 GB, including two runs with `XCL_DXIL_OUTLINE=1`. **Regression run** (default settings, 600 s) `main` `b49be18`: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 2047 (PresentX 2047) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 35859 MB ``` This PR, `3c0fc4b`: ``` xcl-smoke v1 commit: 3c0fc4b96a6b3706d8bac16492760bef6bb5ff12 gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 2155 (PresentX 2155) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 34947 MB ``` - This PR has 2,155 frames against `main`'s 2,047 (105 %) and peak commit of 34,947 MB against 35,859 MB (97 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on `main` and at 106.4 s with this PR, while big compute programs are still compiling. - **Direct DXIL** (`XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1`, warm caches, 900 s): the device was lost (`0x887a0005`, #2403) at 204.6 s, last present at 202.6 s, with the same DRED line as on `main` (`page fault at GPU VA 0x0; allocations there: []; recently freed: []`). Three `b49be18` runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from `main` there. - **With `XCL_DXIL_OUTLINE=1`** (same switches as the direct DXIL run, 900 s, two runs in a row): no device removal, exit `0x0`, 2,064 and 2,193 frames. But presents stopped at 102.6 and 110.1 s, as in a default run, and did not come back. - With the translated compute cache bypassed, 56 and 61 driver compiles had no driver blob (8 in the run without outlining). 53 and 58 took ≥ 1 s (6 without). The longest took 89.9 s in the first run and 16.4 s in the second. - So the title spent those runs compiling and never reached the point where the other direct DXIL runs lose the device. These two runs don't show whether outlining has any effect on the removal, and I can't separate the outlined code from the cold cache in the compile times. - On NVIDIA nothing is logged when outlining is on, so the only sign it took effect is the cache bypass above. **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`); release; DXC 1.9.2609.5. - `cargo test --workspace --release --no-fail-fast -- --test-threads=4` on `3c0fc4b`: **1442 passed, 0 failed, 47 ignored**. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / `d3d12SDKLayers.dll`; 1 × no heap windows; 1 × `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache). - Retail title 1.0.2.1, `scripts/smoke.ps1 -Game <folder>` (`XCL_NETWORK=0`), the same scripted pad presses into the story load in every run; `XCL_FRAME_DUMP=300` in the pair, `100` in the direct DXIL runs. Every run was of a copy named `xcl-noprofile.exe`: this machine has #2590's 1 GiB shader-heap profile on `xcl.exe`, and a copy under another name does not match it. **Not tested:** an outlined run with a warm driver cache that reaches the removal point; per-program instruction counts; AMD / wave64 (the vendor check keeps it inline there). AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.
throny commented 2026-11-27 15:38:12 +00:00 (Migrated from github.com)

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


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):

this PR conflicts with main and needs a rebase; both checks were green before.

AI use: Claude Code (Claude Fable 5.2).

<!-- greyfinch-sync:ivall/xcl:comment:7222298671 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7222298671). Originally posted by [throny](https://github.com/throny) on 2026-11-27T15:38:12Z. --- 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): this PR conflicts with `main` and needs a rebase; both checks were green before. AI use: Claude Code (Claude Fable 5.2).
ettehn commented 2026-11-27 16:31:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-27T16:31:16Z.


On native Windows x64 with an RTX 5070 Ti Laptop (12 GB), I measured cold driver PSO creation for compute record b2e94d24ea47e5cc from a retail title. My local build includes this PR at 3c0fc4b9 on top of a compute-splitting branch. Both settings used the same binary, input, root signature, XCL_DIRECT_DXIL=1, and eight memory windows. The measurement tool used the runtime translation path. Each sample used a fresh process and an empty XCL cache, with both implicit D3D12 driver caches disabled.

Run order Inline XCL_DXIL_OUTLINE=1
Inline first 35.738 s 14.051 s
Outlined first 37.297 s 15.187 s

DXIL size fell from 800,488 to 638,872 bytes. Four focused outlining tests passed on this machine, including synthetic GPU readbacks. Output equivalence for this individual retail shader is still unverified. These timings measure one driver pipeline build.

AI-assisted (OpenAI Codex).

<!-- greyfinch-sync:ivall/xcl:comment:7223356992 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7223356992). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-27T16:31:16Z. --- On native Windows x64 with an RTX 5070 Ti Laptop (12 GB), I measured cold driver PSO creation for compute record `b2e94d24ea47e5cc` from a retail title. My local build includes this PR at `3c0fc4b9` on top of a compute-splitting branch. Both settings used the same binary, input, root signature, `XCL_DIRECT_DXIL=1`, and eight memory windows. The measurement tool used the runtime translation path. Each sample used a fresh process and an empty XCL cache, with both implicit D3D12 driver caches disabled. | Run order | Inline | `XCL_DXIL_OUTLINE=1` | | --- | ---: | ---: | | Inline first | 35.738 s | 14.051 s | | Outlined first | 37.297 s | 15.187 s | DXIL size fell from 800,488 to 638,872 bytes. Four focused outlining tests passed on this machine, including synthetic GPU readbacks. Output equivalence for this individual retail shader is still unverified. These timings measure one driver pipeline build. AI-assisted (OpenAI Codex).
Foniass commented 2026-12-01 06:10:43 +00:00 (Migrated from github.com)

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


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

  • Not superseded (main has no outlining), but the rebase is substantial. Main's scalar-load lowering (lower_mem.rs ~1220-1292) now uses scalar_flat_read, rodata_loads (reads self.rodata, writes VAR_WIN), flat_read_high and Module::flat_reads (644b5188, b5973e3e, 41f1a85a). call_scalar_load saves only s.m, ssa, mems and uma_base_val, and declarations() resets other module fields (..Self::new()), so that state would point at the helper's instructions or be dropped unless handled. Outlining also has to go into ComputePolicyKey (pso.rs ~49), since the compute build key isn't keyed on the DXIL.
  • The 14.8 % DXIL and driver-size savings were measured before those commits, and outlining probably undoes 644b5188's cross-load sharing, so the numbers need redoing on main.
  • 687 lines with several changes: module internal-function support plus feature scans, split-piece support, then the outlining with its vendor gate and cache policy; worth splitting along those lines.
  • AI use names Codex (GPT-6) while the footer says Claude Code, and the description cites commits not on the branch (80e3aaf5, d051d271). Minor: core_tests.rs ~899 prints its own SKIPPED instead of runner::skip_test, and the README doesn't say outlining bypasses the compute translation cache.

Fine: opt-in and NVIDIA-only (after AMD refused the pipelines), every result word goes through a noalias output parameter, the optimizer can't merge the reloads (opt.rs ~101), feature scans follow calls, dispatch pieces rebuild the slot, and the four-descriptor GPU test. #1901 does the same on the HLSL path (related, not a duplicate).

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

<!-- greyfinch-sync:ivall/xcl:comment:7302576815 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7302576815). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:10:43Z. --- Review (head 3c0fc4b9, diff read, not a merge-check; it conflicts with main, so not built or run): - **Not superseded** (main has no outlining), **but the rebase is substantial.** Main's scalar-load lowering (`lower_mem.rs` ~1220-1292) now uses `scalar_flat_read`, `rodata_loads` (reads `self.rodata`, writes `VAR_WIN`), `flat_read_high` and `Module::flat_reads` (644b5188, b5973e3e, 41f1a85a). `call_scalar_load` saves only `s.m`, `ssa`, `mems` and `uma_base_val`, and `declarations()` resets other module fields (`..Self::new()`), so that state would point at the helper's instructions or be dropped unless handled. Outlining also has to go into `ComputePolicyKey` (`pso.rs` ~49), since the compute build key isn't keyed on the DXIL. - The 14.8 % DXIL and driver-size savings were measured before those commits, and outlining probably undoes 644b5188's cross-load sharing, so the numbers need redoing on main. - 687 lines with several changes: module internal-function support plus feature scans, split-piece support, then the outlining with its vendor gate and cache policy; worth splitting along those lines. - AI use names Codex (GPT-6) while the footer says Claude Code, and the description cites commits not on the branch (80e3aaf5, d051d271). Minor: `core_tests.rs` ~899 prints its own SKIPPED instead of `runner::skip_test`, and the README doesn't say outlining bypasses the compute translation cache. Fine: opt-in and NVIDIA-only (after AMD refused the pipelines), every result word goes through a `noalias` output parameter, the optimizer can't merge the reloads (`opt.rs` ~101), feature scans follow calls, dispatch pieces rebuild the slot, and the four-descriptor GPU test. #1901 does the same on the HLSL path (related, not a duplicate). AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Kalmarv commented 2026-12-02 19:37:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T19:37:52Z.


Closing: superseded by #3654 on #3655's HelperBody and main's rewritten scalar-load lowering.

<!-- greyfinch-sync:ivall/xcl:comment:7356477771 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2567#issuecomment-7356477771). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-12-02T19:37:52Z. --- Closing: superseded by #3654 on #3655's `HelperBody` and `main`'s rewritten scalar-load lowering.

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