Skip to content

Shaders: DXC compiles sources over 8 MB one at a time - #1660

Open
itsd-effex wants to merge 4 commits into
xcl-dev:mainfrom
itsd-effex:dxc-enormous-one-at-a-time
Open

itsd-effex wants to merge 4 commits into
xcl-dev:mainfrom
itsd-effex:dxc-enormous-one-at-a-time

Conversation

@itsd-effex

@itsd-effex itsd-effex commented Nov 24, 2026 •

Copy link
Copy Markdown

A handful of translated programs in a retail pack are over 8 MB of HLSL, the size at which dxc.rs already switches to -O0. Each one takes several GB in DXC. When several of them compile at once, their memory adds up. The admission check that should hold them back (wait_for_memory) reads the commit headroom (ullAvailPageFile). Under Wine that figure includes all of the host's swap, so the check lets them all through. This PR compiles sources over 8 MB one at a time. Every other compile is unchanged.

Related: #1321 makes the largest of these programs (ActivateRays, 148 MB of HLSL since b8b1f49) small again. This PR is about several big ones at once, so the two are complementary. #1417 fixes a race in the same admission check. It is a different bug. #1710 retries a compile that DXC fails with E_OUTOFMEMORY, which complements this one (it reacts, this one prevents). Under Wine, DXC rarely sees E_OUTOFMEMORY, because the host swaps first. Issue #1657 reports the symptom from xcl shaders --precompile.

What is in it

  • 17285b3, crates/xcl/src/gpu/recomp/dxc.rs: ENORMOUS_SOURCE (8 MB, the existing -O0 threshold, now named) and a mutex that compile_here holds for sources over it.
  • 8d821a9 + 9c77995, the same file: the gate as a small guard type (EnormousTurn) and a test, enormous_sources_compile_one_at_a_time. Four threads compile sources through compile_here, and at most one may be inside at once. In test builds a marker comment makes a source count as enormous, so no 8 MB shader is needed. 9c77995 fixes a build error in 8d821a9: non-test builds referenced the test module. Thanks to @Aniseto, whose Windows run (comment) pointed out that the PR had no test of its own.
  • c4a169e, the same file: the turn is taken in compile(), on the caller's thread, before the job goes to the DXC pool. Before, a queued enormous compile held a DXC worker and a wait_for_memory slot while it waited, and went into DXC without a new memory check once its turn came. Thanks to @MatyEjsr, whose review (comment) found it.

