Recompiler: direct DXIL's view-id tables follow a load's stores #2269
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!2269
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2269/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?
@b3IKK on GitHub · 2026-11-25 11:55 UTC · original
b3IKK:dxil/view-id-store-deps→main· +66 −7 · 3 files · 1 commits · closed without mergingFixes #1892 — its first point was #1966 (merged), this is the second.
compute_depsbuilds the input-to-output tables ofdx.viewIdStateandPSV0for the direct DXIL translator's vertex, pixel and mesh programs. A load of a global or groupshared root got the dependencies of the values its stores wrote, but not of how those stores were reached:if (C != 0) g[i] = X;thenout = g[0];—Cdecides whether the load seesXor what was there before, yet the tables did not listC.g[I & 1] = X; out = g[0];—Idecides which slot the load reads, and the tables did not list it.A driver reads these tables to decide which inputs a stage uses, so an input that only steers a store could be treated as unused. Atomics were recorded the same way (their written values, without the pointer they operate on).
A store into a root now carries its value, its pointer and its block; a load of that root takes the dependencies of all three —
value_depsof the value and the pointer, andblock_depsof the block, which is what brings in the branch conditions.What is in it
crates/xcl/src/gpu/dxil/graphics.rs:root_storesholdsStored { v, p, block }(atomics included, with the resource as the pointer); theLoadarm takes all three sets.crates/xcl/src/gpu/dxil/kernel.rs:TRANSLATOR_VERSION9 → 10, since the tables of programs with stores change (other open direct-DXIL PRs bump the same line).crates/xcl/src/gpu/dxil/graphics_tests.rs:a_load_depends_on_the_branch_and_the_index_of_the_stores_into_itbuilds the two cases above and askscompute_depsdirectly. Without the change it fails withthe output depends on C (the branch that guards the stores); its inputs: {4, 8}—IandX, notC.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1244 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib -- gpu::dxil::graphics: 26 passed, 0 failed, including the loop case of #1966 and every..._parts_match_dxccomparison, so the extra dependencies do not change any table DXC produces for those programsRegression run
main (
426a5a7, clean tree, no local changes):PR (
a98c6bd, clean tree, no local changes):Not tested
compute_depson large programs, which now walks every store of a root for every load of itAI use
compute_deps, wrote the failing test, the change and this description, and ran the test suite and thescripts/smoke.ps1runs.@itsSio on GitHub · 2026-11-25 12:17 UTC · original
Tested
Independent verification on clean
a98c6bd2ae5676480d49ae10b8c76bf9c6cdbb5c, Windows 11 Pro build 26200, x64 MSVC, unoptimized dev/test profiles with debug info off.cargo build --workspace --lockedpassed on both PCs.cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture:SKIPPED32.0.16.108832.0.16.1088cargo test -p xcl --lib --locked gpu::dxil::graphics -- --test-threads=1 --nocapture: 26 passed / 0 failed / 0 ignored, zero runtime skips, on both RTX cards and the Radeon RDNA2 iGPU (32.0.21043.5001, same Ryzen 7 system and toolchain). This includes the new synthetic check that the branch condition, index and stored value are all recorded as dependencies. That specific test checks computed dependency data, not GPU output.The RTX 2080 SUPER workspace run failed only at
hle::xgameruntime::gamesave::tests::atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_temps(E_FAIL, expectedS_OK). The same named test failed in an earlier verification. On this head,cargo test -p xcl --lib --locked hle::xgameruntime::gamesave::tests::atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_temps -- --exact --test-threads=1 --nocapturepassed in isolation on both PCs (1 / 0 / 0, no skips). The original workspace result remains failing; this does not establish the cause.Not tested
The exact parent, a translated console shader whose dependency tables change, a full Radeon workspace, Intel, retail smoke and performance.
AI use
Ran via Samaritan:
openai/gpt-6.2-sol): scoped and ran the two-PC checks, verified the logs, and wrote this report. No subagents contributed.@b3IKK on GitHub · 2026-11-25 13:08 UTC · original
Thank you — that is the first independent run on this, and the Radeon RDNA2 iGPU result on the graphics tests is more than I could check here.
On the RTX 2080 SUPER failure:
hle::xgameruntime::gamesave::tests::atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_tempsis unrelated to this change (it lives ingamesave, and this PR touchesgpu/dxil/graphics.rsandkernel.rsonly). It looks like the same class as #1487: a test that passes alone and fails under parallel scheduling, and you saw the same name on another head. I will look at whether the test needs the same kind of lock thexasynctests take rather than leave it as a known flake.The 26/26 on all three GPUs, including the new branch/index/value check, is exactly the evidence this needed. AI use: OpenCode, Claude Fable 5.2.
@thehollowedone on GitHub · 2026-11-25 14:26 UTC · original
Independent direct-DXIL comparison of #2269 at a98c6bd and #2035 at 5473448. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11.
gpu::dxil::graphics::testsfilter passed 26/26 on #2269 and 28/28 on #2035, with zero skips on either. Both ran withXCL_DIRECT_DXIL=1andXCL_REQUIRE_GPU=1.{4}, while #2269 reported{0, 4}, including the other load’s index. The precision assertion passed on #2035 and failed on #2269. This is an extra dependency in the analysis fixture. No draw error was measured.Commands:
cargo test --offline --locked -p xcl --lib -j 4 gpu::dxil::graphics::tests -- --skip local_d79_read_address_does_not_taint_unrelated_output --test-threads=1 --nocaptureand the same test command filtered tolocal_d79_read_address_does_not_taint_unrelated_outputwithout the skip. Synthetic inputs only.AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the tests and drafted this report.
@b3IKK on GitHub · 2026-11-25 15:16 UTC · original
Closing in favour of #2035, which is the same fix (#1892's second point) opened earlier and does it correctly.
The independent comparison by @thehollowedone is right that this head over-counts: my
root_storestreated anyInstInfo::Otherwhose first operand roots at a global as a write, so a GEP - an address computation, not a write - was recorded as a store of its index operands, and a later load of the root picked up dependencies from it. That is the extra{0, 4}against #2035's{4}in their fixture. The fix is to tell atomic writes apart from other value operations inmodule.rs, which #2035 does; I had worked around the same problem with the first-operand heuristic instead.No test here fails for it (my own test only asks that the branch and index are present), which is why the precision case had to come from outside. #2035 also has three focused regressions for store address, store condition and atomic address/control, so nothing here is lost.
AI use: OpenCode, Claude Fable 5.2 read the comparison, traced the over-count to the heuristic and wrote this.
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
Pull request closed