D3D12.X: a stage the PC cannot run goes to the fallback without the driver #745

Open
Lucasyudi wants to merge 1 commit from upstream-pr/750 into main
Lucasyudi commented 2026-11-24 04:35:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lucasyudi on 2026-11-24T04:35:36Z.


A graphics pipeline whose shaders XCL does not translate is handed to the driver as it came; the stand-in shaders are used when the driver refuses it. Windows drivers refuse a stage that is neither DXIL nor SM5 byte code, but Apple's D3DMetal (macOS under CrossOver) dereferences null parsing a container it does not know, and the process dies. Part of #258.

What is in it

  • gpu/shader.rs: runs_on_pc(blob), from the existing classify: DXIL or DXBC with SM5 byte code; a unit test for it.
  • hle/d3d12x/real.rs: graphics_pso skips the driver call when a stage fails runs_on_pc and goes to the fallback with E_INVALIDARG, the result a Windows driver gives. On Windows the outcome is the same pipeline (the stand-ins), one driver call fewer.

Tested

  • Apple M4 Pro (24 GB), macOS 27.2.1, CrossOver 26.3 with D3DMetal, Rosetta 2. xcl.exe cross-built with mingw-w64 (GCC 16.2.0), Rust 1.100.0, debug. DXC 1.9.2609.
  • Without XCL: a 60-line D3D12 program (mingw, D3D12CreateDevice + CreateGraphicsPipelineState) on the same host gets S_OK for a vs_5_0 / ps_5_0 pipeline and dies (write to 0 in ntdll, after a read at null+0x18 in D3DMetal) for the same pipeline with a 56-byte DXBC container holding only an XBOX part, which is what the test title's console_container() builds.
  • cargo test -p xcl --lib gpu::shader::: only_pc_shaders_run_on_pc fails before the change (stub) and passes after. readable_answers_from_the_working_set_without_touching_pages fails on this host, on main (91f9a5e) as well.
  • cargo test --test e2e (the test title): on main the title dies in "shaders captured; console shader gets a fallback PSO" (31 PASS before it). With this commit that check and the retail-format one pass (32 PASS); the title then dies later in render_triangle, calling past the end of a D3DMetal vtable. That is what @Ahmet-Dedeler's mac-on-main-wip handles: his branch (db065d8) alone dies at the same fallback PSO check; with this commit on top, the title runs to its end, 47 PASS, 3 FAIL (no GPU timestamp; window not cloaked; XMA2 GetState ctx=0).
  • Head 6569928, rebased onto main 64b3f35: the unit test and the e2e counts above are the same.
  • Runs by others on this head against 64b3f35 (on the PR): @juliptree, native Windows, RTX 5060 Ti, MSVC: gpu::shader:: 4 passed on base, 5 on the PR; both e2e tests pass on each (50/50 title checks, the fallback PSO and the triangle readback included). @us3r40456 (M5 Pro, cargo-xwin MSVC) and @shortside (M5 Pro, clang-cl / xwin): on base the title dies at the console shader, on the head both fallback pipelines are made and it dies later at the D3DMetal vtable crash, as above.
  • The hle::d3d12x unit tests stop at the first test that creates a device on this host, on main and with this commit alike.

Regression run

Run by @Anon64 on a retail title, 60 s each, scripts/smoke.ps1, release, clean tree at each commit (NVIDIA GeForce RTX 3060 12 GB, driver 581.80, Windows 11 25H2), pasted unedited from https://github.com/ivall/xcl/pull/750#issuecomment-7124835219:

main:

xcl-smoke v1
commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1649 (PresentX 1649)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16734 MB

this PR:

xcl-smoke v1
commit: 6569928c24d157bc0c03a8a6de655e2a94378c81
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16740 MB