Tested

  • RTX 3080 Ti 12 GB, NVIDIA 620.73.04 (Linux), i7-11700KF, 32 GB RAM + 36 GB swap. CachyOS, Proton Experimental's Wine, vkd3d-proton master ec207194 + Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch. Rust cross-build for x86_64-pc-windows-msvc, release. DXC 1.9.2609.5.

  • Isolated measurement: retail 1.0.2.1, the title's own journal, and the three screen-probe programs only (ActivateProbes 56c0cd3b82a00c6e, ActivateProbesTarget 958400d2caf07244, ActivateRays 95cc13288a27a96e), all three in flight at once. xcl pipelines ran with 14 threads in a cgroup of 25 GB RAM + 32 GB swap, with an empty DXIL cache, stopped at 16 GB of swap. For the test only, the build had a local switch to make only these three pipelines; it is not part of this PR.

    without this PR with this PR
    RAM 25.6 GB (the cap) after 23 s 5–11 GB while the two probe programs compile, one after the other
    swap 20.8 GB after 48 s under 4.3 GB until ActivateRays starts
    DXIL made none ActivateProbesTarget (29.6 MB) at 109 s, ActivateProbes (29.75 MB) at 219 s
    then stopped at 141 s (swap) ActivateRays alone: 25.6 GB + 19 GB swap, stopped at 372 s

    ActivateRays doesn't fit in 25 GB on its own, so this PR can't help it; that is what Recompiler: oversized structured code falls back to pc blocks (#1307) #1321 is for. In a full xcl pipelines run of the same title on the same machine (main 9e3831e + Shaders: isolate DXC compiler heaps for parallel AOT #688 + Shaders: xcl pipelines compiles a run's queued pipelines outside the title #759 + XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684, without this PR), the three entered DXC together and the run used 29 GB of RAM and 20 GB of swap within about 2 minutes.

  • The new test on 9c77995 under Wine: passes; on c4a169e (through compile()), the gpu::recomp::dxc module: 15 passed, 0 failed. With the gate taken out (each compile taking a lock of its own), it fails with all 4 compiles inside at once. The whole gpu::recomp::dxc module: 15 passed, 0 failed. cargo build (release and debug) passes.

  • Windows, by reviewers (thanks):

    • @Aniseto (comment): the dxc module on 17285b3 and on the head with the test, Windows 11, RTX 5070 Ti, debug. All passed.
    • @nnonno91 (comment): the full suite on 9c77995, Windows 11, AMD Radeon: 777 passed, 0 failed, 41 ignored. Also a temporary probe of the real cutoff: four sources padded to 8,388,607–8,388,610 bytes, without the test marker. The two at or under 8 MiB compiled at -O1, and the two over it went through DXC one at a time at -O0 (peak one in flight). The GPU output matched on AMD and on an RTX 5090.
    • @MatyEjsr (comment): the full suite on 17285b3, Windows 11, RTX 3090, debug: 776 passed, 0 failed, 41 ignored, including the five tests that fail under Wine here; and a review of the gate's ordering, fixed in c4a169e.
    • @eizispark (comment): c4a169e merged with main 4178e88, Windows 11, AMD Radeon RX 9070 XT (native wave64), debug: 777 passed, 0 failed, 41 ignored, the new test included. scripts/smoke.ps1 against main: 1676 frames against 1669, peak commit 14,857 MB against 14,860 MB, no device removal, no crash.
    • @LocranKing (comment): the full suite on 17285b3, Windows 11, RTX 3060 Ti, release: 776 passed, 0 failed, 41 ignored. scripts/smoke.ps1 against main 9e3831e: 98.1 % of the frames, 103.4 % of the peak commit, no device removal, no crash.
  • wine-tests.sh on 17285b3 (each test binary under Wine, --test-threads=4; the recompiler's GPU tests in their own process): 771 passed, 5 failed, 41 ignored, the same counts as on main 9e3831e on this machine. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

    • The 5 failures are the same tests on main 9e3831e on this machine, so they come from the Wine setup and not from this change: disk_free_space_ex_reports_pls_quota, gpu_depth_buffer_created_for_unordered_access_is_placed, xma2_source_voice_decodes_and_manages_lifetime, set_predication_buffer_state_and_kickoff, test_title_runs_and_game_folder_is_untouched.
    • In the first run on this branch, offline_compute_pipeline_is_reused_by_a_second_process and shaders_single_file_reports_text_top_json_recomp_and_dxc_compile also failed, because the fresh worktree had no dxcompiler.dll next to xcl.exe yet (DXC reported 1 error). With the DLL in place, a rerun of both binaries passed: 4 of 4 each.

Regression run

Made with a bash port of scripts/smoke.ps1: the same environment variables, log patterns and block, run under Wine. It is not smoke.ps1 itself. Both runs are on the same title, for 60 s: main first, then this PR's head.

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 3080 Ti
title: XboxRetailGame
seconds: 60
exit: 0x0
frames shown: 1379 (PresentX 1379)
presents per 2 s (last 3): 60 59 60
device removals: 0
crashes: 0
peak commit: 0 MB
xcl-smoke v1
commit: c4a169e93361441b8c60c55a6d2196cf66a6d89d
gpu: NVIDIA GeForce RTX 3080 Ti
title: XboxRetailGame
seconds: 60
exit: 0x0
frames shown: 1440 (PresentX 1440)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

peak commit: 0 MB because XCL can't read process memory under Wine (#1097), so the peak-commit comparison is not covered.

Not tested

  • Windows: by reviewers only (above). The smoke blocks above are my Linux runs. @eizispark's Windows smoke.ps1 run is on the head, c4a169e; @LocranKing's was on 17285b3, the gate's first form.
  • The title's own runtime compiles of these programs (the preload, and a bind that waits), apart from the 60 s smoke runs. Those don't reach them.
  • Whether a smaller threshold, or a check on physical memory under Wine instead of commit, would be better. A physical-memory check would change every compile under Wine, so I left it out. It may be worth the maintainer's view.

AI use

  • Claude Code (Claude Opus 5.5) found the cause, wrote the change, ran the measurements, tests and smoke runs, and wrote this description.

A translated source over 8 MB of HLSL (the -O0 threshold; a handful of programs in a retail pack)
takes several GB in DXC. Several of them compiling at once stack that memory, and the admission
check (`wait_for_memory`) reads the commit headroom, which under Wine includes all of the host's
swap, so it lets them through: three such programs in `xcl pipelines` reached a 25 GB RAM cap in
23 s and 20.8 GB of swap in 48 s on a 32 GB machine, with none finished. One at a time, two of
them finished in 219 s with peak RAM at 11 GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Aniseto

Aniseto commented Nov 24, 2026 •

Copy link
Copy Markdown

Ran the whole dxc test module at 9c77995 (re-run after the head moved from 17285b3). The PR changes the compile path, so this is a regression check:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib dxc
19 passed; 0 failed; 2 ignored      (exit 0)

The cache, version and in-process DXC checks all pass (one more test than the previous head), so the change does not disturb the normal compile path here. What it cannot show is the case it is for: a source over 8 MB, which needs retail shaders; I have no game data.

Not tested: a >8 MB source actually serializing its compiles (no game data), RDNA2/RDNA4 and Intel GPUs, a release build.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the module, wrote this report; no local changes were made.

itsd-effex and others added 2 commits November 24, 2026 19:21
The gate is now a small guard type (`EnormousTurn`). In test builds it counts how many compiles hold
it at once, and a source with a marker comment counts as enormous, so the test needs no 8 MB shader.
Four threads compile marked sources through `compile_here`; at most one is ever inside. Without the
gate (a lock of its own per compile) the test sees all four inside at once and fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`EnormousTurn::wanted` named the test module in a `cfg!(test)` expression, which non-test builds
still compile: `cargo build` failed (E0433). The marker check is now a `#[cfg(test)]` block.
The test in the previous commit was added after a review asked for one.

Suggested-by: Aniseto
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@itsd-effex

Copy link
Copy Markdown
Author

The same isolated measurement with #1321 added: all three screen-probe programs now get through DXC on this 32 GB machine.

Same setup as in the description (three programs in flight at once, 14 threads, a cgroup of 25 GB RAM + 32 GB swap, empty DXIL cache). Tree: main 9e3831e + #688 + #759 + #684 + this PR (17285b3; later commits add a test only) + #1321 0936337, with the same local test switch.

RAM peak swap peak DXIL made
without this PR 25.6 GB (cap) in 23 s 20.8 GB in 48 s none
this PR 11 GB until ActivateRays, then 25.6 GB 19.1 GB ActivateProbesTarget, ActivateProbes
this PR + #1321 11.4 GB 5.7 GB all three: ActivateProbesTarget (29.6 MB) at 126 s, ActivateProbes (29.75 MB) at 244 s, ActivateRays (14.1 MB) at 306 s

The memory free on the host never fell below 15.9 GB in the last run.

Not tested: the driver stage of these three DXILs (the run stops once the third exists); the title's own compiles of them.

AI use

  • Claude Code (Claude Opus 5.5) ran the measurement and wrote this comment.

@nnonno91

Copy link
Copy Markdown

Native Windows test of 9c77995172bc53853545369db662826b057495f6. The full AMD suite passed. A synthetic probe exercised the real 8 MiB cutoff through XCL's DXC worker pool.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62) and NVIDIA GeForce RTX 5090 (32.0.16.1742), Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles. Adapters selected with XCL_ADAPTER.
  • On the unmodified head, cargo build --workspace --locked passed. On AMD, cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 777 passed, 0 failed, 41 ignored. This includes the existing enormous_sources_compile_one_at_a_time test. One pass logged an explicit skip, heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.
  • I temporarily added a test and counters around the gate and the DXC call in dxc.rs. With XCL_DXC_THREADS=4, cargo test --locked -p xcl --lib gpu::recomp::dxc::real_cutoff_probe::real_source_size_boundary_uses_dxc_worker_gate -- --exact --nocapture reported 1 passed, 0 failed, 0 ignored on each GPU, no skips. Four concurrent callers submitted compute shaders padded with comments to 8,388,607, 8,388,608, 8,388,609 and 8,388,610 bytes, without the test-marker comment.
  • With the gate held by the probe, both sources at or below 8 MiB completed at -O1. Both oversized jobs reached compile_here and waited before the DXC call. After release, both entered DXC at -O0, with a measured peak of one oversized call in flight in each run. Each of the four compiled shaders matched 128/128 GPU output words against the CPU calculation on both adapters. The temporary instrumentation was removed afterward.

Not tested

Retail shaders or title runs, peak memory and throughput on complex shaders, and the full suite on NVIDIA. The padding exercised the byte cutoff with a small shader body.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran and checked the tests, and wrote this report.

@LocranKing

Copy link
Copy Markdown

Independent Windows release verification on NVIDIA RTX 3060 Ti at commit 17285b327e5e93640f564ede019a15c9cec1185b (prior to test-only commit 8d821a9, compared against base main 9e3831e1f570d3646e53ab753b19ec07eb8f1485).

Setup

  • GPU: NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, wave32), driver 32.0.16.2101
  • CPU / RAM: AMD Ryzen 5 5500 (6C/12T), 31.8 GB RAM
  • OS: Windows 11 Home Single Language, build 26200
  • Toolchain: rustc 1.100.0, DXC 1.9.2602.17, --release

Workspace tests (cargo test --workspace --release --no-fail-fast -- --test-threads=4)

  • Exit 0: 776 passed, 0 failed, 41 ignored across 20 result blocks (SKIPPED: 2 no wave64, 2 no D3D12 debug layer, heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).

Regression run (scripts/smoke.ps1, 60 s, XCL_NETWORK=0, title folder name redacted)

  • PR head vs base main: 1537 / 1566 frames (98.1%), 15220 / 14715 MB peak commit (103.4%), 0 device removals, 0 crashes.

Base (main 9e3831e):

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14715 MB

PR head (17285b3):

xcl-smoke v1
commit: 17285b327e5e93640f564ede019a15c9cec1185b
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1537 (PresentX 1537)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15220 MB

Not tested: test commit 8d821a9, concurrent cold DXC compiles of >8 MB sources, AMD / wave64 hardware.

AI use: Antigravity (Gemini 4 Neon) built and ran the test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.

@MatyEjsr

Copy link
Copy Markdown

Independent native Windows 11 + NVIDIA GPU test run and code review at 17285b327e5e93640f564ede019a15c9cec1185b.

Tested

  • Environment: Windows 11 Pro for Workstations (Build 26200), AMD Ryzen 7 7800X3D, NVIDIA GeForce RTX 3090 (24322 MiB VRAM, driver 617.42), 31.4 GB RAM, rustc 1.100.0 MSVC (debug), DXC 1.9.2602.17 (21d28f72) / dxil 1.9.2602.17.
  • cargo build --workspace -j 8: succeeded in 10.24s (0 errors).
  • cargo test --workspace -j 8 -- --test-threads=8: 773 passed (excluding skips), 0 failed, 41 ignored, 3 SKIPPED across 20 test binaries (cargo raw summary: 776 ok, 0 failed, 41 ignored; lib unit tests finished in 13.91s).
    • SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
    • All five tests that failed under Wine in the PR description (disk_free_space_ex_reports_pls_quota, gpu_depth_buffer_created_for_unordered_access_is_placed, xma2_source_voice_decodes_and_manages_lifetime, set_predication_buffer_state_and_kickoff, test_title_runs_and_game_folder_is_untouched) passed on native Windows 11 + RTX 3090, as did offline_compute_pipeline_is_reused_by_a_second_process and shaders_single_file_reports_text_top_json_recomp_and_dxc_compile.
  • cargo test -p xcl --lib gpu::recomp::dxc:: -- --nocapture --test-threads=1: 14 passed, 0 failed, 0 ignored, 0 SKIPPED (0.54s).

Code review notes (crates/xcl/src/gpu/recomp/dxc.rs)

  • Drop ordering in compile_here is clean: IDxcBlob and IDxcResult drop inside the unsafe block before _enormous unlocks ENORMOUS_ONE_AT_A_TIME.
  • One concurrency subtlety: ENORMOUS_ONE_AT_A_TIME is acquired inside compile_here, which runs after pool() acquires let _slot = wait_for_memory(&job.wanted). When multiple >8 MB sources arrive concurrently:
    1. Each waiting enormous compile holds a MemorySlot (WORKING stays incremented while blocked on the mutex), inflating need in wait_for_memory (+1 GB per queued enormous job) and consuming WANTED_AT_ONCE slots while doing no work.
    2. Each waiting enormous compile ties up a xcl-dxc-* worker thread; with low XCL_DXC_THREADS or fewer cores, queued enormous compiles can block smaller compiles behind them.
    3. When the running enormous compile finishes, the next waiting one enters c.Compile immediately without re-evaluating wait_for_memory against current commit headroom.
      Acquiring ENORMOUS_ONE_AT_A_TIME before wait_for_memory (or in compile() around the pool round-trip, since pool() workers never call compile() recursively) avoids both holding MemorySlot while blocked and occupying extra DXC worker threads.
  • Consider adding a small unit test for the serialization helper/threshold so the gating logic is exercised in CI.

Not tested

  • AMD / native wave64 hardware, heap-window mode, Linux/Wine, release build, concurrent >8 MB HLSL peak-memory reproduction, or retail title smoke run.

AI use

  • agy with gemini-4-neon-high: checked out and built the PR, ran the full workspace test suite on native Windows 11 + RTX 3090, reviewed dxc.rs, and drafted this report.

anoyarou added a commit to anoyarou/xcl that referenced this pull request Nov 24, 2026
Serializes compilation of HLSL sources over 8 MB (ENORMOUS_SOURCE) in dxc.rs
so multiple enormous compute shaders (which take several GB of RAM each in DXC)
do not compile concurrently and exhaust host RAM and swap under Wine.

Assisted-by: Antigravity
A queued enormous compile took a DXC worker and a wait_for_memory slot
and then waited on the one-at-a-time lock while holding both; once its
turn came it went into DXC without checking memory again. compile() now
takes the turn on the caller's thread, before the job is sent to the pool.

Suggested-by: MatyEjsr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@itsd-effex

Copy link
Copy Markdown
Author

@MatyEjsr thanks for the run and the review. The ordering point is right: a queued enormous compile held a DXC worker and a wait_for_memory slot while it waited on the lock, and once its turn came it went into DXC without a new memory check.

Fixed in c4a169e: compile() now takes the turn on the caller's thread, before the job is sent to the pool, so a waiting enormous compile holds neither, and it is admitted against the memory left once the one before it has finished. compile_here keeps only the -O0 choice. The test (enormous_sources_compile_one_at_a_time, added in 8d821a9) now goes through compile().

Tested on c4a169e under Wine: the gpu::recomp::dxc module, 15 passed, 0 failed; cargo build --release passes.

AI use

  • Claude Code (Claude Opus 5.5) checked the review against the code, wrote the change and this reply.

@eizispark

Copy link
Copy Markdown

Hardware test report — commit c4a169e

Verified c4a169e93361441b8c60c55a6d2196cf66a6d89d (clean merge with main 4178e88): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, native wave32 + wave64, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64, rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 777 passed, 0 failed, 41 ignored (1 skipped: heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)
  • gpu::recomp::dxc::enormous_tests::enormous_sources_compile_one_at_a_time passed
  • All 5 tests that failed under Wine (disk_free_space_ex_reports_pls_quota, hle::d3d12x::device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed, hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime, set_predication_buffer_state_and_kickoff, test_title_runs_and_game_folder_is_untouched) and both native RDNA4 wave64 GPU tests (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, plus console_wave64_compute_through_the_pso_hook_dispatch_and_read_back) passed cleanly on native Windows 11

Regression run (scripts/smoke.ps1, 60 s, warm shader/driver cache)
main (85e38262ff94aecd75d6f83fa8156a8b7697bd13):

xcl-smoke v1
commit: 85e38262ff94aecd75d6f83fa8156a8b7697bd13
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1669 (PresentX 1669)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14860 MB

PR (c4a169e93361441b8c60c55a6d2196cf66a6d89d):

xcl-smoke v1
commit: c4a169e93361441b8c60c55a6d2196cf66a6d89d
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1676 (PresentX 1676)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14857 MB

Not tested

  • xcl pipelines pack compilation hitting > 8 MB HLSL sources concurrently, NVIDIA/Intel GPUs, gameplay past the menus

AI use

  • Verified and formatted with Antigravity (Google DeepMind, Gemini 4 Carbon).

@DavidM1911

Copy link
Copy Markdown
Contributor

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

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

Thanks!

@itsd-effex

Copy link
Copy Markdown
Author

Per #1833: the goal:world-load label seems to be missing here. This PR is part of #1269 (compile time and memory) through #1657, which reports the symptom from xcl shaders --precompile.

AI use

  • Claude Code (Claude Opus 5.5) wrote this comment.

@JJAutoCompare

Copy link
Copy Markdown

XCL PR #1660 verification

Clean detached head c4a169e93361441b8c60c55a6d2196cf66a6d89d. The diff changes only crates/xcl/src/gpu/recomp/dxc.rs. It serializes HLSL sources larger than 8 MiB before they enter the DXC worker pool or wait for a memory slot.

STOR-WINLAB, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Windows 11 Enterprise Evaluation x64 build 26200, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). dxc.exe --version and XCL's compiler log both reported 1.9.2609.5.

