D3D12.X: a new kind of translation error is logged after the first 40 #1742
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1752"
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?
Imported from ivall/xcl. Originally posted by tippythetaidum on 2026-11-24T20:15:52Z.
note_translation_errorlogs, and keeps forreport.json, only the first 40 distinct reasons why a pipeline's console shaders got no translation. A retail title's minimap pipelines give 40 refusals of the form "mesh pipeline with its MS in the AS slot – refused", one per shader hash. They use up all 40 places within ~9 s of the start. Nothing that fails after that leaves a line in the log or an entry inreport.json.In a 240 s run on main
c160d86the report counted 4 failed background pipeline builds (background_pipelines: [1186, 4, 57572]) and listed no reason. In a local build of main with the cap lifted, the reason turned out to bethe driver rejected the compute PSO with the translated CS (0x8007000e)at 87 s, during world loading. That pipeline's dispatches were then skipped. #1300 adds a log line for that one path (the driver's refusal of a compute PSO). This PR is about the cap itself, so that no new kind of failure is hidden behind 40 of another.The first 40 reasons are kept as before. Past them, a reason is still logged and kept when its kind is new. The kind is the reason's text with shader hashes (16 hex digits) and plain numbers left out. HRESULTs (
0x…) stay in the kind, so a different HRESULT is a different failure. At most 120 reasons are kept.What is in it
crates/xcl/src/hle/d3d12x/real.rs:keep_translation_error()andtranslation_error_kind(), used bynote_translation_error. Tests intranslation_error_tests:a_new_kind_of_error_is_kept_after_forty_of_another: fails on main, where the 41st reason is never kept.the_first_forty_reasons_are_kept_as_before.at_most_120_reasons_are_kept.a_kind_leaves_out_hashes_and_numbers_only.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4oncf84f9b: 963 passed, 0 failed, 43 ignored.c4d37be: 958 passed, 1 failed, 43 ignored. The failure istest_title_draws_with_a_root_signature_under_the_debug_layer: its test title made no progress for 10 min and I ended it. That test passed on main6c89285on this machine, so it is intermittent here. It did not hang on this PR's head.c4d37be:no wave64: the wave64 variants ingpu::recomp::lower/lower_dxil, plusgpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.refused (… #1426 semantics differ from the console's), inlower_dxil::tests::f16_programs_on_the_gpu/f32_programs_on_the_gpu.heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=240,XCL_PRESS_A_ATevery 4 s from 16 to 120 s, on947c2d3. That is the same change before its rebase ontoc4d37be. The run ended at 240 s with no crash. No build failed (background_pipelines: [1697, 0, 57066], 0 DXC failures), so the run produced no reason past the first 40, and it does not show the new path in use.Regression run
main
c4d37be:this PR
cf84f9b:Run back to back, main first. Within 60 s the title's own progress varies between runs, and peak commit follows it. An earlier pair at
6c89285/947c2d3had main 1510 frames / 15459 MB and this change 1296 / 27039 MB. A second pair at the same commits had main 1353 / 25937 MB and this change 1631 / 15277 MB.Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:18:41Z.
Full-suite run, since this PR has no test report yet. Tested exact head
947c2d3(on its base6c89285).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 866 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.a_new_kind_of_error_is_kept_after_forty_of_another,the_first_forty_reasons_are_kept_as_before,at_most_120_reasons_are_kept,a_kind_leaves_out_hashes_and_numbers_only.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 867 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by tippythetaidum on 2026-11-24T21:47:52Z.
Rebased onto main
c4d37be. The head is nowcf84f9b, with the same change and no conflicts.On
cf84f9b, RTX 5080,cargo test --workspace --no-fail-fast -- --test-threads=4: 963 passed, 0 failed, 43 ignored (mainc4d37be: 958 passed, 1 failed, 43 ignored; the failure is the intermittenttest_title_draws_with_a_root_signature_under_the_debug_layerhang, described in Tested). A new back-to-back smoke pair againstc4d37beis in the description: 1305 frames / 30137 MB against main's 1278 / 27825 MB, no crash or device removal.Claude Code, Claude Opus 5.5 wrote this update; the account owner directed the work.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:04:37Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
upstream-sync referenced this pull request2026-11-25 09:08:15 +00:00
Imported from ivall/xcl. Originally posted by tippythetaidum on 2026-11-25T11:23:10Z.
Status update before I step away from XCL work.
cf84f9bstill merges cleanly intomain426a5a7(git merge-tree --write-treeexit 0). Onmain,note_translation_errorstill keeps only the first 40 distinct reasons (g.len() < 40).79fde18(merged) now logs a huge compute program's driver refusal itself. That covers the case that led me here. This PR still covers every other kind of failure that comes after the first 40: CS translation errors, other driver refusals, and mesh / stream refusals.I won't be iterating on this PR. Maintainers can push to the branch: please rebase, adjust or close it as you see fit.
Claude Code, Claude Opus 5.5 wrote this comment; the account owner directed the work.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:39:48Z.
Triage (#1607) – head
cf84f9bNo open or merged PR makes the same change;
note_translation_erroron main still stops at 40 reasons. #1300 (mentioned in the description) logs one specific driver refusal and does not change the cap.keep_translation_error/translation_error_kinddo what the title says, and the tests cover the 40 / new-kind / 120 limits. One limitation: a hash written with a0xprefix (18 characters) is not stripped from the kind.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T13:16:53Z.
merge-check
base:
b2b1f109d2head:
cf84f9b37dmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2906 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), same set as base alone (2902 passed, 0 failed, 51 ignored); failing: none
review: no correctness problem found after reading the whole diff (1 file, +88 -1). The first 40 distinct reasons are kept as before; past them a reason is kept only when its kind (hashes of 16 hex digits and plain numbers replaced by
#) is new, up to 120.translation_error_testspass 3 of 3 runs (CPU-only).keep_translation_errorback to main's rule (stop at 40) failsa_new_kind_of_error_is_kept_after_forty_of_anotherandat_most_120_reasons_are_kept. Good.0x…value (e.g.gpu/dxil/cfg.rs:56+{off:#x}: cannot decode) keeps it in the kind, so each offset is a new kind. Scratch test: 200CS: +0x…: cannot decode (X)reasons after 40 others filled all 80 extra places (120 kept), so a later new kind would be hidden again, as on main at 40. I did not check whether such reasons reachnote_translation_erroron main. If it matters, a test with such a reason would show it; any fix must keep HRESULTs like(0x8007000e)distinct, as the PR intends.report.json.performance: reasoned, not measured: the kind is computed only for a new reason once 40 are kept (each call then recomputes the kinds of up to 120 kept strings under the lock), on the pipeline-translation failure path only.
report.jsoncan list up to 80 more reasons.verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T00:53:56Z.
merge-check claim
head:
cf84f9b37dImported from ivall/xcl. Originally posted by vasanex on 2026-12-02T01:00:00Z.
merge-check
base:
1c8b551475head:
cf84f9b37dmerge: clean (merged tree afecf512,
git diff --checkclean)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2913 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The four new tests in
translation_error_testspass.review: whole diff read (one file, real.rs, +88/-1). No finding that should stop it. The first 40 distinct reasons are kept exactly as before; past them a reason is kept only when its kind (the text with 16-digit hex words and plain numbers replaced) is new, up to 120 in all, so the list and report.json stay bounded.
translation_error_kindkeeps0x...HRESULTs because thexmakes the word neither all digits nor 16 hex digits. Small points: past 40 entries each new error computes the kind of every kept entry under theTRANSLATE_ERRORSlock (at most 120 short strings, on a failure path only); a 16-letter word made of a-f only would count as a hash, which the last test names.performance: none by default on the success path; on a translation failure past the 40th, a scan of at most 120 short strings. Reasoned, not measured. Logging only, no title run.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:12:59Z.
Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on
cf84f9bMerged onto
main5eaadb54(clean merge) and compared withmainrun twice on the same machine.Setup
v3.1-83-gcae8353edand DXVKdxgi.dllfrom GE-Proton11-16, DXC 1.9.2609.5x86_64-pc-windows-msvcwithcargo-xwin; test binaries run under WineTested:
cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>main5eaadb54main: none.a_new_kind_of_error_is_kept_after_forty_of_another,the_first_forty_reasons_are_kept_as_before,at_most_120_reasons_are_kept,a_kind_leaves_out_hashes_and_numbers_only).About the failures on
mainand the 31 skipped tests (same for every PR in this batch)main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests getE_INVALIDARG(0x80070057). Running vkd3d-proton master with its vtable check taken out,hle::d3d12x::sparse::testsgoes from 106 passed / 38 failed to 144 / 0.std::terminate()(Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests,gpu_compute_mode_dispatch_abi,gpu_compute_thread_limits_leave_the_lanes_past_them_out, the twogpu_mesh_mode_*tests, andconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plusserialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv93ab44c5).mainwas run twice: same counts, same failure set.SKIPPEDlines (same asmain): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).Not tested: Windows, NVIDIA, a retail title /
scripts/smoke.ps1, a review of the diff. This is a test report, not amerge-check.AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with
main, and drafted this report. The user asked for it to be posted.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.