Not tested

  • On my side, Windows: not built with MSVC. The Windows runs above are other people's; none of them is the whole suite (cargo test --workspace) on this head.
  • Whether the retail title in the smoke pair reaches the changed check (a console stage in a graphics pipeline); it is a regression check only.
  • cargo test --workspace as a whole on this host (it does not finish under CrossOver, as reported in #258).

AI use

  • Claude Code with Claude Opus 5.5 (claude-opus-5-5): found the cause, wrote the change, the test and the probe, ran the tests above.
<!-- greyfinch-sync:ivall/xcl:issue:5466153523 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750). Originally posted by [Lucasyudi](https://github.com/Lucasyudi) on 2026-11-24T04:35:36Z. --- A graphics pipeline whose shaders XCL does not translate is handed to the driver as it came; the stand-in shaders are used when the driver refuses it. Windows drivers refuse a stage that is neither DXIL nor SM5 byte code, but Apple's D3DMetal (macOS under CrossOver) dereferences null parsing a container it does not know, and the process dies. Part of #258. **What is in it** - `gpu/shader.rs`: `runs_on_pc(blob)`, from the existing `classify`: DXIL or DXBC with SM5 byte code; a unit test for it. - `hle/d3d12x/real.rs`: `graphics_pso` skips the driver call when a stage fails `runs_on_pc` and goes to the fallback with `E_INVALIDARG`, the result a Windows driver gives. On Windows the outcome is the same pipeline (the stand-ins), one driver call fewer. **Tested** - Apple M4 Pro (24 GB), macOS 27.2.1, CrossOver 26.3 with D3DMetal, Rosetta 2. `xcl.exe` cross-built with mingw-w64 (GCC 16.2.0), Rust 1.100.0, debug. DXC 1.9.2609. - Without XCL: a 60-line D3D12 program (mingw, `D3D12CreateDevice` + `CreateGraphicsPipelineState`) on the same host gets `S_OK` for a vs_5_0 / ps_5_0 pipeline and dies (write to 0 in `ntdll`, after a read at null+0x18 in D3DMetal) for the same pipeline with a 56-byte DXBC container holding only an `XBOX` part, which is what the test title's `console_container()` builds. - `cargo test -p xcl --lib gpu::shader::`: `only_pc_shaders_run_on_pc` fails before the change (stub) and passes after. `readable_answers_from_the_working_set_without_touching_pages` fails on this host, on `main` (91f9a5e) as well. - `cargo test --test e2e` (the test title): on `main` the title dies in "shaders captured; console shader gets a fallback PSO" (31 PASS before it). With this commit that check and the retail-format one pass (32 PASS); the title then dies later in `render_triangle`, calling past the end of a D3DMetal vtable. That is what @Ahmet-Dedeler's `mac-on-main-wip` handles: his branch (db065d8) alone dies at the same fallback PSO check; with this commit on top, the title runs to its end, 47 PASS, 3 FAIL (no GPU timestamp; window not cloaked; XMA2 `GetState` ctx=0). - Head 6569928, rebased onto `main` 64b3f35: the unit test and the e2e counts above are the same. - Runs by others on this head against `64b3f35` (on the PR): @juliptree, native Windows, RTX 5060 Ti, MSVC: `gpu::shader::` 4 passed on base, 5 on the PR; both e2e tests pass on each (50/50 title checks, the fallback PSO and the triangle readback included). @us3r40456 (M5 Pro, cargo-xwin MSVC) and @shortside (M5 Pro, clang-cl / xwin): on base the title dies at the console shader, on the head both fallback pipelines are made and it dies later at the D3DMetal vtable crash, as above. - The `hle::d3d12x` unit tests stop at the first test that creates a device on this host, on `main` and with this commit alike. **Regression run** Run by @Anon64 on a retail title, 60 s each, `scripts/smoke.ps1`, release, clean tree at each commit (NVIDIA GeForce RTX 3060 12 GB, driver 581.80, Windows 11 25H2), pasted unedited from https://github.com/ivall/xcl/pull/750#issuecomment-7124835219: main: ``` xcl-smoke v1 commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1649 (PresentX 1649) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16734 MB ``` this PR: ``` xcl-smoke v1 commit: 6569928c24d157bc0c03a8a6de655e2a94378c81 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1647 (PresentX 1647) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16740 MB ``` **Not tested** - On my side, Windows: not built with MSVC. The Windows runs above are other people's; none of them is the whole suite (`cargo test --workspace`) on this head. - Whether the retail title in the smoke pair reaches the changed check (a console stage in a graphics pipeline); it is a regression check only. - `cargo test --workspace` as a whole on this host (it does not finish under CrossOver, as reported in #258). **AI use** - Claude Code with Claude Opus 5.5 (`claude-opus-5-5`): found the cause, wrote the change, the test and the probe, ran the tests above.
Lucasyudi commented 2026-11-24 07:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lucasyudi on 2026-11-24T04:44:38Z.


@Kalmarv if your offer on #258 covers this one too: it touches the shared PSO path, so it needs a Windows pair. Head 6569928 on main 64b3f35. I have no retail title here. Thanks!

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7122297374 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7122297374). Originally posted by [Lucasyudi](https://github.com/Lucasyudi) on 2026-11-24T04:44:38Z. --- @Kalmarv if your offer on #258 covers this one too: it touches the shared PSO path, so it needs a Windows pair. Head 6569928 on `main` 64b3f35. I have no retail title here. Thanks! AI-assisted (Claude Code, Claude Opus 5.5).
juliptree commented 2026-11-24 07:06:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by juliptree on 2026-11-24T06:31:09Z.


Independent native Windows validation of base 64b3f355 and PR head 6569928c using Rust 1.100.0 MSVC. XCL’s runtime logs confirmed the RTX 5060 Ti on NVIDIA driver 616.92 as the D3D12 adapter for both runs.

  • gpu::shader:: library tests passed: 4 on base, 5 on the PR.
  • Both synthetic e2e tests executed and passed on each revision, with 50/50 synthetic title checks. The console shader fallback PSO and the normal triangle render and readback both ran and passed.
  • The D3D12 debug-layer case explicitly skipped on both revisions because d3d12SDKLayers.dll was unavailable. Cargo counted that early return as a third e2e pass. No other explicit skips.
    Synthetic fixtures only. No retail smoke run. AI-assisted validation and write-up by Codex.
<!-- greyfinch-sync:ivall/xcl:comment:7124016695 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7124016695). Originally posted by [juliptree](https://github.com/juliptree) on 2026-11-24T06:31:09Z. --- Independent native Windows validation of base 64b3f355 and PR head 6569928c using Rust 1.100.0 MSVC. XCL’s runtime logs confirmed the RTX 5060 Ti on NVIDIA driver 616.92 as the D3D12 adapter for both runs. - gpu::shader:: library tests passed: 4 on base, 5 on the PR. - Both synthetic e2e tests executed and passed on each revision, with 50/50 synthetic title checks. The console shader fallback PSO and the normal triangle render and readback both ran and passed. - The D3D12 debug-layer case explicitly skipped on both revisions because d3d12SDKLayers.dll was unavailable. Cargo counted that early return as a third e2e pass. No other explicit skips. Synthetic fixtures only. No retail smoke run. AI-assisted validation and write-up by Codex.
Anon64 commented 2026-11-24 08:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:17:53Z.


Regression runs for this PR's head 6569928 and for its base main 64b3f35, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

xcl-smoke v1
commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1649 (PresentX 1649)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16734 MB

this PR:

xcl-smoke v1
commit: 6569928c24d157bc0c03a8a6de655e2a94378c81
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16740 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0

Not tested

  • the unit tests on this machine
  • whether the title reaches the changed code; this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7124835219 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7124835219). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T07:17:53Z. --- Regression runs for this PR's head `6569928` and for its base `main` `64b3f35`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1649 (PresentX 1649) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16734 MB ``` this PR: ``` xcl-smoke v1 commit: 6569928c24d157bc0c03a8a6de655e2a94378c81 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1647 (PresentX 1647) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16740 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0 **Not tested** - the unit tests on this machine - whether the title reaches the changed code; this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
