D3D12.X: a create that fails on a lost device keeps the driver's blob #2426

Open
github-bot wants to merge 1 commit from github-bot/gh-2426 into main AGit
Owner

@⁠Digit4w on GitHub · 2026-11-25 18:35 UTC · original
Digit4w:d3d12x-keep-driver-blob-on-device-loss → main · +96 −9 · 1 files · 1 commits · open

A pipeline create that was given a driver blob and then failed dropped the blob, in memory and the file under <DXIL cache>\driver\, whatever the HRESULT was. On a removed or hung device every create fails, so in the second or two before the title is stopped each pipeline it creates deletes a valid blob, and the next run builds those pipelines in the driver again. With this change DXGI_ERROR_DEVICE_REMOVED, _HUNG, _RESET and E_OUTOFMEMORY keep the blob; any other failure drops it as before. Part of #2088 (a warm run reuses the pipelines of the run before).

What is in it

  • hle/d3d12x/real.rs: driver_cache::refused(hr), used by the three creates that take a blob (compute, graphics in create_graphics_pso_cached, the compute pass of a two-pass pipeline). The two compute creates had the same lines for a failed create with a blob; they are now drop_refused_compute_blob. The retry without the blob is unchanged. In compute_container the early return of ComputeBuild::CachedWhole (#2371) comes after that decision, as it came after the old lines.
  • Tests in the same file: a_lost_device_or_no_memory_does_not_refuse_a_blob, cached_graphics_blob_is_kept_when_the_device_is_removed and a_compute_blob_is_kept_when_the_device_is_lost_and_dropped_when_the_driver_refuses_it (the last two fail without the change).

Tested

  • RTX 4070 SUPER 12 GB (driver 32.0.16.2101), Ryzen 5 7600, 32 GB, Windows 11 26200, rustc 1.100.0.

  • cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, XCL_ADAPTER=nvidia) on 9c178b2, which is on main b49be18: 1438 passed, 0 failed, 47 ignored. The three tests of this PR ran and passed.

  • SKIPPED, 25 lines: 21 "no wave64", 3 f16 / f32 programs refused in the per-lane form (#1426), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

  • Before the rebases: a retail title, release builds of 68a284a and of 68a284a + this change, each with a local switch that is not in this PR and calls ID3D12Device5::RemoveDevice() during loading; XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_TRACE=1, the same 2 975 blob files restored before every run. Compute creates with a blob that failed after the removal (all 0x887a0005), and how many of their files were gone afterwards:

    build failed creates files gone
    main 12 12
    main 24 24
    main 12 12
    this change 24 0
    this change 12 0
  • The next run (100 s, the main build) under an exe name the NVIDIA driver's own cache had never seen: the 24 pipelines of the second row took 22.1 s in the driver without their blobs and 0.7 s with them (the largest: 308 KB of DXIL, 4.8 s). Under the usual exe name the driver's own cache gave a lost one back in 4 ms, so the cost shows only when that cache does not have the pipeline.

Regression run

Both through the same script, 60 s, with XCL_ADAPTER=nvidia XCL_NETWORK=0 XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=300 and A pressed at 14, 17 and 21 s.

main:

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

this PR's head:

xcl-smoke v1
commit: 9c178b2d6499efae49c654eef243e1134fac7ade
gpu: NVIDIA GeForce RTX 4070 SUPER
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1184 (PresentX 1185)
presents per 2 s (last 3): 2 2 7
device removals: 0
crashes: 0
peak commit: 23288 MB

Not tested

  • AMD and Intel GPUs.
  • The graphics path in the title: no graphics create with a blob fell after the removal in those runs, so it has the unit test only. The compute pass of a two-pass pipeline was not reached. The test of drop_refused_compute_blob covers what the two compute creates decide about the blob, not the retry around it: that is in two unsafe functions that call the driver, and has no test.
  • E_OUTOFMEMORY, DEVICE_HUNG and DEVICE_RESET in a real run: only the unit test of the decision.
  • A device removal that happens by itself on this tree: the removals above were forced, and those runs were made on 68a284a, not again on b49be18. The CachedWhole create of #2371 with a lost device was not run either.
  • The 60 s regression runs see no device removal, so they do not reach the changed branch.

AI use

  • Claude Code with Claude Fable 5.2 wrote the code, the tests and this description, and drove the runs on my machine.

🤖 Generated with Claude Code

**@⁠Digit4w** on GitHub · 2026-11-25 18:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426) `Digit4w:d3d12x-keep-driver-blob-on-device-loss` → `main` · +96 −9 · 1 files · 1 commits · open A pipeline create that was given a driver blob and then failed dropped the blob, in memory and the file under `<DXIL cache>\driver\`, whatever the HRESULT was. On a removed or hung device every create fails, so in the second or two before the title is stopped each pipeline it creates deletes a valid blob, and the next run builds those pipelines in the driver again. With this change `DXGI_ERROR_DEVICE_REMOVED`, `_HUNG`, `_RESET` and `E_OUTOFMEMORY` keep the blob; any other failure drops it as before. Part of #2088 (a warm run reuses the pipelines of the run before). **What is in it** - `hle/d3d12x/real.rs`: `driver_cache::refused(hr)`, used by the three creates that take a blob (compute, graphics in `create_graphics_pso_cached`, the compute pass of a two-pass pipeline). The two compute creates had the same lines for a failed create with a blob; they are now `drop_refused_compute_blob`. The retry without the blob is unchanged. In `compute_container` the early return of `ComputeBuild::CachedWhole` (#2371) comes after that decision, as it came after the old lines. - Tests in the same file: `a_lost_device_or_no_memory_does_not_refuse_a_blob`, `cached_graphics_blob_is_kept_when_the_device_is_removed` and `a_compute_blob_is_kept_when_the_device_is_lost_and_dropped_when_the_driver_refuses_it` (the last two fail without the change). **Tested** - RTX 4070 SUPER 12 GB (driver 32.0.16.2101), Ryzen 5 7600, 32 GB, Windows 11 26200, rustc 1.100.0. - `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug, `XCL_ADAPTER=nvidia`) on `9c178b2`, which is on `main` `b49be18`: 1438 passed, 0 failed, 47 ignored. The three tests of this PR ran and passed. - SKIPPED, 25 lines: 21 "no wave64", 3 f16 / f32 programs refused in the per-lane form (#1426), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Before the rebases: a retail title, release builds of `68a284a` and of `68a284a` + this change, each with a local switch that is not in this PR and calls `ID3D12Device5::RemoveDevice()` during loading; `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_TRACE=1`, the same 2 975 blob files restored before every run. Compute creates with a blob that failed after the removal (all `0x887a0005`), and how many of their files were gone afterwards: | build | failed creates | files gone | |---|---|---| | main | 12 | 12 | | main | 24 | 24 | | main | 12 | 12 | | this change | 24 | 0 | | this change | 12 | 0 | - The next run (100 s, the main build) under an exe name the NVIDIA driver's own cache had never seen: the 24 pipelines of the second row took 22.1 s in the driver without their blobs and 0.7 s with them (the largest: 308 KB of DXIL, 4.8 s). Under the usual exe name the driver's own cache gave a lost one back in 4 ms, so the cost shows only when that cache does not have the pipeline. **Regression run** Both through the same script, 60 s, with `XCL_ADAPTER=nvidia XCL_NETWORK=0 XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=300` and A pressed at 14, 17 and 21 s. main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4070 SUPER title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1220 (PresentX 1220) presents per 2 s (last 3): 0 3 0 device removals: 0 crashes: 0 peak commit: 24058 MB ``` this PR's head: ``` xcl-smoke v1 commit: 9c178b2d6499efae49c654eef243e1134fac7ade gpu: NVIDIA GeForce RTX 4070 SUPER title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1184 (PresentX 1185) presents per 2 s (last 3): 2 2 7 device removals: 0 crashes: 0 peak commit: 23288 MB ``` **Not tested** - AMD and Intel GPUs. - The graphics path in the title: no graphics create with a blob fell after the removal in those runs, so it has the unit test only. The compute pass of a two-pass pipeline was not reached. The test of `drop_refused_compute_blob` covers what the two compute creates decide about the blob, not the retry around it: that is in two `unsafe` functions that call the driver, and has no test. - `E_OUTOFMEMORY`, `DEVICE_HUNG` and `DEVICE_RESET` in a real run: only the unit test of the decision. - A device removal that happens by itself on this tree: the removals above were forced, and those runs were made on `68a284a`, not again on `b49be18`. The `CachedWhole` create of #2371 with a lost device was not run either. - The 60 s regression runs see no device removal, so they do not reach the changed branch. **AI use** - Claude Code with Claude Fable 5.2 wrote the code, the tests and this description, and drove the runs on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A pipeline create that was given a driver blob and failed dropped the blob,
in memory and on disk, whatever the HRESULT was. A removed or hung device
and a driver out of memory fail every create, with a blob or without one,
so those failures say nothing about the blob. After a device removal the
title lives on for a second or two before it is stopped, and every
pipeline it creates in that time deleted a valid file; the next run built
those pipelines in the driver again.

driver_cache::refused(hr) now decides: DXGI_ERROR_DEVICE_REMOVED, _HUNG,
_RESET and E_OUTOFMEMORY keep the blob, every other failure drops it as
before. Used by the three creates that take a blob (compute, graphics,
the compute pass of a two-pass pipeline); the two compute ones share
drop_refused_compute_blob, which has its own test. The retry without the
blob is unchanged.

Measured on 68a284a, RTX 4070 SUPER, a retail title, with the device
removed during loading by a local ID3D12Device5::RemoveDevice() switch
that is not part of this commit. Compute creates with a blob that failed
after the removal (all 0x887a0005) and blob files gone afterwards:
main 12/12, 24/24, 12/12; with this change 24/0, 12/0. In a next run
under an exe name the driver's own cache had never seen, the 24 pipelines
took 22.1 s in the driver without their blobs and 0.7 s with them.
No graphics create with a blob fell after the removal in those runs: the
graphics path is covered by the unit test only.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:30:34 +00:00
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-25 19:13 UTC · original

Independent AMD RDNA4 (native wave64) test report on exact head fdbccf573187f205e5e9a5980fab16af87bb6c7a (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1289 passed, 3 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • Both PR tests passed: hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob and hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed.
    • The 3 failures are pre-existing on the PR's base main: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722) and fuzz_validate_and_gpu_3 (seed 1599) on this GPU, plus gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier (from 50a9fde / #2074, fixed later on main in #2420).

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: fdbccf573187f205e5e9a5980fab16af87bb6c7a
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1616 (PresentX 1616)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13922 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
**@⁠emirduran707** on GitHub · 2026-11-25 19:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#issuecomment-7172002722) Independent AMD RDNA4 (native wave64) test report on exact head `fdbccf573187f205e5e9a5980fab16af87bb6c7a` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1289 passed, 3 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - Both PR tests passed: `hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob` and `hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed`. - The 3 failures are pre-existing on the PR's base `main`: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722) and `fuzz_validate_and_gpu_3` (seed 1599) on this GPU, plus `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` (from `50a9fde` / #2074, fixed later on `main` in #2420). **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: fdbccf573187f205e5e9a5980fab16af87bb6c7a gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1616 (PresentX 1616) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13922 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
Author
Owner

@⁠GustavoEllwanger on GitHub · 2026-11-25 19:41 UTC · original

Test report on head fdbccf5, as is and merged onto current main 06055a7 (merge c7f6dea, no conflicts), adding NVIDIA Blackwell (32-lane waves) and AMD RDNA2 (native wave64) to the RTX 4070 SUPER and RDNA4 runs above.

Tested

  • AMD Ryzen 7 7700, Windows 11 build 26200.9974, Rust 1.95.0 MSVC, debug.
    • NVIDIA GeForce RTX 5060 (driver 32.0.16.1088), XCL_ADAPTER=5060
    • AMD Radeon RDNA2 iGPU (driver 32.0.21042.62), XCL_ADAPTER=Radeon
  • cargo test --workspace --no-fail-fast -- --test-threads=4:
tree RTX 5060 RDNA2 iGPU
main 06055a7 1413 passed, 0 failed, 46 ignored 1412 passed, 1 failed, 46 ignored
this PR merged onto 06055a7 1415 passed, 0 failed, 46 ignored 1414 passed, 1 failed, 46 ignored
this PR as is, fdbccf5 1291 passed, 1 failed, 46 ignored 1290 passed, 2 failed, 46 ignored
  • Merged, both GPUs show main plus the two new tests, with nothing else changed.
  • The iGPU failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 783 on main and merged, seed 540 on the old base), the same as on main, #2115.
  • On the PR's own base, a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier fails on both GPUs as described above; it passes on 06055a7, so the Build and test check should go green on a rerun.
  • Both new tests pass on both GPUs, as is and merged: hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob and hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed.
  • SKIPPED: RTX 5060 29 lines (wave64-only and per-lane gpu:: tests, heap_window_out_of_memory_falls_back_to_the_switch_form, shaders::tests::pso_measurement_compiles_an_exact_synthetic_record, test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state); iGPU 18 lines (per-lane #1426 refusals and the same four).
  • The two changed test modules in parallel, XCL_ADAPTER=5060 cargo test -p xcl --lib -- hle::d3d12x::real::driver_cache hle::d3d12x::real::graphics_blob_tests --test-threads=8, 30 runs each: this PR (11 tests) 30 passed, 0 failed; main (9 tests) 30 passed, 0 failed. The new tests don't interfere with each other or with the existing ones.

Not tested

  • A retail title, a removed device during a real load, and the next run reusing the kept blobs (covered by the author's runs above).
  • A release build.

Tests run and this report drafted with Claude Code (Claude Opus 5.5); I checked the numbers against the logs.

**@⁠GustavoEllwanger** on GitHub · 2026-11-25 19:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#issuecomment-7172633876) Test report on head `fdbccf5`, as is and merged onto current `main` `06055a7` (merge `c7f6dea`, no conflicts), adding NVIDIA Blackwell (32-lane waves) and AMD RDNA2 (native wave64) to the RTX 4070 SUPER and RDNA4 runs above. **Tested** - AMD Ryzen 7 7700, Windows 11 build 26200.9974, Rust 1.95.0 MSVC, debug. - NVIDIA GeForce RTX 5060 (driver 32.0.16.1088), `XCL_ADAPTER=5060` - AMD Radeon RDNA2 iGPU (driver 32.0.21042.62), `XCL_ADAPTER=Radeon` - `cargo test --workspace --no-fail-fast -- --test-threads=4`: | tree | RTX 5060 | RDNA2 iGPU | |---|---|---| | `main` `06055a7` | 1413 passed, 0 failed, 46 ignored | 1412 passed, 1 failed, 46 ignored | | this PR merged onto `06055a7` | 1415 passed, 0 failed, 46 ignored | 1414 passed, 1 failed, 46 ignored | | this PR as is, `fdbccf5` | 1291 passed, 1 failed, 46 ignored | 1290 passed, 2 failed, 46 ignored | - Merged, both GPUs show `main` plus the two new tests, with nothing else changed. - The iGPU failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 783 on `main` and merged, seed 540 on the old base), the same as on `main`, #2115. - On the PR's own base, `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` fails on both GPUs as described above; it passes on `06055a7`, so the `Build and test` check should go green on a rerun. - Both new tests pass on both GPUs, as is and merged: `hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob` and `hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed`. - `SKIPPED`: RTX 5060 29 lines (wave64-only and per-lane `gpu::` tests, `heap_window_out_of_memory_falls_back_to_the_switch_form`, `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record`, `test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state`); iGPU 18 lines (per-lane `#1426` refusals and the same four). - The two changed test modules in parallel, `XCL_ADAPTER=5060 cargo test -p xcl --lib -- hle::d3d12x::real::driver_cache hle::d3d12x::real::graphics_blob_tests --test-threads=8`, 30 runs each: this PR (11 tests) 30 passed, 0 failed; `main` (9 tests) 30 passed, 0 failed. The new tests don't interfere with each other or with the existing ones. **Not tested** - A retail title, a removed device during a real load, and the next run reusing the kept blobs (covered by the author's runs above). - A release build. Tests run and this report drafted with Claude Code (Claude Opus 5.5); I checked the numbers against the logs.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 19:46 UTC · original

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

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-25 19:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#issuecomment-7172738299) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`, 1219/1): ``` gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier assertion failed: group barriers in the program (lower_dxil.rs:1155) ``` The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin
Author
Owner

@⁠Digit4w on GitHub · 2026-11-25 22:25 UTC · original

@⁠bmjask thanks for the review. Rebased onto main e1d84b7 (the failing Build and test check was a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier from the old base) and added compute coverage; the head is now 749cf86.

  • The two compute creates (compute_container and the compute pass in finish_two_pass) had the same lines for a failed create with a blob. They are now one function, drop_refused_compute_blob, with a test: a removed, hung or reset device and E_OUTOFMEMORY keep the blob in memory and on disk; E_INVALIDARG drops it. The test fails with the old behaviour.
  • Not covered: the retry without the blob in those two functions. Unlike create_graphics_pso_cached they call the driver directly, so a test like the graphics one would need them split up first; I left that out to keep this PR small. It is under Not tested, next to the missing real OOM / hung / reset runs.

Suite on 749cf86 (RTX 4070 SUPER): 1426 passed, 0 failed, 46 ignored. The smoke blocks are in the description.

Written with Claude Code (Claude Fable 5.2).

**@⁠Digit4w** on GitHub · 2026-11-25 22:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#issuecomment-7176351927) @⁠bmjask thanks for the review. Rebased onto `main` `e1d84b7` (the failing `Build and test` check was `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` from the old base) and added compute coverage; the head is now `749cf86`. - The two compute creates (`compute_container` and the compute pass in `finish_two_pass`) had the same lines for a failed create with a blob. They are now one function, `drop_refused_compute_blob`, with a test: a removed, hung or reset device and `E_OUTOFMEMORY` keep the blob in memory and on disk; `E_INVALIDARG` drops it. The test fails with the old behaviour. - Not covered: the retry without the blob in those two functions. Unlike `create_graphics_pso_cached` they call the driver directly, so a test like the graphics one would need them split up first; I left that out to keep this PR small. It is under **Not tested**, next to the missing real OOM / hung / reset runs. Suite on `749cf86` (RTX 4070 SUPER): 1426 passed, 0 failed, 46 ignored. The smoke blocks are in the description. Written with Claude Code (Claude Fable 5.2).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 02:22 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-26 02:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#issuecomment-7180739326) 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
github-bot force-pushed github-bot/gh-2426 from 749cf866c3 to 9c178b2d64 2026-11-26 11:15:27 +00:00 Compare
Author
Owner

@⁠bmjask on GitHub · 2026-11-25 20:30 UTC · original · reviewed

No concrete code defect found. The retained-blob classifier preserves cache on device removal/hang/reset/OOM while keeping fallback retry without the blob across compute, graphics, and two-pass paths; successful retries replace stale blobs. Nonblocking gap: only graphics has focused retention coverage. Please add equivalent compute_container and finish_two_pass device-loss tests, and retain the disclosed lack of real OOM/hung/reset validation.

**@⁠bmjask** on GitHub · 2026-11-25 20:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#pullrequestreview-6064527291) · **reviewed** No concrete code defect found. The retained-blob classifier preserves cache on device removal/hang/reset/OOM while keeping fallback retry without the blob across compute, graphics, and two-pass paths; successful retries replace stale blobs. Nonblocking gap: only graphics has focused retention coverage. Please add equivalent compute_container and finish_two_pass device-loss tests, and retain the disclosed lack of real OOM/hung/reset validation.
Author
Owner

@⁠Prime1997 on GitHub · 2026-11-26 13:30 UTC · original · reviewed

Good within the targeted test scope; retain for integration. Keeps cached driver blobs on device-loss or out-of-memory errors and distinguishes those from a driver refusal of the blob.

Reviewed PR head 9c178b2d6499efae49c654eef243e1134fac7ade. Tested an isolated, uncommitted merge-tree integration with latest main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, tree 735b5a68b824a4e63dc25a55dcdd2e88ce9124c1; this is not a clean PR-head run. Integration source overlay SHA-256: 5b7ae5fdce161348bc8f83bf24bcbcb02bcb4dbe703ff422ef7a2ebb3a9ae6ef.

Measured: 3 passed, 0 failed, 0 ignored, 0 skipped. Exact selected filters, each run in a fresh process:

  • hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob
  • hle::d3d12x::real::compute_blob_tests::a_compute_blob_is_kept_when_the_device_is_lost_and_dropped_when_the_driver_refuses_it
  • hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed

Build: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run each: <test-exe> <exact-filter> --exact --test-threads=1 --nocapture. Private target/executable paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug; private temporary/cache paths, two low-priority build jobs, 90-second per-test bound.

Scope: CPU error classification and fake-driver/cache-file fixtures. These use private temporary files and a distinct cache key; no GPU or actual device-loss injection occurred. No full suite, retail run, sustained memory pressure or performance benefit is established. Passing these fixtures is not merge certification.

AI use: Codex (GPT-6) inspected the changes and fixtures, ran the checks and verified raw receipts. Optional temporary Discord for coordinating contributor work, testing and comparing results.

**@⁠Prime1997** on GitHub · 2026-11-26 13:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/2426#pullrequestreview-6074978545) · **reviewed** **Good within the targeted test scope; retain for integration.** Keeps cached driver blobs on device-loss or out-of-memory errors and distinguishes those from a driver refusal of the blob. Reviewed PR head `9c178b2d6499efae49c654eef243e1134fac7ade`. Tested an isolated, uncommitted merge-tree integration with latest main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, tree `735b5a68b824a4e63dc25a55dcdd2e88ce9124c1`; this is not a clean PR-head run. Integration source overlay SHA-256: `5b7ae5fdce161348bc8f83bf24bcbcb02bcb4dbe703ff422ef7a2ebb3a9ae6ef`. **Measured: 3 passed, 0 failed, 0 ignored, 0 skipped.** Exact selected filters, each run in a fresh process: - `hle::d3d12x::real::driver_cache::tests::a_lost_device_or_no_memory_does_not_refuse_a_blob` - `hle::d3d12x::real::compute_blob_tests::a_compute_blob_is_kept_when_the_device_is_lost_and_dropped_when_the_driver_refuses_it` - `hle::d3d12x::real::graphics_blob_tests::cached_graphics_blob_is_kept_when_the_device_is_removed` Build: `cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>`. Run each: `<test-exe> <exact-filter> --exact --test-threads=1 --nocapture`. Private target/executable paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug; private temporary/cache paths, two low-priority build jobs, 90-second per-test bound. **Scope:** CPU error classification and fake-driver/cache-file fixtures. These use private temporary files and a distinct cache key; no GPU or actual device-loss injection occurred. No full suite, retail run, sustained memory pressure or performance benefit is established. Passing these fixtures is not merge certification. AI use: Codex (GPT-6) inspected the changes and fixtures, ran the checks and verified raw receipts. Optional temporary [Discord](https://discord.gg/gK3y7WRRY) for coordinating contributor work, testing and comparing results.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/real.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2426/head:github-bot/gh-2426'
git switch 'github-bot/gh-2426'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2426'
git switch 'github-bot/gh-2426'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2426'
git switch 'github-bot/gh-2426'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2426'
git switch 'main'
git merge --squash 'github-bot/gh-2426'
git switch 'main'
git merge --ff-only 'github-bot/gh-2426'
git switch 'main'
git merge 'github-bot/gh-2426'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.