Repository navigation
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Tested: current PR head merged onto current
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. |
|
@Kalmarv the native numbers you asked for, from an RTX 5090, and a threshold that removes most of the shaders outlining makes bigger. Tested 1. Native driver code (
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
Suggestion: a per-form call-site threshold (≥ 3 or ≥ 4 emitted sites, 3. Two things to know if helpers get richer (checked by two of us against
4. Added: native A/B over the full used set (the ~810 compute programs the title used, 1,188 pipelines; cold isolated caches;
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 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. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
AMD Windows: on an RX 9070 XT, AMD's driver refuses the outlined form. With Setup
DXIL size, all 2,689 compute programs (translation only,
Driver, 26 large programs
Narrowing it down (
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. |
Emit an internal function for each scalar load shape when XCL_DXIL_OUTLINE=1. Reuse the carry-aware window calculation and the existing per-word bounds. Copy helper definitions and rebuild wide return storage for dispatch pieces.
Wide outlined loads write through one pointer into caller-owned storage. Record that guarantee on the seventh parameter so DXIL-to-SPIR-V translation can pass it in the logical addressing model.
Count lowered sites per scalar-load form and width, excluding available reloads and counting compact representatives once. Four sites retain the size reduction while substantially reducing the programs that grow. Use reachable helper instructions for feature detection and symbol use. Keep globals and nested helper definitions when transferring the completed body. Validate a shader whose only wide arithmetic and FMad occur in a nested helper.
d051d27 to
89e1a91
Compare
|
@Kalmarv the AMD rerun you asked for, with the vendor gate: at
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 AI use: Claude Code (Claude Opus 5.5) built the binary, ran the measurements and wrote this; I posted it. |
|
Test report for Tested
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. |
|
NVIDIA test report for
Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5). |
Part of #1096.
On native Windows D3D12 (RTX 5070 Ti),
80e3aaf5fixes 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.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 internalnoinlinefunction 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
d051d271enables scalar-load outlining only for NVIDIA (PCI vendor ID0x10de). 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.
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 basee1d84b7d. 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 in80e3aaf5.Tested
The Windows CPU-only library suite on the rebased head
89e1a91dreported 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
89e1a91dreported 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, andXCL_ADAPTER=no-such-adapterselected 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.outlined_scalar_loads_validatetranslated, 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,
39c25ebawith 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
80e3aaf5reported 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, maine1d84b7dand39c25ebaeach reported 49 passed, 0 failed, 3 ignored for the wave64, split and dispatch-chain filters. Both switches were set on both runs. Main ignoresXCL_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 lackednoalias. 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.39c25ebareported 1,294 passed, 8 failed, 26 ignored. Maine1d84b7dreported 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
4b80fb51scopes 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 on4b80fb51reported 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
Thank you to upipibi for testing
89e1a91on Windows 11 with an RTX 3070 (driver 616.56). The library suite, excludinghle::xaudio2on 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 baseb49be18. Each run had 27 ignored tests. The flake occurred in main’scpu_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. WithXCL_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 reportThank 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
89e1a91din tree2ec6aec4, built on mainb49be183with #2427 (c8c2b7a6), #2428 (970823e4) and #2496 (78bba5ca). They toggled onlyXCL_DXIL_OUTLINEin 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
GetCachedBlobsize 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 measurementsThank you to bielfreedom for isolating the native Windows failure on an RX 9070 XT (driver 32.0.32029.2010). They tested
39c25eband80e3aafon 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 atCreateComputePipelineState. 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 reportThank you to bielfreedom for retesting the vendor gate on the same RX 9070 XT at
89e1a91on mainb49be18. WithXCL_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 rerunThanks 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 in39c25eba, 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 reviewThanks to SlopTart for the first AMD run. They tested a clean local merge of the then-current PR head (
d9b261e9) onto their currentorigin/mainon 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-cachegpu_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 ofXCL_DXIL_OUTLINEwere unreported, so coverage of the opt-in path remains unconfirmed on AMD. The run did not include a retail title. SlopTart’s test reportRegression run
Both runs used native Windows D3D12 with direct DXIL and the outlining switch enabled. Main was
b49be183and the rebased PR was89e1a91d.Not tested
GetCachedBlobsize 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