Skip to content

D3D12.X: XCL_BACKGROUND_COMPILES=0 stops the driver's second compiles - #1552

Open
Digit4w wants to merge 1 commit into
xcl-dev:mainfrom
Digit4w:background-processing-off
Open

Digit4w wants to merge 1 commit into
xcl-dev:mainfrom
Digit4w:background-processing-off

Conversation

@Digit4w

@Digit4w Digit4w commented Nov 24, 2026 •

Copy link
Copy Markdown

XCL_BACKGROUND_COMPILES=0 turns the driver's background work off on the title's device and on the device of xcl shaders --pipelines. Part of #2088.

NVIDIA's driver compiles a compute pipeline a second time on D3D12's background threads once CreateComputePipelineState has returned: as long again, with the same memory. @QemmHD saw that in #156, and that SetBackgroundProcessingMode(DISABLE_BACKGROUND_WORK) is refused with 0x887A002D. With Windows Developer Mode on the call is taken and the second compile is gone. Unset, nothing changes. Refused, the log says why and nothing changes.

What is in it

  • gpu/agility.rs: background_compiles_off(device) (the switch, the call, the reason of a refusal), with its tests in gpu/agility_tests.rs
  • hle/d3d12x/real.rs: the title's device, one log line
  • shaders.rs: the device of --pipelines, one line on stderr

Tested

  • RTX 4070 SUPER 12 GB (driver 32.0.16.2101), Ryzen 5 7600, 32 GB, Windows 11 26200 with Developer Mode on, rustc 1.100.0; tests debug, everything else release

  • cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_ADAPTER=nvidia, XCL_NETWORK=0) on 9367bf0, which is on main 53e85fb: 2795 passed, 1 failed, 49 ignored.

  • The one failure is hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (standin.rs:459, (0, 1, 1) against (0, 0, 1)). It fails on main 53e85fb too on this machine: 2792 passed, 1 failed, 49 ignored there, and 10 of 10 runs of that test alone. main changed that test since (5454468). Merged into main 9dfbe3e (no conflicts) this PR builds and its two tests that need no GPU pass.

  • SKIPPED, 27 lines: 22 "no wave64", 3 f16 / f32 programs refused in the per-lane form (gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426), 2 "no heap windows".

  • The three new tests pass; gpu_background_work_is_turned_off_and_on_again had its call taken (Developer Mode on).

  • The head before the rebase (035eead, the same change on an older main), xcl shaders <one translated CS> --precompile --only cs --pipelines with heap windows, cold driver cache, one process each:

    time printed process wall process CPU
    XCL_BACKGROUND_COMPILES=0 8.6 s 8.9 s 8.8 s
    unset (another program) 10.1 s 20.1 s 19.9 s
  • The same call as a local patch on 930e8b4, one translated CS per process (switch form): 146.7 s printed, 147.0 s wall and 145.6 s of CPU with background work off; another program with it on: 97.6 s printed, 199.2 s wall, 197.6 s of CPU. XCL_PSO_DISK_CACHE=0 (no GetCachedBlob) does not remove the second compile.

  • The same local patch in a retail title's loading up to its world start, XCL's driver cache off (XCL_PSO_DISK_CACHE=0) and the driver's own cache cold, two runs each way in the order off, on, on, off. The fresh compute pipelines of two runs paired by DXIL size, time of the first over the second:

    runs pairs median ratio from 100 KB of DXIL
    on / off 150 1.17 1.32 (27 pairs)
    on / off 144 1.19 1.26 (26 pairs)
    on / on 143 1.00 1.01 (25 pairs)
    off / off 152 0.98 0.98 (29 pairs)

    The process used 4.29 and 4.45 cores up to the world's start with background work on, 3.57 and 3.58 with it off. A program of 994 844 B of DXIL finished before the title's watchdog only with it off (66 s and 68 s). The title stopped at the same place in all four runs: this does not get it past the world's start.

Regression run

All three through scripts/smoke.ps1, 60 s, with XCL_ADAPTER=nvidia XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=300 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DEVICE_TYPE=anaconda XCL_TEXTURE_LEVEL_PAGES=1 XCL_UMA_WINDOWS=16, a DXIL cache folder of their own (XCL_DXIL_CACHE) and A pressed at 14, 17 and 21 s. Before them, one 180 s run of the main build that is not shown: 53e85fb translates under a new cache identity, and without that run the first of the three would have translated on demand what the others found in the cache. A second 60 s run of the main build, made right after the one below, gave 1530 frames and 17 942 MB.

main:

xcl-smoke v1
commit: 53e85fb124eae624641e9884517e4f3c4a7d8794
gpu: NVIDIA GeForce RTX 4070 SUPER
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1424 (PresentX 1424)
presents per 2 s (last 3): 60 59 22
device removals: 0
crashes: 0
peak commit: 18063 MB

this PR's head:

xcl-smoke v1
commit: 9367bf02fdc9b5342a1ab22235e67bc72a4890b6
gpu: NVIDIA GeForce RTX 4070 SUPER
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1480 (PresentX 1480)
presents per 2 s (last 3): 41 40 55
device removals: 0
crashes: 0
peak commit: 20023 MB

this PR's head with XCL_BACKGROUND_COMPILES=0 (its log: D3D12: the driver's background compiles are off (XCL_BACKGROUND_COMPILES=0)):

xcl-smoke v1
commit: 9367bf02fdc9b5342a1ab22235e67bc72a4890b6
gpu: NVIDIA GeForce RTX 4070 SUPER
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1395 (PresentX 1395)
presents per 2 s (last 3): 22 3 2
device removals: 0
crashes: 0
peak commit: 21513 MB

Not tested

  • AMD and Intel GPUs: whether their drivers do such a second compile at all.
  • A machine without Developer Mode on this commit: the refusal is covered by the unit test of its message. The call itself returned 0x887A002D here with the local patch, before Developer Mode was turned on.
  • What the driver's second compile gains at run time (GPU time of the pipelines): the reason this is a switch and not the default.
  • Graphics pipelines: the log times compute pipelines only.
  • The measurements above on 53e85fb: they were made before the rebases and not repeated.
  • Whether the 60 s regression runs reach the world's compute pipelines: not checked.
  • Why the peak commit of this PR's two runs is 11 % and 19 % above main's (inside the limit), and why the run with the switch ends at fewer presents: one run each, not looked into.

AI use

  • Claude Code with Claude Fable 5.2 wrote the code, the tests and this description; a Claude Code subagent on Claude Opus 5.5 drove the builds and runs on my machine.

🤖 Generated with Claude Code

@Aniseto

Aniseto commented Nov 24, 2026 •

Copy link
Copy Markdown

Ran the three new tests at 035eead (re-run after the head moved from 7a92dcd):

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 background_compiles
1 passed; 0 failed    (background_compiles_are_turned_off_by_0_only)

XCL_ADAPTER=nvidia cargo test -p xcl --lib developer_mode
1 passed; 0 failed    (a_refusal_for_developer_mode_says_so)

XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu_background_work
1 passed; 0 failed    (gpu_background_work_is_turned_off_and_on_again)

All three still pass on the new head. gpu_background_work_is_turned_off_and_on_again touches the real device (0.48 s on this run); the other two are parsing and logging checks.

Not tested: a title run with the switch flipped (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile, native wave64.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - built the PR's head commit from a clean tree and ran the tests on this machine; no local changes were made.

@lows78

lows78 commented Nov 24, 2026

Copy link
Copy Markdown

Test report for #1552 at 7a92dcdf8c5a599e819f6fc5d5d165505ed43c57 (clean tree), on an RTX 4090 without Developer Mode, which the description lists as not tested on this commit. I am not a graphics developer: Claude Code ran this on my PC, and I can rerun things if that helps.

Tested

  • NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), Intel Core i9-14900KF, 32 GB RAM, Windows 11 Pro 10.0.26200, inbox D3D12 (no Agility SDK), rustc 1.99.1 MSVC, DXC 1.8.2502.11, debug. XCL_SAMPLE_* unset.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4:
    • main 9e3831e, one run: 776 passed, 0 failed, 41 ignored
    • this PR, two runs: 779 passed, 0 failed, 41 ignored in each
    • this PR with XCL_BACKGROUND_COMPILES=0, one run: 779 passed, 0 failed, 41 ignored
    • coherent_buffer_sanitizes_console_flags_and_state did not fail in any of these runs
  • SKIPPED, the same three in all four runs: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
  • The PR's three tests pass. gpu_background_work_is_turned_off_and_on_again took the refusal path here: not taken here: Windows takes it in Developer Mode only (0x887a002d)
  • The repository's test title (xcl run <testgame> -- --hello), one run each with the variable unset, 0 and 1: exit 0, failures: 0, no [FAIL] line in all three. Only 0 logs a line:
    [WARN ] D3D12: XCL_BACKGROUND_COMPILES=0 was not taken, the driver's background compiles stay on: Windows takes it in Developer Mode only (0x887a002d)
    

Not tested

  • The switch actually taken (Developer Mode on), so no timing of the second compile
  • xcl shaders --pipelines, retail titles (no smoke.ps1 run), release builds, AMD, Intel

AI use

  • Claude Code, Claude Opus 5.5: ran the builds and tests and wrote this report

@Digit4w
Digit4w force-pushed the background-processing-off branch from 7a92dcd to 035eead Compare November 24, 2026 18:19
@MatyEjsr

MatyEjsr commented Nov 24, 2026 •

Copy link
Copy Markdown

Updated verification of #1552 at e25f6d3a94e888e27413a7c621483f3e40781c8d (clean tree) on NVIDIA Ampere, with Developer Mode on. This replaces the earlier report on 7a92dcd. git range-diff shows the same code rebased onto e1d84b7; the only change is a removed trailer in the commit message. It also merges cleanly onto current main (b49be18), and the PR is still open at this head. Nothing in the replies since my earlier report asked for a further check on this commit; the Developer Mode refusal path was covered on AMD at an earlier head and is still not re-run here.

Tested

  • Windows 11 Pro for Workstations 26200.7171 with Developer Mode on, Ryzen 7 7800X3D, 31.4 GB RAM, RTX 3090 24 GB (driver 617.42, wave32), rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug build for the tests, release build for the smoke runs. XCL_SAMPLE_* unset.
  • cargo test --workspace -j 8 --no-fail-fast -- --test-threads=8: 1426 passed, 0 failed, 46 ignored
  • the same with XCL_BACKGROUND_COMPILES=0: 1426 passed, 0 failed, 46 ignored. Every device the suite creates through real::init logged the driver's background compiles are off (16 times), with no refusal.
  • cargo test -p xcl --lib gpu::agility::tests -- --nocapture --test-threads=1: 11 passed. gpu_background_work_is_turned_off_and_on_again took the off-then-on Ok path.
  • e2e test_title_runs_and_game_folder_is_untouched with XCL_BACKGROUND_COMPILES=0: passed, and logged the "off" line.
  • SKIPPED, the same 28 lines in both suite runs:
    • no wave64: 21 (native-wave64 cases in gpu::dxil::kernel, gpu::recomp::lower, lower_dxil, gpu::recomp::tests)
    • wave32 per-lane form refused: 3 (f16 arithmetic, f16 packed, f32 conversions)
    • no heap windows: 1
    • no d3d12SDKLayers.dll or no debug layer: 3

