Repository navigation
Conversation
`compute_deps` (the input-to-output tables of `dx.viewIdState` and PSV0) gave a load the values its stores wrote, but not how the stores were reached (xcl-dev#1892, its second point): the branch condition guarding a store, and the index a store was made through, are inputs the loaded value depends on. A shader that writes a slot an input selected, or under a branch an input decided, then reads it, had those inputs missing from the tables - which is what a driver reads to decide which inputs a stage uses. A store into a root is now recorded with its value, its pointer and its block, and a load of that root takes the dependencies of all three (atomics included, whose pointer is the resource they operate on). The direct translator's version goes to 10, since the tables of programs with global or groupshared stores change. Assisted-by: OpenCode (Claude Fable 5.2)
|
Tested Independent verification on clean
The RTX 2080 SUPER workspace run failed only at 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:
|
|
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: 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. |
|
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.
Commands: AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the tests and drafted this report. |
|
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 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. |
Fixes #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 Recompiler: direct DXIL's signature dependencies are complete across loops #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.