us3r40456 commented 2026-11-24 12:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by us3r40456 on 2026-11-24T11:47:13Z.


Tested on an Apple Silicon Mac. I compared the head 6569928 with its base 64b3f35, both on main (no Mac port branch).

Tested

  • MacBook Pro, Apple M5 Pro (20-core GPU), 24 GB, macOS 27.2.1, Rosetta 2. CrossOver 26.3.0.39832 with D3DMetal 3.0. MSVC debug build, cross-built with cargo-xwin 0.24.1 (Rust 1.100.0, clang-cl / lld 23.1.6). DXC 1.9.2609 (XCL_DXC_DIR). Builds with no new warning.
  • tests/e2e.rs, test_title_runs_and_game_folder_is_untouched:
    • On the base, the test title gets 29 [PASS]. It then dies right after capturing its console pixel shader (the [XBOX] container), on a write to address 0: the D3DMetal null dereference described in #258.
    • With this PR, it gets 33 [PASS], among them D3D12.X: shaders captured; console shader gets a fallback PSO and D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO. It then dies further on, executing at 0x1b84800000af0, right after the title-texture setup (ID3D12Resource2 – 17 PC methods …).
    • With Ahmet-Dedeler's pr/native-host-vtables (ddf3be7) merged on top locally, it gets 32 [PASS] and dies inside D3DMetal, in D3D12GraphicsCommandList::IASetIndexBuffer (+0x129, a read at 0xa8).
    • So the step this PR targets passes on this host. On main, the test title needs more of the Mac port to reach its end.
    • The two storage checks (pls dir S:\, create S:/Users/xcl/games) failed on the base run and passed on the PR run. The e2e test reuses its data folder between runs, so I don't count that difference.
  • gpu::shader::: 3 passed and 1 failed on the base, 4 passed and 1 failed with this PR. The new test passes. The failure on both is readable_answers_from_the_working_set_without_touching_pages.
  • hle::d3d12x::real::: 18 passed on both.