Tested

  • Outside the Arc lock, cargo build --workspace and cargo test --workspace --no-run exited 0. The latter built 19 test executables. Both used unoptimized profiles with debug info and incremental compilation disabled.
  • Outside the lock with XCL_ADAPTER=NONE_CPU_ONLY, cargo test -p xcl --lib gpu::recomp::dxc::enormous_tests::enormous_sources_compile_one_at_a_time -- --exact --nocapture had 1 passed, 0 failed, 0 ignored, and 0 skip markers. Four callers compiled distinct, small HLSL shaders marked to enter the large-source path. Each returned nonempty DXIL, peak gate occupancy was one, and final occupancy was zero.
  • Under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1, cargo test --workspace --no-fail-fast -- --test-threads=4 exited 101. Across 20 test result: lines (19 binaries and one doctest summary), the harness reported 761 passed, 16 failed, and 41 ignored. The PR test passed again.

Workspace failures and skips

  • XCL lib had 15 GPU recompiler failures. Eleven reported CreateComputePipelineState error 0x80070057. Four reported mismatches in FMA overflow, implicit-LOD sampling, f16 high-half preservation, or wave64 pixel reductions.
  • The e2e test title failed its RSSetDepthBiasX check (Split wave64: masks read only lane by lane stay in their half #94). The top-right pixel was blue instead of green.
  • Six lines began with SKIPPED in pr1660-suite.log. Two reported no wave64. The other four reported tiled resources tier below 2, missing d3d12SDKLayers.dll, no heap windows, or no D3D12 debug layer. These skips provide no coverage.

Not tested

Actual HLSL over 8 MiB, compiler memory savings, matched main or retail smoke runs, sample data, Wine, and other adapters. The workspace failures have no matched main result for comparison.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1660-suite.log and published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants