D3D12.X: isolate rendering artifacts by shader hash #1817
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1827"
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 mokkamokacaffe on 2026-11-24T21:30:31Z.
Review follow-up
The default smoke did not exercise
XCL_DEBUG_SKIP_SHADERS. Oncea3f4fa, a source review found that the draw filter reads a graphics pipeline hash map populated under tracing, profiling or GPU timing. Check a known shader hash with only the skip switch enabled, then repeat with tracing enabled and compare skipped draws. #3509 implements a related pixel-shader filter. AI-assisted source reviewAdd a runtime diagnostic for reducing a visible rendering artifact to the translated vertex or pixel shader that produces it.
XCL_TRACE_FRAMEreports shader hashes;XCL_DEBUG_SKIP_SHADERSsuppresses selected hashes so candidates can be bisected without changing translation.What is in it
XCL_DEBUG_SKIP_SHADERSand suppress matching translated graphics draws.ExecuteIndirectdraws while leaving compute dispatches unchanged.Tested
On
cea3f4fa, the Windows workspace passed 2,741 tests (49 ignored). On predecessor62197903, JJAutoCompare verified the hash-list parser on Intel Arc A770, and Toons29 ran a paired 60-second retail smoke on RX 9070. The AMD smoke used default settings. Intel report · AMD blocksfrenziedcoder tested predecessor
0dd553221d98937d52c60747517014f673e7a728on NVIDIA GeForce RTX 5080 16 GB, driver 617.14, Windows 11 Pro 25H2, rustc 1.100.0 and DXC 1.8.2502.11.cargo build --workspace && cargo test --workspace -- --test-threads=4: 960 passed, 0 failed, 43 ignored.debug_shader_hash_list_ignores_bad_and_zero_entries: passed.git diff --check: passed.Regression run
Conflict repair on pinned main
0fe06eb0f0, PR headcea3f4fa1a. Workspace: 2,741 passed, 0 failed, 49 ignored, 27 explicit SKIPPED lines. The focused hash-list regression passed separately. The default smoke did not exercise shader suppression. Both release smokes used separate empty XCL caches and XCL_PREPARE=0 on the same RTX 4080 SUPER. OpenAI Codex reconciled the changes, ran validation, and prepared this update.Main
PR
Earlier regression evidence (historical):
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by frenziedcoder on 2026-11-24T22:02:38Z.
NVIDIA test report for
0dd5532: full suite green, its own testdebug_shader_hash_list_ignores_bad_and_zero_entriespasses, and a clean smoke pair on the retail title (1651 vs 1653 frames).Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head0dd553221d98937d52c60747517014f673e7a728, no local changes.cargo build --workspace && cargo test --workspace -- --test-threads=4(debug): 960 passed, 0 failed, 43 ignored; the PR's own testdebug_shader_hash_list_ignores_bad_and_zero_entriespasses. SKIPPED:gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 compares, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 rounding, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 three-source, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 transcendentals, wave64: no wave64),gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu(f64, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer carries, wave64: no wave64),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_layerreports 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=0for both builds, because this machine's preload list holds the program of #1307)base (
c4d37be, this PR's merge base withmain):this PR:
Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); 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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:50:44Z.
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 / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:19:17Z.
PR #1827 — D3D12.X: isolate rendering artifacts by shader hash
xcl-dev/xcl. Tested the live fetchedrefs/pull/1827/headat62197903bc41af638f862be81882eb34af72a3c5in a clean detached checkout.origin/mainataaa093657bd96a146c05c0c1a9b61149fe761453.git merge-tree --write-tree origin/main HEADexited 0 and produced treed96913e71f067fe2a57c6e07bfed61d4405965aa.What is in it
crates/xcl/src/hle/d3d12x/bind.rsaddsXCL_DEBUG_SKIP_SHADERSfiltering by translated VS/PS hash for graphics draws, including indirect draws, and a unit test for parsing the hash list.README.mddocuments usage.Tested
STOR-WINLAB, Intel Arc A770 16 GiB, driver32.0.101.9175, wave range 8–32,DoublePrecisionFloatShaderOps=0. AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation build26200.9974.rustc 1.100.0 (0ef1bc386 2026-11-09). Unoptimized dev/test profiles with debug info and incremental compilation disabled. Loaded DXC/DXIL1.9.2609.5(DXC revision01b62ad4).cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the GPU lock.cargo test -p xcl --lib debug_shader_hash_list_ignores_bad_and_zero_entries -- --show-outputpassed outside the GPU lock (1 passed, 0 failed, 0 ignored, 0 skips).cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputran once underL:/XclTooling/Invoke-ArcTest.ps1withXCL_ADAPTER=A770. Cargo exited 101. Across 20 test summaries, libtest reported 941 passed, 19 failed, 43 ignored. The log also contains 25SKIPPEDentries, including skipped cases inside tests. Exclude those cases from coverage.CreateComputePipelineStatereturning0x80070057. Four assertions failed in FMA contraction, implicit texture LOD,v_add_f16high-half preservation, and wave64 pixel-shader reductions. The integration failure wastest_title_runs_and_game_folder_is_untouched, where the dynamic depth-bias check viaRSSetDepthBiasXreturned blue where it expected green.L:\XclTooling\neon-slot-5\tmp\pr1827-suite.log.Skip log
Not tested
main, retail-title smoke runs on either revision, shader suppression withXCL_DEBUG_SKIP_SHADERSenabled, sample-data paths that requireXCL_SAMPLE_*, and other GPU vendors. The merge-tree check tested mergeability. The suite ran on the PR head.AI use
gemini-4-neon) verified the counts againstpr1827-suite.logand published this report.Imported from ivall/xcl. Originally posted by mokkamokacaffe on 2026-11-25T13:59:16Z.
Review: COMMENTED
Updating README
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T13:42:37Z.
Regression run of
62197903on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon1a0bbe3a, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 102 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:27:57Z.
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
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:54:48Z.
Triage (#1607) – head
cea3f4fOverlaps with #3509, which adds
XCL_SKIP_PS(skip direct and indirect draws by console pixel-shader hash) together with pixel history. This PR skips by VS or PS hash. It is the same diagnostic idea, built differently.Problem:
bind.rs:debug_skip_shader_drawlooks the hashes up withreal::pso_shaders. For graphics pipelines,PSO_SHADERSis filled only whenXCL_TRACE_FRAME,XCL_GPU_PROFILEor GPU times are on (translated_graphics_pso_once). WithXCL_DEBUG_SKIP_SHADERSalone, nothing is skipped and nothing is logged. #3509 records the hashes whenever its list is set (keeps_shaders). Either record them when the variable is set, or say in the README thatXCL_TRACE_FRAME=1must stay on.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.