Not tested

  • Windows, the rest of the suite, and mac-on-main-wip.

AI use

  • Claude Code, Claude Opus 5.5 ran these tests on this machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7130547525 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7130547525). Originally posted by [us3r40456](https://github.com/us3r40456) on 2026-11-24T11:47:13Z. --- Tested on an Apple Silicon Mac. I compared the head 6569928 with its base 64b3f35, both on `main` (no Mac port branch). **Tested** - MacBook Pro, Apple M5 Pro (20-core GPU), 24 GB, macOS 27.2.1, Rosetta 2. CrossOver 26.3.0.39832 with D3DMetal 3.0. MSVC debug build, cross-built with cargo-xwin 0.24.1 (Rust 1.100.0, clang-cl / lld 23.1.6). DXC 1.9.2609 (`XCL_DXC_DIR`). Builds with no new warning. - `tests/e2e.rs`, `test_title_runs_and_game_folder_is_untouched`: - On the base, the test title gets 29 `[PASS]`. It then dies right after capturing its console pixel shader (the `[XBOX]` container), on a write to address 0: the D3DMetal null dereference described in #258. - With this PR, it gets 33 `[PASS]`, among them `D3D12.X: shaders captured; console shader gets a fallback PSO` and `D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO`. It then dies further on, executing at `0x1b84800000af0`, right after the title-texture setup (`ID3D12Resource2 – 17 PC methods …`). - With Ahmet-Dedeler's `pr/native-host-vtables` (ddf3be7) merged on top locally, it gets 32 `[PASS]` and dies inside D3DMetal, in `D3D12GraphicsCommandList::IASetIndexBuffer` (+0x129, a read at 0xa8). - So the step this PR targets passes on this host. On `main`, the test title needs more of the Mac port to reach its end. - The two storage checks (`pls dir S:\`, `create S:/Users/xcl/games`) failed on the base run and passed on the PR run. The e2e test reuses its data folder between runs, so I don't count that difference. - `gpu::shader::`: 3 passed and 1 failed on the base, 4 passed and 1 failed with this PR. The new test passes. The failure on both is `readable_answers_from_the_working_set_without_touching_pages`. - `hle::d3d12x::real::`: 18 passed on both. **Not tested** - Windows, the rest of the suite, and `mac-on-main-wip`. **AI use** - Claude Code, Claude Opus 5.5 ran these tests on this machine and wrote this report.
shortside commented 2026-11-24 12:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T11:57:03Z.


Test report from a second Mac, head 6569928 against its merge base 64b3f35.

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for x86_64-pc-windows-msvc with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (--exact --nocapture, 60 s cap).
  • gpu::shader:: lib tests: base 3 passed, 1 failed; head 4 passed (only_pc_shaders_run_on_pc is new), 1 failed. The failure is readable_answers_from_the_working_set_without_touching_pages on both, as your description says.
  • The test title (tests/e2e.rs, fresh data folder): on base it dies right after "D3D12.X: queue + fence signal on the GPU", 2 of 2 runs (31 PASS before it). On head, 1 run: xcl.log shows both fallback pipelines made ("graphics PSO rejected by the driver (0x80070057) – fallback shaders used" #1 and #2), and the title dies later with a page fault on execute access, which matches the D3DMetal vtable crash your description names. Wine's debugger then held the process past my 400 s cap, so I have no PASS count for the head run.

Not tested

  • Windows, the rest of the suite, any title, and the head + mac-on-main-wip stack as one tree in this run (I ran that stack earlier today for #996: the title reaches its end there).

AI use

  • Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7130760309 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7130760309). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T11:57:03Z. --- Test report from a second Mac, head `6569928` against its merge base `64b3f35`. **Tested** - MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for `x86_64-pc-windows-msvc` with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (`--exact --nocapture`, 60 s cap). - `gpu::shader::` lib tests: base 3 passed, 1 failed; head 4 passed (`only_pc_shaders_run_on_pc` is new), 1 failed. The failure is `readable_answers_from_the_working_set_without_touching_pages` on both, as your description says. - The test title (`tests/e2e.rs`, fresh data folder): on base it dies right after "D3D12.X: queue + fence signal on the GPU", 2 of 2 runs (31 PASS before it). On head, 1 run: `xcl.log` shows both fallback pipelines made ("graphics PSO rejected by the driver (0x80070057) – fallback shaders used" #1 and #2), and the title dies later with a page fault on execute access, which matches the D3DMetal vtable crash your description names. Wine's debugger then held the process past my 400 s cap, so I have no PASS count for the head run. **Not tested** - Windows, the rest of the suite, any title, and the head + `mac-on-main-wip` stack as one tree in this run (I ran that stack earlier today for #996: the title reaches its end there). **AI use** - Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.
Lucasyudi commented 2026-11-24 13:03:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lucasyudi on 2026-11-24T12:37:59Z.


@Anon64 @juliptree @us3r40456 @shortside thanks for the runs. The smoke pair is now under Regression run in the description (scripts/pr_check.py --local on it: "description ok"), and the other reports are summarised under Tested.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7131708887 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/750#issuecomment-7131708887). Originally posted by [Lucasyudi](https://github.com/Lucasyudi) on 2026-11-24T12:37:59Z. --- @Anon64 @juliptree @us3r40456 @shortside thanks for the runs. The smoke pair is now under **Regression run** in the description (`scripts/pr_check.py --local` on it: "description ok"), and the other reports are summarised under **Tested**. AI-assisted (Claude Code, Claude Opus 5.5).
JJAutoCompare commented 2026-11-25 06:06:05 +00:00 (Migrated from github.com)

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


Empirical test report (6569928c)

Tested xcl-dev/xcl PR #750 at 6569928c24d157bc0c03a8a6de655e2a94378c81 in a clean checkout.

Hardware / environment

  • Windows x64, build 10.0.26200.0. CPU reported as AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD. The focused fixture used no GPU.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) (x86_64-pc-windows-msvc). DXC reported dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).
  • The Cargo test profile was unoptimized, with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables. Cargo emitted a deprecation warning for AtomicU32::fetch_update in hle/xgameruntime/mod.rs.
  • cargo test -p xcl --lib gpu::shader::tests::only_pc_shaders_run_on_pc -- --exact exited 0 with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. It ran outside the Arc runner.
  • Focused log totals were 1 passed, 0 failed, 0 ignored, 0 skipped (681 filtered out). The skip count comes from case-sensitive SKIPPED markers.

Observed behavior

The CPU-only fixture confirmed that runs_on_pc accepted synthetic DXIL and SM5 (SHEX) containers. It rejected a DXBC container carrying an XBOX part with RDNA2 code, the raw RDNA2 bytes, and an ELF-prefixed blob. The assertions passed in a single library test.

Not tested

The full GPU workspace suite and game smoke runs were omitted. This run did not create a D3D12 graphics pipeline or verify that the runtime bypassed the driver and created a fallback pipeline. CrossOver and D3DMetal were outside this Windows test run.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr750-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154390563 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7154390563). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T06:03:05Z. --- ### Empirical test report (6569928c) Tested xcl-dev/xcl PR #750 at `6569928c24d157bc0c03a8a6de655e2a94378c81` in a clean checkout. **Hardware / environment** - Windows x64, build `10.0.26200.0`. CPU reported as `AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD`. The focused fixture used no GPU. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`x86_64-pc-windows-msvc`). DXC reported `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. - The Cargo test profile was unoptimized, with debug info and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables. Cargo emitted a deprecation warning for `AtomicU32::fetch_update` in `hle/xgameruntime/mod.rs`. - `cargo test -p xcl --lib gpu::shader::tests::only_pc_shaders_run_on_pc -- --exact` exited 0 with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. It ran outside the Arc runner. - Focused log totals were **1 passed, 0 failed, 0 ignored, 0 skipped** (681 filtered out). The skip count comes from case-sensitive `SKIPPED ` markers. **Observed behavior** The CPU-only fixture confirmed that `runs_on_pc` accepted synthetic DXIL and SM5 (`SHEX`) containers. It rejected a DXBC container carrying an `XBOX` part with RDNA2 code, the raw RDNA2 bytes, and an ELF-prefixed blob. The assertions passed in a single library test. **Not tested** The full GPU workspace suite and game smoke runs were omitted. This run did not create a D3D12 graphics pipeline or verify that the runtime bypassed the driver and created a fallback pipeline. CrossOver and D3DMetal were outside this Windows test run. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr750-focused.log` and published.
DavidM1911 commented 2026-11-25 12:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T11:28:49Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7161101677 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7161101677). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T11:28:49Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
vakaobr commented 2026-11-25 16:12:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-25T16:09:44Z.


