D3D12.X: log adapter device creation failures #653
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!653
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/653/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@vascomfduarte on GitHub · 2026-11-24 02:54 UTC · original
vascomfduarte:fix/d3d12-adapter-error-logging→main· +13 −4 · 1 files · 1 commits · closed without mergingWhat is in it
Log adapter-specific D3D12 device creation failures in
crates/xcl/src/hle/d3d12x/real.rs.Previously, failed device creation attempts were silently ignored. This change logs the adapter name and returned error without changing adapter selection or WARP fallback behavior.
Tested
Local validation — AMD RX 6700 XT
cargo check -p xcl— passed.git diff --check— passed.Regression comparison
9ce2070.d4c55a7.Pre-existing failures on the RX 6700 XT:
placed_title_textures_share_vram_and_preserve_pixels— 3D texture subresource 2 mismatch.transitions_apply_when_their_list_is_submitted—PoisonError.d32s8_targets_take_their_own_size_of_video_memory—PoisonError.Independent validation — @Chrysana
cargo test --workspace --no-fail-fast -- --test-threads=4ond4c55a7— 684 passed, 0 failed, 41 ignored.Regression run
Retail-title smoke tests performed by @Chrysana on an AMD Radeon RX 9070 XT using
scripts/smoke.ps1for 60 seconds, with the same saved state andXCL_PRESS_A_AT=14,17,21.Baseline —
main(91f9a5e)PR head —
d4c55a7Both runs reached the intro video, with no crashes or device removals.
Additional regression comparison — local merge onto newer
mainChrysana also tested a clean local merge of this PR onto
main(91f9a5e).main(91f9a5e)d974fba) — run 1d974fba) — run 2No meaningful regression in frame count, memory usage or stability was observed.
Note: The original PR head (
d4c55a7) is based on an older revision ofmain, so its higher frame count should not be attributed to the logging change. The local merge was not pushed.All retail-title smoke results were produced by Chrysana, not on my own hardware.
Source: Chrysana's regression report
Not tested
E_INVALIDARGfailure caused by an incompatibled3d12SDKLayers.dll.XCL_SAMPLE_*tests (sample assets unavailable).AI use
ChatGPT (GPT-6) and Codex assisted with debugging, code review, test analysis and PR preparation. I reviewed the code and validated the results from my own environment.
The independent tests and smoke runs were performed by @Chrysana on their own hardware, with assistance from Claude Code (Claude Opus 5.5) for test execution, log analysis and reporting.
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@MonkeyPython on GitHub · 2026-11-24 02:59 UTC · original
Cross-vendor data point: the four tests reported failing on AMD are green on NVIDIA wave32 — they are not flaky fixtures.
Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01, wave32-only), main
dd2ae9a, release,cargo test --workspace --release -- --test-threads=4: 690 passed / 0 failed / 41 ignored, 2 internalSKIPPED(the wave64 pair).All four pass here:
hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels ... okhle::d3d12x::title_textures::tests::transitions_apply_when_their_list_is_submitted ... okhle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory ... okgpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction ... okSo the failures in this PR and in #602's author's RX 5700 XT report are vendor-specific (AMD), not test-instability. Also for the #650/#656 choice:
hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory ... okon this adapter at this commit.Not tested: AMD GPUs (this host's Raphael iGPU is a separate, much smaller adapter).
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the suite and wrote this report from its log; a human reviews it before posting. No code changes.
@MesshM on GitHub · 2026-11-24 03:24 UTC · original
Test run of
d4c55a775ac7212af1a785c33ba5a723ae786382on AMD RDNA4. I merged it onto currentmain91f9a5elocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 692 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 652 passed, 0 failed, 21 ignoredSKIPPED; no test failed here.Review: The three failures in the description (RX 6700 XT, on both versions) do not show up on RDNA4: the whole suite passes on this adapter. One thing to consider: on a machine with an adapter that cannot do feature level 12_0 (an old iGPU next to the discrete GPU), the new warning is logged at every start for an expected failure; logging it only when no adapter at all succeeds, or at info level, would keep it useful. Not a blocker.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@Chrysana on GitHub · 2026-11-24 03:51 UTC · original
Regression run for
d4c55a7on the retail title, which the description lists as not performed. AMD RDNA4: no regression, and no new warning when the GPU opens normally.Setup: AMD Radeon RX 9070 XT 16 GB, driver 32.0.32015.2008 (the CPU's integrated Radeon is also present; XCL opened the RX 9070 XT first), Ryzen 7 9800X3D, 31 GB RAM, Windows 11 25H2 build 26200.9974, rustc 1.100.0
x86_64-pc-windows-msvc, DXC 1.9.2602.17, no Agility SDK. Retail title 1.0.2.1. Debug build for the tests, release builds for the runs.Tests:
cargo test --workspace --no-fail-fast -- --test-threads=4atd4c55a7: 684 passed, 0 failed, 41 ignored.SKIPPED: the two debug-layer tests (the D3D12 debug layer isn't installed here).Title runs:
scripts/smoke.ps1 -Game <folder> -Seconds 60withXCL_PRESS_A_AT=14,17,21, same saved state.d4c55a7is 18 commits behindmain, so it was also merged ontomain91f9a5e(clean, local merged974fba, not pushed):main91f9a5ed4c55a7merged onto91f9a5ed4c55a7(its own base9ce2070)mainrun stayed in the menus (1176 frames, the scripted presses came too early) and isn't compared.D3D12: failed to initialize GPUline in any run: the first adapter opened every time.Regression run:
main:PR merged onto
main:PR head:
Not tested: the failure path itself (no adapter failed here). It's the case this PR is for: earlier today a stale Graphics Tools
d3d12SDKLayers.dll(10.0.26100.1 againstD3D12Core10.0.26100.9818) made every device fail withE_INVALIDARGunderXCL_D3D12_DEBUG=1, and the log only showed WARP's error. That DLL has since been removed from this machine, so I couldn't rerun it.AI use: Claude Code with Claude Opus 5.5 built the commits, ran the tests and the title runs, read the logs, and wrote this report. The runs were made on my machine.
@vascomfduarte on GitHub · 2026-11-24 11:44 UTC · original
Thanks for running the smoke tests, @Chrysana! I've added the results to the PR description and the checks are now passing. Really appreciate the help!
@throny on GitHub · 2026-11-24 20:15 UTC · original
Two contributors checked independently and found that #1444 solves the same problem in a different way: #1607, group D43. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
@vascomfduarte on GitHub · 2026-11-24 21:26 UTC · original
Thanks for pointing this out and for reviewing both PRs.
I've compared the changes and agree that #1444 addresses the same issue as #653, with a more complete approach to error reporting and additional debug-layer diagnostics. I'll close #653 in favor of #1444 to avoid duplicate work.
Thanks to everyone involved in the review!
Pull request closed