Regression run (retail title, 60 s, release; main = this PR's merge base)

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3090
title: c1cc91a4
seconds: 60
exit: 0x0
frames shown: 1598 (PresentX 1598)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14050 MB
xcl-smoke v1
commit: e25f6d3a94e888e27413a7c621483f3e40781c8d
gpu: NVIDIA GeForce RTX 3090
title: c1cc91a4
seconds: 60
exit: 0x0
frames shown: 1583 (PresentX 1583)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14070 MB

The PR head with XCL_BACKGROUND_COMPILES=0 (the switch is accepted on a title: D3D12: the driver's background compiles are off (XCL_BACKGROUND_COMPILES=0) at 0.445 s):

xcl-smoke v1
commit: e25f6d3a94e888e27413a7c621483f3e40781c8d
gpu: NVIDIA GeForce RTX 3090
title: c1cc91a4
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13992 MB

Head against base: 99.1 % of the frames and 100.1 % of the peak commit with the switch unset, and 100.5 % / 99.6 % with =0. The video memory at the end is the same in all three runs (6125 MB local).

Not tested

  • Cold compile timing with background work on against off. In all three runs the DXIL and driver caches were warm and each case ran once, so these runs say nothing about the second compile's cost.
  • Developer Mode off on this machine (the refusal path was covered by other reports at earlier heads)
  • xcl shaders --pipelines on this head (checked at 7a92dcd)
  • AMD, Intel, native wave64, the D3D12 debug-layer tests, nvidia-dev

AI use

  • Antigravity (agy) with claude-opus-5-5-high (audited by claude-sonnet-5-5-medium) ran the builds, tests and smoke runs, compared the new head with the earlier one, and wrote this report from the command output. The auditor re-checked that the PR is open, mergeable, and still at this head, and edited the note.

@nnonno91

Copy link
Copy Markdown

Independent AMD check of the Developer Mode refusal at 035eead87a265cd8f5b9686c542179fedd4d8860.

Tested

  • Windows 11 25H2 (26200.9974), Developer Mode off, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. XCL_ADAPTER='AMD Radeon'.
  • cargo build --workspace --locked passed. cargo test --locked -p xcl --lib -- background_compiles developer_mode gpu_background_work --test-threads=1 --nocapture passed all three tests. The device test printed the Developer Mode refusal 0x887a002d.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 779 passed, 0 failed, 41 ignored, and one GPU skip (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows).
  • cargo test --locked -p xcl --test background_switch_probe -- --exact background_switch_reaches_the_shader_cli --nocapture --test-threads=1 (temporary probe) called xcl shaders <synthetic folder> --precompile --pipelines in two subprocesses sharing the same shader input and using separate XCL caches with XCL_PSO_DISK_CACHE=0. Each made one pipeline and refused zero. With XCL_BACKGROUND_COMPILES unset there was no status line. Setting it to 0 produced the Developer Mode refusal 0x887a002d once on stderr.
  • cargo test --locked -p xcl --test e2e -- --exact test_title_runs_and_game_folder_is_untouched --nocapture --test-threads=1 passed in separate runs with the switch unset and set to 0. The bundled title used the real AMD backend and finished both runs. Only the 0 run logged the Developer Mode refusal.

Not tested

Developer Mode enabled on AMD, actual background compilation or performance, and retail titles.

AI use

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

@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, ~21 ignored.

Thanks!

@DavidM1911

Copy link
Copy Markdown
Contributor

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

@thehollowedone

Copy link
Copy Markdown
Contributor

Independent Windows/NVIDIA check of #1552 head e25f6d3 in a clean detached worktree. This checks the current PR revision; it does not repeat the author's cold-driver timing claim.

Tested: Windows 11 build 26300 with Developer Mode enabled; Ryzen 7 9800X3D, RTX 3080 Ti 12 GiB (NVIDIA 621.35), rustc 1.99.1 MSVC, debug build. XCL_ADAPTER=3080 and a writable local XCL_DXIL_CACHE were set for the tests.

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib gpu::agility::tests -- --nocapture --test-threads=1: 11 passed, 0 failed, 0 ignored. The device test printed no refusal; its source prints not taken here on that branch, so the off/on calls succeeded on the Windows default adapter. This test does not print that adapter's identity.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4, with the switch unset: 1,426 passed, 0 failed, 46 ignored across 37 targets; 25 GPU SKIPPED notices.
  • The same workspace command with XCL_BACKGROUND_COMPILES=0: 1,426 passed, 0 failed, 46 ignored; the same 25 skips. Runtime initialization logged the driver's background compiles are off 16 times and no refusal. The suite logs identify the real RTX 3080 Ti backend.

Small test-coverage suggestion: gpu_background_work_is_turned_off_and_on_again currently returns a passing result on Err(e) after printing not taken here. On a machine without Developer Mode, its pass count therefore includes a path that did not exercise off/on. The repository's skip_test helper would make that missing coverage visible.

Suggested test-only change
-        Err(e) => println!("not taken here: {e}"),
+        Err(e) => crate::gpu::recomp::runner::skip_test(&format!("background work unavailable: {e}")),

Not tested: controlled cold NVIDIA caches, compile time or GPU-time change, AMD/Intel, retail title smoke, or the xcl shaders --pipelines CLI hook. The two suite runs establish regression behavior on this host, not a speedup.

AI use: Codex (GPT-6.2 Sol) checked the exact diff and test path, ran the commands, and drafted this report.

@Prime1997 Prime1997 mentioned this pull request Nov 26, 2026
@ClosetPie107

Copy link
Copy Markdown

AMD RX 9070 (RDNA4, RADV / Linux) test report on e25f6d3a

Setup

  • AMD Radeon RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.5)
  • Proton Experimental (experimental-11.0-20261112), DXVK v3.1.1-209, patched vkd3d-proton master (ec207194, dxil-spirv b540c8a2), DXC 1.9.2609.5
  • Release x86_64-pc-windows-gnu build

Tested

  1. gpu::agility::tests (xcl-<hash>.exe agility:: --test-threads=1, XCL_ADAPTER=9070):
    • 11 passed, 0 failed, 0 ignored, 0 skipped (peak VRAM 705 MiB), including gpu_background_work_is_turned_off_and_on_again.
  2. Retail title 1.0.2.1 — 35 s boot check (XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0 XCL_BACKGROUND_COMPILES=0 XCL_COHERENT_MB=1024):
    • Clean exit=0 (841 presents, 0 crashes, 0 device removals).
    • Under vkd3d-proton, SetBackgroundProcessingMode returns 0x80004001 (E_NOTIMPL), and XCL cleanly logs:
      D3D12: XCL_BACKGROUND_COMPILES=0 was not taken, the driver's background compiles stay on: 0x80004001
      and continues normally.

Not tested

  • Full workspace test suite on e25f6d3a, Windows (where Developer Mode allows SetBackgroundProcessingMode), NVIDIA, xcl shaders --pipelines.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) built the binaries, ran the tests and retail boot check on this machine, and drafted this report.