Tested 6569928 on a Mac: it fixes the e2e test title's crash there.

Tested (MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 x86_64-pc-windows-gnu, debug, DXC 1.9.2609). Cherry-picked cleanly onto the Mac branch from #258 (mac7 + the open Mac fixes, vakaobr/xcl mac/integration, now at 7458fc6), not onto main.

  • Without it, e2e::test_title_runs_and_game_folder_is_untouched died 0.84 s in on 3 trees I tried (5 of 6 runs; the sixth hung until its 300 s limit). XCL_TRACE_EXCEPTIONS=1 shows the order: a read at 0x18 in D3DMetal's code under CreateGraphicsPipelineState (the PC VS + the 56-byte XBOX PS), then 23 nested faults at ntdll.dll+0x38d55 (in RtlVirtualUnwind2) while Wine tries to unwind through D3DMetal's frames.
  • With it, 2 of 2 runs: no crash, the title runs all its checks and exits with its own code, and the log has graphics PSO rejected by the driver (0x80070057) – fallback shaders used twice. Both D3D12.X fallback checks pass (console shader gets a fallback PSO, retail-format console shader … captured + fallback PSO). The test still fails on checks unrelated to this: user32 … not cloaked (Wine), XAudio2 … Opus GetState: ctx=0x0 and, in 1 of the 2 runs, the S: storage checks.
  • gpu::shader::tests, each in its own process: 4 passed (only_pc_shaders_run_on_pc among them), 1 SKIPPED (readable_answers_from_the_working_set_without_touching_pages: this host reports no working set).

