HLE: bridge ID3D12Device before direct ResetDevice and cache D3D11 companion #1667

Open
eizispark wants to merge 1 commit from upstream-pr/1677 into main
eizispark commented 2026-11-24 19:12:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T19:12:21Z.


MFResetDXGIDeviceManagerX previously tried calling IMFDXGIDeviceManager::ResetDevice directly with pDevice before checking whether pDevice implements ID3D12Device. Under XCL's null D3D12 backend (NullObj::QueryInterface answers S_OK to every IID, including IID_ID3D11Device and IID_ID3D10Multithread), system mfplat.dll accepted NullObj directly and stored it inside IMFDXGIDeviceManager, causing subsequent LockDevice(IID_ID3D11Device) calls to fail with MF_E_UNEXPECTED (0xC00D36BB).

In addition, MFResetDXGIDeviceManagerX created a new companion ID3D11Device (D3D11CreateDevice + VIDEO_SUPPORT) on every call rather than reusing the companion D3D11 device for the adapter LUID.

What is in it

  • crates/xcl/src/hle/mfplat.rs: check device_unk.cast::<ID3D12Device>() before falling back to direct IMFDXGIDeviceManager::ResetDevice, cache multithread-protected companion ID3D11Device instances per adapter LUID (recreating only if ID3D11Device::GetDeviceRemovedReason at vtable slot 39 reports removal), and add null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid covering both the null D3D12 backend and hardware ID3D12Device LUID caching.

Tested

  • Hardware / toolchain: AMD Radeon RX 9070 XT (driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, Windows 11 x64, rustc 1.100.0 (0ef1bc386 2026-11-09) (stable-x86_64-pc-windows-msvc), debug (unit + workspace tests) and release (60 s title smoke).
  • cargo test -p xcl --lib mfplat: 4 passed, 0 failed, 0 ignored (null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid verified failing with 0xC00D36BB (MF_E_UNEXPECTED) before the fix).
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 777 passed, 0 failed, 41 ignored (SKIPPED GPU/SDK tests: 3 — test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll; heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; uploads_start_from_each_subresources_state: no D3D12 debug layer).

Regression run

main (9e3831e1f570d3646e53ab753b19ec07eb8f1485):

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1677 (PresentX 1677)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14728 MB

PR (8c441777a6c06197b00baca498790ae02f4154f5):

xcl-smoke v1
commit: 8c441777a6c06197b00baca498790ae02f4154f5
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1673 (PresentX 1673)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

Not tested

  • Retail titles exercising hardware Media Foundation video playback (MFResetDXGIDeviceManagerX + MFSourceReader / hardware MFTs) under graphics = "null" or Linux / Wine.
  • D3D12 SDK debug-layer tests (d3d12SDKLayers.dll not installed on this machine).

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon): audited mfplat.rs and d3d11.h (ID3D11DeviceVtbl), wrote the regression test and fix, ran the workspace test suite and scripts/smoke.ps1 runs, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5478645088 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-24T19:12:21Z. --- `MFResetDXGIDeviceManagerX` previously tried calling `IMFDXGIDeviceManager::ResetDevice` directly with `pDevice` before checking whether `pDevice` implements `ID3D12Device`. Under XCL's `null` D3D12 backend (`NullObj::QueryInterface` answers `S_OK` to every IID, including `IID_ID3D11Device` and `IID_ID3D10Multithread`), system `mfplat.dll` accepted `NullObj` directly and stored it inside `IMFDXGIDeviceManager`, causing subsequent `LockDevice(IID_ID3D11Device)` calls to fail with `MF_E_UNEXPECTED` (`0xC00D36BB`). In addition, `MFResetDXGIDeviceManagerX` created a new companion `ID3D11Device` (`D3D11CreateDevice` + `VIDEO_SUPPORT`) on every call rather than reusing the companion D3D11 device for the adapter LUID. **What is in it** - `crates/xcl/src/hle/mfplat.rs`: check `device_unk.cast::<ID3D12Device>()` before falling back to direct `IMFDXGIDeviceManager::ResetDevice`, cache multithread-protected companion `ID3D11Device` instances per adapter LUID (recreating only if `ID3D11Device::GetDeviceRemovedReason` at vtable slot 39 reports removal), and add `null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid` covering both the `null` D3D12 backend and hardware `ID3D12Device` LUID caching. **Tested** - Hardware / toolchain: AMD Radeon RX 9070 XT (driver `32.0.32015.16001`), AMD Ryzen 7 9800X3D, Windows 11 x64, `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`stable-x86_64-pc-windows-msvc`), debug (unit + workspace tests) and release (60 s title smoke). - `cargo test -p xcl --lib mfplat`: 4 passed, 0 failed, 0 ignored (`null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid` verified failing with `0xC00D36BB` (`MF_E_UNEXPECTED`) before the fix). - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: 777 passed, 0 failed, 41 ignored (SKIPPED GPU/SDK tests: 3 — `test_title_draws_with_a_root_signature_under_the_debug_layer`: no `d3d12SDKLayers.dll`; `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows; `uploads_start_from_each_subresources_state`: no D3D12 debug layer). **Regression run** `main` (`9e3831e1f570d3646e53ab753b19ec07eb8f1485`): ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1677 (PresentX 1677) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14728 MB ``` PR (`8c441777a6c06197b00baca498790ae02f4154f5`): ``` xcl-smoke v1 commit: 8c441777a6c06197b00baca498790ae02f4154f5 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1673 (PresentX 1673) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` **Not tested** - Retail titles exercising hardware Media Foundation video playback (`MFResetDXGIDeviceManagerX` + `MFSourceReader` / hardware MFTs) under `graphics = "null"` or Linux / Wine. - D3D12 SDK debug-layer tests (`d3d12SDKLayers.dll` not installed on this machine). **AI use** - Antigravity (Google DeepMind, Gemini 4 Carbon): audited `mfplat.rs` and `d3d11.h` (`ID3D11DeviceVtbl`), wrote the regression test and fix, ran the workspace test suite and `scripts/smoke.ps1` runs, and drafted this PR description.
DavidM1911 commented 2026-11-24 22:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T21:37:43Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7145180770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677#issuecomment-7145180770). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T21:37:43Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
frenziedcoder commented 2026-11-24 22:06:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by frenziedcoder on 2026-11-24T21:54:42Z.