@Aniseto

Aniseto commented Nov 26, 2026

Copy link
Copy Markdown

Re-ran the agility tests at e25f6d3 after the head moved from 7a92dcd; this is a new response in the same thread, not an edit of my earlier report:

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 gpu::agility::tests -- --test-threads=1
11 passed; 0 failed; 0 ignored; 0 measured; 1316 filtered out      (exit 0)

All 11 pass here, including gpu_background_work_is_turned_off_and_on_again, which touches the real device. thehollowedone reported 11/11 on an RTX 3080 Ti at this same head with driver 621.35 and rustc 1.99.1; this adds a desktop RTX 5070 Ti on driver 32.0.16.2124 with rustc 1.100.0. My earlier report in this thread was at 7a92dcd (three focused filters, 3/3).

Not tested: a title run with XCL_BACKGROUND_COMPILES=0 (no unpacked title here), a paired smoke run, the full workspace suite, RDNA2/RDNA4 and Intel GPUs, Wine, release profile, native wave64, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

@Digit4w
Digit4w force-pushed the background-processing-off branch from e25f6d3 to 11caea7 Compare November 27, 2026 12:30
NVIDIA's driver compiles a compute pipeline a second time on D3D12's
background threads once CreateComputePipelineState has returned (seen in
loading that runs next to the cold compiles the title is waiting for.

With XCL_BACKGROUND_COMPILES=0 the title's device and the device of
`xcl shaders --pipelines` get SetBackgroundProcessingMode(
DISABLE_BACKGROUND_WORK). Windows takes that in Developer Mode only
(0x887a002d without it): the log says so and the driver goes on as before.
Unset, nothing changes: what the second compile gains at run time is not
measured.

Measured with this call on 930e8b4, RTX 4070 SUPER, cold driver cache:
- one translated CS per process: 147 s in the call and 146 s of CPU with
  background work off; another, 98 s in the call and 198 s of CPU with it on;
- a retail title's loading, two runs each way, the same pipelines paired by
  DXIL size: with background work on a pipeline takes 1.17x / 1.19x as long
  (median; 1.32x / 1.26x from 100 KB of DXIL; a setting against itself:
  1.00 / 0.98) and the process uses 4.3 - 4.5 cores against 3.6 up to the
  world's start.
The title stops at the same place either way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Digit4w
Digit4w force-pushed the background-processing-off branch from 11caea7 to 9367bf0 Compare November 30, 2026 13:53
@github-actions github-actions Bot added area:d3d12 D3D12.X runtime, command lists, resources, sparse memory area:shaders Shader cache, PSO compilation, pipeline libraries, precompilation area:tests Unit, integration, e2e tests, or testtitle gpu:nvidia Code is specific to NVIDIA / wave32 GPUs (scope tag; see needs:nvidia-test) labels Nov 30, 2026
@thehollowedone

Copy link
Copy Markdown
Contributor

Independent focused check of #1552 head 9367bf0, merged cleanly onto current main 9dfbe3e.

Tested

  • Windows 11 build 26300, RTX 3080 Ti (NVIDIA driver 621.35), Ryzen 7 9800X3D, rustc 1.99.1 MSVC.
  • cargo test --offline --locked -p xcl --lib gpu_background_work_is_turned_off_and_on_again -- --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored. The test accepted both the request to disable background work and the request to allow it again; no refusal was reported.

This verifies the D3D12 mode toggle on this system. It does not measure cold pipeline compile time or gameplay performance. The full workspace suite and paired title smoke were not run in this check.

AI use: OpenAI Codex (GPT-6.2 Sol) fetched the current head, merged it onto main, ran the focused test, and drafted this report.

@AAsobu

AAsobu commented Nov 30, 2026 •

Copy link
Copy Markdown

Test report for #1552 at head 9367bf02fdc9b5342a1ab22235e67bc72a4890b6

  • Merged into main abec7ce9ee2f25efe8c089ca4128ddf171c37afa: clean (merge commit 30fd28b6), git diff --check clean.
  • Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300 with Developer Mode on, rustc 1.100.0; tests debug, title runs release.
  • cargo build --workspace: ok.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 2889 passed, 0 failed, 51 ignored.
    • The three new tests pass: background_compiles_are_turned_off_by_0_only, a_refusal_for_developer_mode_says_so, gpu_background_work_is_turned_off_and_on_again.
    • gpu_background_work_is_turned_off_and_on_again run alone with --nocapture prints no "not taken here": with Developer Mode on, this device took DISABLE_BACKGROUND_WORK and then ALLOWED again.
  • SKIPPED (28): 22 no wave64, 2 no heap windows (opt-in), 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps.
  • Diff read in full (+78/-0, 4 files): off unless XCL_BACKGROUND_COMPILES=0; the one unsafe is the ID3D12Device6::SetBackgroundProcessingMode call with no event or out-pointers.

Retail title (one run each, warm caches from earlier runs, so indicative only), release builds, XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1:

Not tested: the compile-time gain itself (no cold-cache A/B), AMD / wave64.

AI use: run and written with Claude Code (Claude Opus 5.5); results checked by me.

@brainhay5

Copy link
Copy Markdown

merge-check claim
head: 9367bf0

@github-actions github-actions Bot added needs-1st-check Passes gates; needs first independent merge-check (#3041) needs:nvidia-test Needs a test report or merge-check on an NVIDIA GPU labels Dec 1, 2026
@brainhay5

Copy link
Copy Markdown

merge-check claim
head: 9367bf0

@brainhay5

Copy link
Copy Markdown

merge-check
base: d0832e6
head: 9367bf0
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 1 failed, 51 ignored; 29 SKIPPED lines
failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017

@github-actions github-actions Bot added needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) and removed needs-1st-check Passes gates; needs first independent merge-check (#3041) needs:nvidia-test Needs a test report or merge-check on an NVIDIA GPU labels Dec 1, 2026
@Parakeet-Wheat

Parakeet-Wheat commented Dec 1, 2026 •

Copy link
Copy Markdown

merge-check
base: d0832e6
head: 9367bf0
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 1 failed, 51 ignored; SKIPPED: 26 (22 no wave64, 2 no heap windows, 1 driver cache needs Developer Mode, 1 no GPU_UPLOAD heaps); failing: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs fails on the base alone too (3 of 3 runs on the base, 3 of 3 on the merge)
review: Whole diff read. Windows Developer Mode is off on this machine, so this check covers the refusal path. gpu_background_work_is_turned_off_and_on_again prints "not taken here: Windows takes it in Developer Mode only (0x887a002d)" and passes. A 60 s boot-only smoke of the merge with XCL_BACKGROUND_COMPILES=0 logs the PR's warning line once. The smoke pair (base, merge) shows 0 crashes and 0 device removals, with 1068 and 1026 frames shown. We ran five hand mutations of agility.rs. The tests catch four: any value accepted, no trim, the Developer Mode reason lost, and the two modes swapped. The fifth makes set_background_work return an error without the call, and the GPU test still passes. On a machine without Developer Mode, that test asserts nothing. This is a test gap, not a defect in the change.
performance: none when unset: one environment read per device creation.
verdict: safe to merge
hardware / tool and model: RTX 3070 8 GB (610.88), AMD Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, hand mutations, smoke pair and review)

@github-actions github-actions Bot added ready-to-merge Has 2 independent safe merge-checks on current head (#3041) and removed needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) labels Dec 1, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 9367bf0

No open or merged PR calls SetBackgroundProcessingMode. #3135 only lists it in a device slot remap table, which is unrelated. The switch is opt-in (XCL_BACKGROUND_COMPILES=0); with the variable unset background_compiles_off returns None and nothing changes.
No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

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

Labels

area:d3d12 D3D12.X runtime, command lists, resources, sparse memory area:shaders Shader cache, PSO compilation, pipeline libraries, precompilation area:tests Unit, integration, e2e tests, or testtitle goal:world-load Bears on the retail title getting past world loading gpu:nvidia Code is specific to NVIDIA / wave32 GPUs (scope tag; see needs:nvidia-test) ready-to-merge Has 2 independent safe merge-checks on current head (#3041)

Projects

None yet

Development

Successfully merging this pull request may close these issues.