Not tested: Windows, main itself, a retail title.

AI use: Claude Code with Claude Opus 5.5 ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7167647275 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7167647275). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-25T16:09:44Z. --- Tested `6569928` on a Mac: it fixes the e2e test title's crash there. **Tested** (MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 `x86_64-pc-windows-gnu`, debug, DXC 1.9.2609). Cherry-picked cleanly onto the Mac branch from #258 (`mac7` + the open Mac fixes, `vakaobr/xcl` `mac/integration`, now at `7458fc6`), not onto `main`. - Without it, `e2e::test_title_runs_and_game_folder_is_untouched` died 0.84 s in on 3 trees I tried (5 of 6 runs; the sixth hung until its 300 s limit). `XCL_TRACE_EXCEPTIONS=1` shows the order: a read at `0x18` in D3DMetal's code under `CreateGraphicsPipelineState` (the PC VS + the 56-byte `XBOX` PS), then 23 nested faults at `ntdll.dll+0x38d55` (in `RtlVirtualUnwind2`) while Wine tries to unwind through D3DMetal's frames. - With it, 2 of 2 runs: no crash, the title runs all its checks and exits with its own code, and the log has `graphics PSO rejected by the driver (0x80070057) – fallback shaders used` twice. Both D3D12.X fallback checks pass (`console shader gets a fallback PSO`, `retail-format console shader … captured + fallback PSO`). The test still fails on checks unrelated to this: `user32 … not cloaked` (Wine), `XAudio2 … Opus GetState: ctx=0x0` and, in 1 of the 2 runs, the `S:` storage checks. - `gpu::shader::tests`, each in its own process: 4 passed (`only_pc_shaders_run_on_pc` among them), 1 SKIPPED (`readable_answers_from_the_working_set_without_touching_pages`: this host reports no working set). **Not tested:** Windows, `main` itself, a retail title. AI use: Claude Code with Claude Opus 5.5 ran the tests and wrote this report.
github-actions[bot] commented 2026-11-29 07:43:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:44Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252653149 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7252653149). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:43:44Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Lucasyudi commented 2026-11-29 15:50:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lucasyudi on 2026-11-29T15:50:31Z.