NVIDIA test report for 8c44177: the full workspace and a smoke pair on the retail title, next to @DavidM1911's RTX 3060 Ti library run above. Full suite green, the PR's own test passes, and a clean smoke pair (1654 vs 1655 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 8c441777a6c06197b00baca498790ae02f4154f5, no local changes.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug): 777 passed, 0 failed, 41 ignored; the PR's own test passes. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • test_title_draws_with_a_root_signature_under_the_debug_layer reports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307)

base (9e3831e, this PR's merge base with main):

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1655 (PresentX 1655)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14601 MB

this PR:

xcl-smoke v1
commit: 8c441777a6c06197b00baca498790ae02f4154f5
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14604 MB

Not tested: hardware Media Foundation video playback; graphics = "null"; the debug-layer test (see above); Linux / Wine; AMD.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7145551170 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677#issuecomment-7145551170). Originally posted by [frenziedcoder](https://github.com/frenziedcoder) on 2026-11-24T21:54:42Z. --- **NVIDIA test report for `8c44177`: the full workspace and a smoke pair on the retail title, next to @DavidM1911's RTX 3060 Ti library run above. Full suite green, the PR's own test passes, and a clean smoke pair (1654 vs 1655 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `8c441777a6c06197b00baca498790ae02f4154f5`, no local changes. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug): **777 passed, 0 failed, 41 ignored**; the PR's own test passes. SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `test_title_draws_with_a_root_signature_under_the_debug_layer` reports ok, but this machine has no D3D12 debug layer (`debug layer requested but unavailable … (0x887A002D)`), so it ran without the layer and is no evidence either way. **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307) base (`9e3831e`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1655 (PresentX 1655) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14601 MB ``` this PR: ``` xcl-smoke v1 commit: 8c441777a6c06197b00baca498790ae02f4154f5 gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1654 (PresentX 1654) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14604 MB ``` **Not tested:** hardware Media Foundation video playback; `graphics = "null"`; the debug-layer test (see above); Linux / Wine; AMD. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
JJAutoCompare commented 2026-11-25 05:08:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:38:03Z.


XCL PR #1677 verification

Head 8c441777a6c06197b00baca498790ae02f4154f5, clean detached checkout. The PR changes crates/xcl/src/hle/mfplat.rs only.

STOR-WINLAB ran Windows 11 Enterprise Evaluation x64, build 26200, on an AMD Family 23 Model 113 CPU with Intel Arc A770 Graphics and driver 32.0.101.9175. DXC was 1.9.2609.5. Rust was 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc).

Tested

  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the Arc mutex. The latter built 19 test executables.
  • cargo test -p xcl --lib hle::mfplat::tests -- --test-threads=1 ran under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770. All 4 passed, with 0 failed, 0 ignored and no skip markers. For both null and hardware D3D12 inputs, the new test locked a genuine D3D11 device and confirmed the same COM identity across two Media Foundation managers for each LUID. The token test rejected an invalid token and checked device-handle usability after a valid reset. The other tests checked null arguments and export routing.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the same mutex and adapter setting with RUST_TEST_NOCAPTURE=1. Cargo exited 101. The 20 summaries in pr1677-suite.log cover 19 test binaries and 1 doctest target and total 761 passed, 16 failed and 41 ignored. The bundled title logged a passing MFPlat reset check.

Workspace failures and skips