Still waiting for a maintainer review. It still fixes the crash on D3DMetal when a pipeline's stage is not DXIL / DXBC (the e2e title test; confirmed on a Mac by @vakaobr, and it is in his mac/integration), and it merges cleanly into main.

<!-- greyfinch-sync:ivall/xcl:comment:7258410424 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7258410424). Originally posted by [Lucasyudi](https://github.com/Lucasyudi) on 2026-11-29T15:50:31Z. --- Still waiting for a maintainer review. It still fixes the crash on D3DMetal when a pipeline's stage is not DXIL / DXBC (the e2e title test; confirmed on a Mac by @vakaobr, and it is in his `mac/integration`), and it merges cleanly into `main`.
Foniass commented 2026-12-01 04:03:54 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 6569928

No other open PR (including the other #258 macOS / D3DMetal PRs) skips the driver call for non-PC stages in graphics_pso. shader::runs_on_pc is new, and main still hands an untranslated desc to the driver first.
One behaviour change on Windows: runs_on_pc is false for Kind::XboxNative (DXIL + XDAT), so an untranslated console DXIL stage now always gets the stand-ins instead of going to the driver first. Per the description and the smoke run, the outcome on Windows is the same.
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:7300342196 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/750#issuecomment-7300342196). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:03:54Z. --- **Triage (#1607)** – head 6569928 No other open PR (including the other #258 macOS / D3DMetal PRs) skips the driver call for non-PC stages in `graphics_pso`. `shader::runs_on_pc` is new, and main still hands an untranslated desc to the driver first. One behaviour change on Windows: `runs_on_pc` is false for `Kind::XboxNative` (DXIL + XDAT), so an untranslated console DXIL stage now always gets the stand-ins instead of going to the driver first. Per the description and the smoke run, the outcome on Windows is the same. 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/750:upstream-pr/750'
git switch 'upstream-pr/750'

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/750'
git switch 'upstream-pr/750'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/750'
git switch 'upstream-pr/750'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/750'
git switch 'main'
git merge --squash 'upstream-pr/750'
git switch 'main'
git merge --ff-only 'upstream-pr/750'
git switch 'main'
git merge 'upstream-pr/750'
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!745
No description provided.