The library had 15 shader-recompiler failures. Eleven reported CreateComputePipelineState returning 0x80070057, and four reported output mismatches. The end-to-end title test failed its dynamic depth-bias check. The log contains 6 lines beginning with SKIPPED . Two cited wave64, two cited the D3D12 debug layer, one cited tiled resource tier and one cited heap windows. Those skips provide no coverage.

Not tested

A matched main run, retail-title smoke or playback, other GPU vendors, and forced device removal during a companion reset.

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 pr1677-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153023092 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677#issuecomment-7153023092). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:38:03Z. --- # XCL PR #1677 verification Head `8c441777a6c06197b00baca498790ae02f4154f5`, clean detached checkout. The PR changes `crates/xcl/src/hle/mfplat.rs` only. STOR-WINLAB ran Windows 11 Enterprise Evaluation x64, build 26200, on an AMD Family 23 Model 113 CPU with Intel Arc A770 Graphics and driver 32.0.101.9175. DXC was 1.9.2609.5. Rust was 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0 outside the Arc mutex. The latter built 19 test executables. - `cargo test -p xcl --lib hle::mfplat::tests -- --test-threads=1` ran under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770`. All 4 passed, with 0 failed, 0 ignored and no skip markers. For both null and hardware D3D12 inputs, the new test locked a genuine D3D11 device and confirmed the same COM identity across two Media Foundation managers for each LUID. The token test rejected an invalid token and checked device-handle usability after a valid reset. The other tests checked null arguments and export routing. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the same mutex and adapter setting with `RUST_TEST_NOCAPTURE=1`. Cargo exited 101. The 20 summaries in `pr1677-suite.log` cover 19 test binaries and 1 doctest target and total 761 passed, 16 failed and 41 ignored. The bundled title logged a passing MFPlat reset check. **Workspace failures and skips** The library had 15 shader-recompiler failures. Eleven reported `CreateComputePipelineState` returning `0x80070057`, and four reported output mismatches. The end-to-end title test failed its dynamic depth-bias check. The log contains 6 lines beginning with `SKIPPED `. Two cited wave64, two cited the D3D12 debug layer, one cited tiled resource tier and one cited heap windows. Those skips provide no coverage. **Not tested** A matched main run, retail-title smoke or playback, other GPU vendors, and forced device removal during a companion reset. **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 `pr1677-suite.log` and published.
futurepro62 commented 2026-11-26 17:18:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T17:18:14Z.


NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, frenziedcoder, since none of them covers AMD. Tested exact head 8c441777 (on its base 9e3831e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 776 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 777 passed, 0 failed, 41 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 8b957bec too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7198798365 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677#issuecomment-7198798365). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T17:18:14Z. --- NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, frenziedcoder, since none of them covers AMD. Tested exact head `8c441777` (on its base `9e3831e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **776 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `null_d3d12_device_bridges_to_real_d3d11_and_reuses_companion_per_luid`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **777 passed, 0 failed, 41 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `8b957bec` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Foniass commented 2026-12-01 06:29:03 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 8c44177

No open or merged PR makes the same change (main's MFResetDXGIDeviceManagerX in crates/xcl/src/hle/mfplat.rs still tries the direct ResetDevice first, which the null backend's every-IID QueryInterface passes).
Points in the diff: a real ID3D12Device is now always bridged to the companion D3D11 device, even on Windows builds whose manager accepts it directly, so a title that later locks the device as ID3D12Device gets a D3D11 one. In d3d11_bridge_for_luid, the cached pointer is used outside the lock (d3d11_device_alive on a borrowed raw pointer) while another thread may remove and release it. HLE: is not one of the repository's commit areas.
Recommendation: keep open.

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

<!-- greyfinch-sync:ivall/xcl:comment:7302925917 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1677#issuecomment-7302925917). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:29:03Z. --- **Triage (#1607)** – head 8c44177 No open or merged PR makes the same change (main's `MFResetDXGIDeviceManagerX` in `crates/xcl/src/hle/mfplat.rs` still tries the direct `ResetDevice` first, which the null backend's every-IID `QueryInterface` passes). Points in the diff: a real `ID3D12Device` is now always bridged to the companion D3D11 device, even on Windows builds whose manager accepts it directly, so a title that later locks the device as `ID3D12Device` gets a D3D11 one. In `d3d11_bridge_for_luid`, the cached pointer is used outside the lock (`d3d11_device_alive` on a borrowed raw pointer) while another thread may remove and release it. `HLE:` is not one of the repository's commit areas. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1677:upstream-pr/1677'
git switch 'upstream-pr/1677'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1677'
git switch 'upstream-pr/1677'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1677'
git switch 'upstream-pr/1677'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1677'
git switch 'main'
git merge --squash 'upstream-pr/1677'
git switch 'main'
git merge --ff-only 'upstream-pr/1677'
git switch 'main'
git merge 'upstream-pr/1677'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1667
No description provided.