Skip to content

DXC: compute programs are linked with their memory accessors (window switches no longer dominate DXC time) - #174

Open
gefydev wants to merge 2 commits into
xcl-dev:mainfrom
gefydev:mem-accessor-cost
Open

gefydev wants to merge 2 commits into
xcl-dev:mainfrom
gefydev:mem-accessor-cost

Conversation

@gefydev

@gefydev gefydev commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Lane L6 of the compile-time handoff (DXC cost). Draft. About −14 % DXC time on retail compute programs (measured below); the tests pass on AMD (RX 7800 XT, comment below). #187 has landed and removes the window switch itself (windows from the descriptor heap, VS / PS too, and much faster on its own synthetic CS), but only with XCL_HEAP_WINDOWS=1: that is opt-in, so the switch form is still the default and this PR serves it, and the programs #187 rebuilds in the switch form when the driver refuses the heap form. A program in the heap form has no switch accessors, and linked_form leaves it alone.

Rebased onto main 2898511 (two commits). It conflicted with main in dxc.rs and at the end of tests.rs. In dxc.rs, main added a special case for E_OUTOFMEMORY inside the code that this PR moved into output(): it is kept there. In tests.rs, where this PR conflicted at every rebase because every merged change adds its tests at the end, the three tests of this PR now live in their own file, link_tests.rs, next to heap_window_tests.rs, with the two small helpers they need (gpu_ready, on_gpu). #2346 landed before that: the windows are globallycoherent only when the program needs it, so linked_programs_keep_their_declarations now runs a program with a GLC load and one without, in wave32 and wave64, and checks that linking keeps either. In emit.rs, main's mem_accessors(windows, heap) and its out-of-range default (reads 0, stores dropped) are kept: mem_methods() now also returns what each method does outside the windows, loadx4_switch and method_switch write the same switch text main writes, and linked_form asks for mem_accessors(w, None). The accessor text for the switch form is still byte-identical to main's.

What is slow
With several memory windows every mem access is a call to an accessor that switches between the windows. DXC inlines it when it compiles, before it optimises, so a program gets one switch per access, and DXC's time grows much faster than their number. HANDOFF (956a476) measured it at about double DXC + driver time on one large CS; #172 measured about 26 % of DXC time on its 1-in-100 pack sample. The first table below is the worst case, programs made of memory accesses only; the second is real ones.

What is in it

  • emit::linked_form turns such a program into two DXIL libraries: the program, with its accessors only declared, and the accessors. DXC cannot inline a declaration.
  • dxc::compile_linked compiles both and links them with IDxcLinker, which inlines the accessors after the program was optimised. The compiled accessor library is kept, and compiled once per key even when several programs ask for it together (kept_once, the second commit).
  • Only cs_* (which is also what MS and GS programs run as), only with 2–4 windows, only from 100 places that use an accessor. VS and PS are unchanged.
  • If anything in this path fails, the program is compiled whole as before, the first failure is logged, and no more programs are linked in the process (LinkGate, the second commit): a DXC before 1.8 refuses [WaveSize] on a library entry and would otherwise fail the same way for every program. The README says the linker needs DXC 1.8 or newer.
  • XCL_LINK_MEM=0 turns it off. It shares the DXIL cache, so compare with another XCL_DXIL_CACHE.

The HLSL the translator emits is unchanged (the accessor text is byte-identical to main for 2, 3 and 4 windows), so cache keys do not change: programs already in a DXIL cache stay as they were compiled.

Measured, synthetic worst case
GTX 1650 (driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, ~13.5 GB commit free, Windows 11 26300, DXC 1.9.2602.17, debug build. bench_memory_window_accessors (ignored test, in this PR): synthetic split-wave64 CS, 3 rounds, the forms one after the other in every round, a different program each time so that the driver cannot answer from its cache. Medians:

accesses form DXC DXIL pipeline (driver) 2048 groups
400 1 window 0.62 s 21 KB 0.16 s 0.185
400 4, whole (main) 2.61 s 48 KB 0.44 s 0.222
400 4, linked (this PR) 0.90 s 48 KB 0.47 s 0.221
1600 1 window 3.13 s 73 KB 0.83 s 1.253
1600 4, whole (main) 36.05 s 188 KB 3.48 s 1.653
1600 4, linked (this PR) 4.37 s 189 KB 3.84 s 1.653

Measured on a retail pack
GTX 1650 machine above (16 GB RAM), release build, one binary, XCL_LINK_MEM=0 / 1. Cold --precompile --only cs --limit 22300 (143 compute programs, 4 windows, split wave64), 4 DXC threads, a new empty cache for every run, order off-on, on-off, off-on:

XCL_LINK_MEM=0 linked (this PR) medians
wall 212.2 / 213.5 / 214.3 s 181.2 / 183.8 / 183.3 s 213.5 → 183.3 s (−14 %)
CPU 730.8 / 732.6 / 733.6 s 644.0 / 644.5 / 645.7 s 732.6 → 644.5 s (−12 %)
peak commit 2.57 / 2.49 / 2.55 GB 2.70 / 2.69 / 2.68 GB 2.55 → 2.69 GB (+5 %)
  • 143 of 143 compile in every run, 0 errors. 53 were linked and 90 have the same DXIL as without; the 53 take 20.36 MB either way. The output is the same in repeated runs of each form.
  • All 143 pipelines of the linked cache are made by the NVIDIA driver, 0 refused (--pipelines, one at a time, in two runs). Driver time off / on was not compared.
  • Foniass measured about −15 % on another sample (1 in 100, RTX 5070 Ti machine, native 64-lane form, DXC only): see the comment below.

Tried and dropped

  • [noinline] accessors in the program itself: the same DXC gain and a smaller DXIL, but NVIDIA keeps them as calls and the dispatch is 4.5–6× slower. (DXC's validator also takes only scalars in such functions.)
  • The same compiled as a library and linked: the linker keeps noinline.

Tested

  • GTX 1650 (driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, Windows 11 Pro 26300, Rust 1.100.0, DXC 1.9.2602.17; release for the smoke runs, debug for the tests.
  • gpu_linked_memory_accessors: one program with 1–4 dword loads and stores, scalar loads, 32- and 64-bit atomics, in two windows, odd and even lanes in different ones. Registers and memory are the same whole and linked, and loads match what is in memory.
  • linked_programs_keep_their_declarations: wave size (32 and 64), thread count, the windows' registers, globallycoherent (resource properties) and the number of functions are those of the whole program.
  • Before the rebase, on 956a476: cargo test --workspace: 538 lib tests pass, 0 fail, 2 SKIPPED (no wave64); other suites pass. The same with the threshold at 0, so that every cs_* program with windows is linked: 538 pass, 0 fail.
  • After the rebase and the review fixes, on 6ccfd1d (GTX 1650, CARGO_BUILD_JOBS=2): cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 1366 passed, 3 failed, 47 ignored. 28 SKIPPED, none on a path this PR changes: 21 wave64 cases (no wave64 on this GPU), 3 per-lane f16 cases the per-lane form refuses, 1 "no heap windows", 3 for the D3D12 debug layer not being installed. The 3 failures are title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels (Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718, which fails now and then) and the two tests its panic leaves on a poisoned lock (transitions_apply_when_their_list_is_submitted and vram::tests::d32s8_targets_take_their_own_size_of_video_memory). The same three fail with the same command on a clean checkout of main 2898511, and all three pass alone on one thread: nothing to do with DXC or this PR. It includes the PR's two tests (gpu_linked_memory_accessors, linked_programs_keep_their_declarations) and the four tests of the second commit (accessor_library_tests).
  • The test of the race in the accessor library fails against the old lookup-then-insert pattern (8 compiles of the library for 8 threads, 1 with kept_once).

Regression run
The pair below is for the current head, 6ccfd1d, and was made and reported by @throny (comment): scripts/smoke.ps1, 60 s, release builds, the same title for both, main 2898511 (the base of this head) first and then the head, on an NVIDIA GeForce RTX 4080 (driver 610.88, Intel i9-12900K, 64 GB, Windows 11 Pro 26300, DXC 1.9.2602.17). The blocks are exactly as the script printed them.

main:

xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1625 (PresentX 1625)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14099 MB

PR:

xcl-smoke v1
commit: 6ccfd1d2679a3d15f74efa341e647d7824376ef8
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14014 MB

Other runs of this change, so that nothing is left out:

  • @throny, the same machine, on the previous head d466910 (the same two commits on an older main), main 22b6222 against it: 1,527 against 1,567 frames, 14,073 against 14,048 MB.
  • @throny against a newer main (72b59b5), the same head 6ccfd1d: 14,010 MB against main's 9,225 MB. He reports that main itself got lighter in between (the shared stand-ins, 625a0f3 and after), not this PR, and that a rebase onto current main should bring the head down with it. I have not rebased again, so as not to change the head that has the pair; I will rebase if the maintainers ask for it.
  • @thiagocalile, AMD Radeon RX 6600 (RDNA2, native wave64, DXC 1.8.2502.11, driver 32.0.21045.29003), on the current head 6ccfd1d against its base main 2898511 (comment): 1,483 against 1,488 frames, no device removal, no crash, peak commit 13,687 against 11,934 MB (114.7 %), inside the 125 % of the check; and the 6 tests with link in their names pass (1 ignored, the bench). An earlier run of his on the previous head d466910 against an older main (50a9fde) had shown a peak commit of 15,958 / 16,910 MB against 11,951 MB (133 % / 141 %); the run on the current head and its own base does not repeat it, and I do not know what made the difference.
  • Mine, GTX 1650, on the first commit (ddb9350, before several rebases) against main afc5ee8: 913 frames and 11,707 MB against 904 and 11,655 MB.
  • The whole suite on 6ccfd1d: @throny, RTX 4080: 1369 passed, 0 failed, 47 ignored (26 SKIPPED lines). On d466910: @throny 1281 / 0 / 47; @oni-swr, RX 7800 XT: 1280 passed, 1 failed (fuzz_validate_and_gpu_1, which fails the same way on main, DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115), 47 ignored.

Not tested

  • AMD: TheHoracio ran the tests on an RX 7800 XT (RDNA3), native and split: the two new tests pass, no driver crash; the one failure also fails on main. @thiagocalile ran the smoke pair on an RX 6600 (see above). No AMD timings of the DXC change itself, and no world load on AMD.
  • A title on this change: only through the smoke runs above (menus and the first seconds of the title, 60 s), not a world load. Whether the linked retail programs give the same results on the GPU is only checked by the synthetic test.
  • Older DXC versions than the one above. The review below shows that with DXC 1.7 (the SDK's older one) the linked attempt fails and the program is compiled whole, so the cost of the failed attempt is paid; this PR does not change that.
  • The measurements above are from the base before the rebase (956a476); they were not repeated on b9fdc89 or 6ccfd1d.
  • The effect of the gate on a machine with DXC 1.7: the tests do not run a DXC that cannot link, so the closing of the gate is tested on its own (LinkGate), not through a failing link.

Gate A passed at 2026-11-23 18:21 UTC on main 956a476; Gate B passed at 18:54 UTC on main 956a476. PRs read: #113, #123, #138, #139, #162, #166, #172: none changes how accessors are compiled. The tests use synthetic programs only; no game material is in this PR.

AI use

  • Claude Code wrote the change, its tests and the measurements in an earlier session; the model of that session is not recorded in this description. Claude Code with Claude Sonnet 5.5 rebased the commits several times (the last onto main 2898511: b9fdc89 and 6ccfd1d), resolved the conflicts, wrote the second commit (the review fixes and their tests), moved the tests of this PR to link_tests.rs, ran the suite, and updated this description.

@TheHoracio

Copy link
Copy Markdown
Contributor

AMD run, as asked under "Not tested": RDNA3 Radeon RX 7800 XT (16 GB, native 64-lane waves, amdxc64), driver 32.0.32015.7029, Windows 11 Pro 10.0.26300, Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17, debug build, PR head 328cf29.

Run Result
cargo test --workspace --no-fail-fast 570 passed, 1 failed, 40 ignored, 0 SKIPPED
XCL_SPLIT_WAVE64=1 cargo test -p xcl --lib gpu:: 256 passed, 0 failed
  • gpu_linked_memory_accessors and linked_programs_keep_their_declarations pass natively (64-lane) and split. No driver crash, no TDR or device removal.
  • The one failure is gpu_wave64_ps_whole_wave_reductions. It fails the same way on main 956a476 on RDNA2/RDNA3 and is fixed by VS / PS: the 32-lane form on every GPU that can run 32-lane waves (RD… #155. It is unrelated to this PR.
  • I did not run bench_memory_window_accessors or a retail pack, so there are no AMD timings here.

@Foniass

Foniass commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Retail-pack measurement, as asked under "Not tested": about −15 % DXC time on a 1-in-100 sample, 0 errors.

Machine: Ryzen 7 7800X3D (16 threads), 32 GB RAM, ~17 GB commit free, RTX 5070 Ti (driver 32.0.16.2114, 32-lane waves), Windows 11 26300, DXC 1.9.2602.17, release build. Measured at 8bca7cb; the PR head 328cf29 has the same tree.

Method: retail_translation_survey on a retail title's shader pack with XCL_SURVEY_EVERY=100, XCL_SURVEY_DXC=1, XCL_SURVEY_WINDOWS=4, two seeds. One binary, with XCL_LINK_MEM=0 and without, runs interleaved, nothing else running. The numbers are the total DXC time the test prints (4 threads).

Sample XCL_LINK_MEM=0 linked (this PR)
seed 1, 294 programs 336 / 323 / 332 s 288 / 282 / 275 s
seed 2, 261 programs 363 / 353 s 309 / 251 s
  • Seed 1 medians: 332 → 282 s. The 251 s run of seed 2 was fast throughout (median per program 0.24 s against 0.30 s in the other runs), so I would not read more than the −15 % of the other pairs into it.
  • 0 DXC errors in every run. No "could not be linked" warning in the output; I did not check that the test would show one.
  • The gain is in the large compute / mesh programs. The five slowest of seed 1, one run each: 21.7 → 14.7 s, 17.9 → 13.8 s, 16.1 → 11.7 s, 15.7 → 11.6 s, 12.7 → 8.6 s.
  • Pixel shaders do not change, as the PR says. With it they are 5 of the 10 slowest programs of the sample (4.4–8.2 s each), so they are what is left of the window switches' cost.
  • Wall time of the survey (seed 1): 86–89 s → 72–75 s.

Not measured: the split wave64 form (the survey translates the native 64-lane form), the driver's pipeline time, DXC's peak memory, and the GPU tests on this card.

No game material: timings and counts only. Measured with an AI assistant (Claude Code).

@mastrr9

mastrr9 commented Nov 23, 2026

Copy link
Copy Markdown

Independent Windows + RTX 5080 GPU verification of 328cf2963 (merge-base 956a476bf) on NVIDIA GeForce RTX 5080 (Blackwell desktop, driver 617.42, D3D12 SM 6.6 + mesh shaders, 32-wide waves, Windows 11, Ryzen 7 9800X3D, Rust 1.100.0, DXC 1.9.2602.17, no XCL_SAMPLE_*, no game files):

Build & Tests

  • cargo build --workspace && cargo test --workspace -- --test-threads=4: 573 passed, 0 failed, 39 ignored (git diff --check clean; 2 expected no wave64 skips).
  • New GPU & unit tests passed on RTX 5080: gpu_linked_memory_accessors and linked_programs_keep_their_declarations.

Code check

(AI-assisted)

@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

AI-assisted review (Claude Code). Windows 11 (10.0.26200), Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74, 32-lane waves), Rust 1.99.0 MSVC, debug build. Synthetic programs only, no game files.

Tested 328cf29 (one commit directly on main 956a476, so the PR head is the merge result), with main as the control.

With the Windows SDK's DXC, the linked path never works. The README names the Windows SDK as the DXC source. The newest SDK, 10.0.26100, ships dxcompiler.dll 1.7.2308.16. That version rejects [WaveSize] on a library entry: error: attribute WaveSize only valid on entry point function, in either attribute order (checked with the SDK's dxc.exe -T lib_6_6 on a 5-line file). Every compute program the translator emits has [WaveSize], so with the SDK DXC:

  • every linked attempt fails and the program is compiled whole. The warning is logged once, but the cost is paid every time.
  • that costs an extra library compile per program. On the bench below, shape C goes from 1.3 s on main to 1.6 s with this PR.
  • the PR's own gpu_linked_memory_accessors and linked_programs_keep_their_declarations fail (2/2, same error). With DXC 1.9.2602.17 they pass (2/2).

DXC 1.8.2505 and 1.9.2602 (GitHub releases) accept it. Everyone who measured above used 1.9.2602.17, so nobody has run the SDK case yet.

Suggestions:

  • Stop trying for the rest of the process after the first linking failure, or check the DXC version once (IDxcVersionInfo) and skip linking below 1.8.
  • Say in the README that the gain needs DXC ≥ 1.8.

Measured with DXC 1.9.2602.17. I used xcl-pso's synthetic E/F bench from #156 (a copy in my tree; translated compute programs, one creator, fresh seeds so the driver hasn't seen them). DXC time is with 2 compiles at a time. The driver column is the first CreateComputePipelineState (median of 2).

shape DXC main DXC this PR DXIL driver main driver this PR
C: wave32, 4 windows, 2000 rounds 3.0–3.2 s 1.6–1.8 s 178 KB both 6.24 s 5.96 s
D: wave64 split, 4 windows, 2000 rounds 5.0–5.4 s 2.6–2.9 s 179 / 180 KB 6.00 s 5.64 s
E: D plus a divergent block every 4 rounds 3.8–3.9 s 3.4–3.8 s 261 / 262 KB 7.36 s 7.26 s
F: wave32, 1 window, 4000 rounds (control, not linked) 4.4–4.7 s 4.3–4.5 s 235 KB both 4.19 s 4.25 s

The DXC columns are from a CPU-only run with 4 programs. The driver run's own DXC times agree (C 2.9–3.0 → 1.6 s, D 4.7–4.9 → 2.0–2.1 s).

  • DXC time roughly halves for C and D. It does not change for E: with branches in the program, the linked form gives no gain here. I haven't looked into why.
  • On this card the driver is not slower. It is within ±6 % and slightly faster in C and D. The PR's GTX 1650 run measured 7–10 % slower. Two programs per cell, so I read both as "about equal".
  • XCL_LINK_MEM=0 on the PR binary gives the same DXIL sizes as main in every shape, and DXC times within this run's noise (D 5.3–6.0 vs 5.0–5.4 s; the other shapes within 0.4 s).

Related, and bigger than this PR on NVIDIA. The same main binary was run with the SDK DXC and with DXC 1.9 (fresh seeds, same session):

shape DXC DXIL DXC time driver
F SDK 1.7.2308 633 KB 2.8–3.0 s 10.12 s
F 1.9.2602 235 KB 3.8–3.9 s 4.61 s
C SDK 1.7.2308 371 KB 1.3 s 7.66 s
C 1.9.2602 178 KB 2.4–2.8 s 5.32 s

DXC 1.9 emits DXIL half the size or less, and the 5070 Ti's driver then compiles it 1.4–2.2× faster. DXC's own time goes up for a whole compile. Linking (this PR) takes that back for windowed programs. The driver times in #156's synthetic table were taken with the SDK DXC.

Not tested:

  • AMD (TheHoracio's run above covers correctness there);
  • a retail pack (Foniass's run above);
  • DXC 1.8 timings;
  • dispatch time;
  • more than 2 programs per cell.

@ryosen0

ryosen0 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

A data point for the SDK-DXC boundary, measured on this machine (Ryzen 7 9800X3D, RTX 3060 Ti, Windows 11):

  • The SDK 10.0.26100.0 installed here ships dxcompiler.dll 1.8.2502.11, not 1.7.2308.16 (dxc.exe --version: dxcompiler.dll: 1.8 - 1.8.2502.11). So "SDK 26100" is not one fixed DXC version - the revision of the SDK matters.
  • With that dxc.exe, lib_6_6 accepts [WaveSize(64)] and [WaveSize(32)] on a [shader("compute")] entry placed before [shader] (the order the translator emits, e.g. emit.rs [WaveSize(64)] [numthreads(64, 1, 1)]): both compile, exit 0, valid DXIL out. The 5-line repro from the review was not run against this revision.
  • The linked-compute path this review covers (DXC: compute programs are linked with their memory accessors (window switches no longer dominate DXC time) #174) is not on our main checkout yet, so this is only the attribute-acceptance half of the finding, not a linked-path run.

Suggests the version check / README note would be more precise as "DXC >= 1.8" rather than "SDK DXC fails": a 26100 SDK with 1.8.2502 passes the attribute probe here.

@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

A follow-up to the review above, on how this fits with #187 and on the driver's part for access-dense programs.

With #187. The two merge with one conflict, in emit.rs::mem_accessors (keep this PR's mem_methods() split and put #187's heap branch at the top of mem_accessors(windows, heap); linked_form then calls mem_accessors(w, None)). linked_form looks for the switch accessors' text and finds none in a heap-window program, so that program is compiled whole once and nothing is done twice. With #187 on, this PR serves the programs still in the switch form: XCL_HEAP_WINDOWS=0, no shared heap, and the pipelines #187 rebuilds in the switch form when the driver refuses the heap form (603f546).

Driver time when accesses are dense. The review's shapes had a memory access every 8 rounds. With a load and a store every round (split wave64, 1000 rounds, an exec-masked block every 4 rounds, 2 never-seen programs per row):

form DXIL DXC driver, first creation
1 window 202 KB 3.0 s 3.8 / 4.4 s
4 windows, switch, whole 447 KB 5.0–5.6 s 139.5 / 159.6 s
4 windows, switch, linked (this PR) 450 KB 4.0–4.1 s 156.3 / 167.4 s
4 windows, heap (#187) 274 KB 3.7–3.8 s 3.6 / 3.6 s

So the PR does what it says for DXC, and on such programs the driver's part, which it leaves as it is, is the larger one by far.

In your own bench with a heap form added (1600 accesses, 2 rounds): DXC 1.0 s (1 window) / 11.0 s (whole) / 1.6 s (linked) / 1.2 s (heap), and GPU time for 2048 groups 0.237 / 0.273 / 0.271 / 0.243 ms.

Tested

Not tested

  • AMD, graphics pipelines, a retail pack, DXC 1.7 or 1.8.
  • Each row is 2 programs (2 rounds in the accessor bench).

AI use: Claude Code, Claude Fable 5.2.

Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
…ong SDKs first

Nobody running XCL could tell which dxcompiler.dll it had loaded, and it
matters: with DXC 1.7.2308 (what Windows SDK 10.0.26100.4654 installs;
other revisions of that SDK have 1.8.2502) the DXIL of translated
compute programs was 2-2.7 times the size of DXC 1.9.2602's and an
NVIDIA driver took 1.4-2.2 times as long to build pipelines from it
(xcl-dev#156); 1.7 also rejects [WaveSize] on library entries (xcl-dev#174).

- dxc.rs: after loading, dxcompiler.dll and dxil.dll are asked for
  IDxcVersionInfo and IDxcVersionInfo2 (commit), and their version
  resources are read. One info line with versions and folder; below
  1.8 one warning with the measured cost and XCL_DXC_DIR.
  The release number is taken from the file: IDxcVersionInfo gives the
  DXIL version the library knows, and release 1.8.2505 answers 1.9.
- report.json: `dxc` (folder, both libraries). Filled by the game
  process when it compiled something, else by the launcher from its
  checks.
- xcl run's checks print the version, and a note with the fix when it
  is below 1.8.
- Windows SDK folders are tried in the order of their DXC's version,
  then of the SDK's, compared as numbers (old SDKs' compilers carry
  their Windows build number and go last). XCL_DXC_DIR and the folder
  of xcl.exe come first as before.
- README: DXC 1.8 or newer is recommended, and where to get it.

Co-Authored-By: Claude <noreply@anthropic.com>

@shdann shdann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In dxc.rs:249–254, two different compute shaders can request the same accessor library at startup. Each thread can see an empty cache before either stores its result. Both then compile the same library. The result is correct, but the extra DXC work happens during the cold start this change aims to shorten. Consider storing a per-key initialization cell under the map lock, then compiling outside the map lock. Preserve retry after a compile failure. A test with two distinct programs sharing one library can count library compilations and check that both programs link. Static review of 328cf29 with OpenAI Codex (GPT-6); I did not measure the timing impact.

@einfachama

Copy link
Copy Markdown
Contributor

Test report for #174 with a retail title, since Not tested says no title has been run with it: head 328cf2963183235085efa4fab0bd0ced779a9293 merged onto main 64b3f35 (clean merge, local merge commit 1aa4315). No regression at my retail title's first menu, and the retail-sample tests pass. (Since main f9e5ee9 the PR conflicts with main in emit.rs, so these results are for the merge onto 64b3f35 only.)

Tested

  • NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17 (SDK 10.0.26100); debug for the tests, release for the title runs.

  • cargo test --workspace -- --test-threads=4: 703 passed, 0 failed, 42 ignored (main 64b3f35: 701 / 0 / 41). SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware. The PR's gpu_linked_memory_accessors and linked_programs_keep_their_declarations pass.

  • With XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS and XCL_SAMPLE_BVH4 (my title's files, read in place), --no-fail-fast: gpu_pso_e2e 7/7, console_dlls_e2e 13/13, rpf_e2e 2/2. The lib had 3 failures: placed_title_textures_share_vram_and_preserve_pixels ("cubemap extra_pages must be reused at same va") and the two tests on its poisoned lock. That is Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718; main 64b3f35 failed the same way in 1 of 2 runs with the same samples, so it is not this PR.

  • My retail title at its first menu, scripts/smoke.ps1 -Seconds 60, unattended (XCL_NETWORK=0), interleaved with main 64b3f35 built the same way:

    coherent window at start this PR (frames, peak commit) main (frames, peak commit)
    the learned window 1 610 / 14 577 MB, 1 616 / 14 574 MB 1 609 / 14 578 MB, 1 614 / 14 575 MB
    512 MB (under 17 GB of commit free at start) 724 / 15 318 MB, 906 / 15 314 MB 786 / 15 318 MB, 1 010 / 15 318 MB

    No crash and no device removal in any run. The 512 MB rows are runs that started with ~15.3 GB of system commit free, where uma.rs keeps the title's GPU heaps out of the coherent window. Both commits drop to about the same level there (the PR at 90–92 % of main in the interleaved pairs), so they're comparable with each other but not with the rows for the learned window.

  • In these runs the title builds 1 translated compute pipeline at the menu. The PR's binary translated its programs itself (the translation cache is keyed by the XCL binary). Their DXIL came from the cache: 460 hits, 0 compilations in the runs whose report I kept.

xcl-smoke blocks (learned window), main and this PR merged onto it:

xcl-smoke v1
commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175
gpu: NVIDIA GeForce RTX 4060
title: title
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14575 MB
xcl-smoke v1
commit: 1aa43159cdac068008b56a8ea4fbe92785d7d46a
gpu: NVIDIA GeForce RTX 4060
title: title
seconds: 60
exit: 0x0
frames shown: 1610 (PresentX 1610)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14577 MB

Not tested

AI use

  • Claude Code with Claude Opus 5.5 ran the builds, tests and title runs in an unattended session and wrote this report from the logs; I checked it before posting.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@TheHoracio, @Foniass, @mastrr9 and @einfachama thank you for the reports on 328cf29; noted, each as you gave it:

  • @TheHoracio: RX 7800 XT (RDNA3), native and split, the two new tests pass, no driver crash; the one failure also fails on main (VS / PS: the 32-lane form on every GPU that can run 32-lane waves (RD… #155).
  • @Foniass: about −15 % DXC time on a 1-in-100 sample of the pack (RTX 5070 Ti, DXC 1.9.2602.17, 0 errors); the split wave64 form, the driver's pipeline time and DXC's peak memory were not measured.
  • @mastrr9: RTX 5080, 573 passed, 0 failed, 39 ignored, the two new tests pass.
  • @einfachama: RTX 4060 8 GB, the merge onto main 64b3f35: 703 passed, 0 failed, 42 ignored, no regression at the first menu; the linked path was not exercised in the title (1 pipeline, its DXIL came from the cache).

Since #187 landed, this PR conflicted with main in emit.rs and at the end of tests.rs. I rebased it onto main afc5ee8 (one commit, ddb9350) and it merges without conflicts now. Your results are for the old head. On ddb9350 the two new tests pass on a GTX 1650, and a smoke pair against main is in the description (913 frames and 11 707 MB for the PR against 904 and 11 655 MB for main). The whole suite on the new head has not been run yet, and the measurements in the description were not repeated after the rebase. A rerun on the new head from any of you would be welcome.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@Kalmarv and @ryosen0 thank you for the review and the measurements.

On the DXC version: the finding is right. In compile_here only the warning is behind a Once, so after the first failure of compile_linked every later cs_* program with enough accesses tries again (the accessor library is kept, so each retry costs one compile of the program as a library). I agree with both of you that the check should be on the DXC version (1.8 or newer, as @ryosen0's 26100 SDK with 1.8.2502 shows), not on the SDK, and that a first failure should stop the attempts for the rest of the process. Neither change is in the PR yet, and neither is the README note that the gain needs DXC 1.8 or newer.

On #187: the merge is done as @Kalmarv described it. main has mem_accessors(windows, heap) with its out-of-range default; this PR keeps it, mem_methods() also returns what each method does outside the windows, and linked_form asks for mem_accessors(w, None), so a program in the heap form has no switch accessors to find and is compiled whole once. The PR is rebased onto main afc5ee8 (ddb9350) and merges without conflicts. Heap windows are still opt-in (XCL_HEAP_WINDOWS=1), so the switch form is the default and this PR serves it.

On the dense-access table: agreed, the driver's part, which this PR does not touch, is the larger one there.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@shdann thank you, that is right. In compile_linked the KEPT lock is released between the lookup and the insert, so two threads that both miss compile the same accessor library. The result is correct and one of the two copies is dropped, but the extra DXC work falls in the cold start, which is where this PR is meant to save time. The fix you suggest, a per-key cell in the map with the compile outside the map's lock and a retry after a failure, is not in the PR yet, and the test you describe (two programs that share one library, counting the library compiles) does not exist yet.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@shdann, @Kalmarv and @ryosen0 both points are now in the PR, as a second commit, 2007e7d (the PR still merges into main afc5ee8 without conflicts).

  • @shdann: each key of the kept accessor library has its own cell now. The first caller compiles outside the map's lock, the others of that key wait for it, a failure is not kept, and other keys do not wait. The test you described is there in a form that needs no DXC: eight threads ask for one key while it is being made; the library is made once, and with the old lookup-then-insert pattern the same test counts 8.
  • @Kalmarv, @ryosen0: the first program that cannot be linked closes a gate for the rest of the process, so a DXC that cannot link (before 1.8) is tried once, not for every program, and the log line says that no more programs are linked. I did not add a version check with IDxcVersionInfo: the gate covers the same case without reading versions, so a 26100 SDK with 1.8.2502 keeps linking, as @ryosen0 measured. The README now says the linker needs DXC 1.8 or newer.

On this GTX 1650, cargo test --workspace --no-fail-fast -- --test-threads=4 on 2007e7d: 1269 passed, 0 failed, 47 ignored, 27 SKIPPED. I could not make a smoke pair for this head (the machine ran out of memory twice); the description says so, and a run from anyone is welcome. The gate is tested on its own, not through a DXC that really fails to link.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@einfachama and @Foniass you ran earlier heads of this PR with a title, so a request, only if you have a moment: a scripts/smoke.ps1 -Seconds 60 pair, main against the head 2007e7d, would fill the one thing this head lacks (the smoke block of the head commit; the description says why mine is missing). The request with the details is on #1607: #1607 (comment)

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@DavidM1911 thank you for the note: #174 conflicted with main again. I rebased it onto main 0829441 (two commits, 30773e1 and cd19625) and it merges without conflicts now (the only conflict was at the end of tests.rs, both sides kept). On this GTX 1650, cargo test --workspace --no-fail-fast -- --test-threads=4 at cd19625: 1278 passed, 0 failed, 47 ignored, 27 SKIPPED. The head has no smoke pair yet, and the description says why; a run on your RTX 3060 Ti would be welcome.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev

gefydev commented Nov 25, 2026 •

Copy link
Copy Markdown
Member Author

@einfachama @Foniass the head of this PR moved to d466910 (rebased onto main 3f4495a). If you still have a moment, the smoke pair, main against d466910, is the only thing it lacks; the details are in #1607 (comment). Thank you.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@oni-swr

oni-swr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

AMD run on d466910a (the current head; it merges cleanly into main 68a284a, and I tested the head as it is, not the merge). This is a test run only: it is not the smoke pair requested on #1607, and that pair is still missing.

Machine: AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0, the one xcl picked up), debug build, clean checkout, no XCL_SAMPLE_*.

Tested

  • The new and related tests: threads_asking_for_one_key_make_its_value_once, another_key_does_not_wait_for_a_value_being_made, a_failure_is_not_kept, the_link_gate_closes_at_the_first_failure, gpu_linked_memory_accessors, linked_programs_keep_their_declarations: 6 passed, 0 failed, none skipped on this adapter.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1280 passed, 1 failed, 47 ignored, 7 SKIPPED lines (f16 and f32 conversion per-lane forms refused, and one test with no heap windows).
  • The 1 failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff); it fails identically on main 68a284a, so it is not this PR's.

Not tested

  • No retail-title scripts/smoke.ps1 pair (main against d466910) was run. A retail title is still needed for that pair and I did not run one. PR checks still needs that block for this head, and the DXC time the PR is meant to save was not measured here.
  • With the SDK's DXC 1.8.2502.11 I did not check which path the linked form takes in a real title; the tests above only show that the cache, gate and accessor tests pass.
  • Other GPUs.

AI use: Claude Code (Claude Sonnet 5.5) ran the commands and wrote this report for oni-swr.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@oni-swr thank you for the AMD run of #174 at d466910 (RX 7800 XT, RDNA3, native wave64, driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0, DXC 1.8.2502.11 from the Windows SDK, debug, clean checkout). Noted as you gave it:

Agreed that this is a test run and not the smoke pair: the pair, main against d466910, is still missing. @throny said on #1607 that they are making it on an RTX 4080, and I am not pushing anything to the branch until it is in.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@thiagocalile

Copy link
Copy Markdown

Independent 60 s smoke pair (plus a second warm run for comparison) for head d466910a014989b941a040c054459f0b9f53ad7e on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • Release builds (cargo build --release -p xcl), scripts/smoke.ps1 -Seconds 60 on main (50a9fde) and twice on #174 (d466910, first run + immediate warm repeat).

Comparison (main 50a9fde vs #174 d466910)

  • Frame throughput is slightly higher on #174 (1,512 cold / 1,568 warm vs 1,501 on main, steady 60 60 60, 0 crashes, 0 device removals).
  • Peak commit was higher on #174 in both runs (15,958 MB cold / 16,910 MB warm vs 11,951 MB on main, i.e., 133.5% / 141.5% of main, which exceeds pr_check.py's 125% peak-commit threshold on this RX 6600 + DXC 1.8.2502.11 setup).

Regression run

main (50a9fde):

xcl-smoke v1
commit: 50a9fdef81cb796b8756a31defb0648301d002ce
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1501 (PresentX 1501)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11951 MB

PR #174 (d466910, run 1 — cold):

xcl-smoke v1
commit: d466910a014989b941a040c054459f0b9f53ad7e
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1512 (PresentX 1512)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15958 MB

PR #174 (d466910, run 2 — warm):

xcl-smoke v1
commit: d466910a014989b941a040c054459f0b9f53ad7e
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1568 (PresentX 1568)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16910 MB

Not tested: cargo test suite on this head (already run by @gefydev on GTX 1650), NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.

AI use: Antigravity (Gemini 4 Neon) ran the builds and smoke runs and drafted this report; the account owner reviewed and approved posting.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@thiagocalile thank you for the smoke pair on d466910 (RX 6600, driver 32.0.21045.29003, Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 26200, Rust 1.100.0, DXC 1.8.2502.11, release, XCL_ADAPTER=radeon; main at 50a9fde once and #174 twice, cold and warm). Noted as you gave it:

  • Frames: 1,512 cold and 1,568 warm against 1,501 on main, steady 60 60 60, no crash and no device removal.
  • Peak commit: 15,958 MB cold and 16,910 MB warm against 11,951 MB on main, that is 133.5 % and 141.5 %, above the 125 % limit of pr_check.py.

That last number is a real finding I did not have. On my GTX 1650 the pair of the first commit showed no such difference (913 frames and 11,707 MB against 904 and 11,655 MB), so it may depend on the card or on DXC 1.8 linking where DXC 1.7 would not. I have not found the cause yet.

The branch also conflicts with main again, at the end of tests.rs, so its head may change. I will say here if it does, and I will not paste the blocks into the description before that is settled.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Test report for exact head d466910.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 MSVC; DXC 1.9.2602.17; tests in debug, title runs in release.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on d466910 as it is (its own base): 1281 passed, 0 failed, 47 ignored. SKIPPED: 26 lines (no wave64 on this adapter, and the like).
  • scripts/smoke.ps1, the retail title, 60 s, release builds, main 22b6222 first, then this head. Both runs started without the preload list newer builds leave behind (used-pipelines.txt in the DXIL cache), which makes builds on an older base run out of memory at start:

main:

xcl-smoke v1
commit: 22b6222845976e492e0d4850ad099e3a60c4d729
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1527)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14073 MB

PR:

xcl-smoke v1
commit: d466910a014989b941a040c054459f0b9f53ad7e
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1567 (PresentX 1567)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14048 MB

Not tested: AMD, the head merged onto current main, a world load.

AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety before it was built.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@throny thank you, that is the pair the check needed. I pasted your two blocks into the description exactly as printed, and PR description is green now. Noted your numbers for the exact head d466910 (RTX 4080, driver 610.88, i9-12900K, 64 GB, Windows 11 Pro 26300, DXC 1.9.2602.17): main 22b6222 1,527 frames and a peak commit of 14,073 MB against 1,567 frames and 14,048 MB for the PR, steady 60 60 60, no crash and no device removal (so no extra commit on this card); and the whole suite on the head, 1,281 passed, 0 failed, 47 ignored, 26 SKIPPED. I also kept @thiagocalile's RX 6600 pair in the description, which shows a peak commit of 133.5 % and 141.5 % of main, so that nothing is left out.

The branch conflicts with main again, now in dxc.rs (a recent change adds a cache of DXC errors next to compile_here) and in tests.rs, so the head will change when it is rebased and this pair will then belong to the previous head.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

gefydev and others added 2 commits November 25, 2026 16:10
With several memory windows every access is a switch between them. DXC
inlines the accessors before it optimises, so a program gets one switch per
access and its time grows much faster than their number. Compute programs
with 100 accesses or more are now compiled with the accessors only declared
and linked with them afterwards (IDxcLinker inlines them): 1600 accesses
36 s -> 4.4 s, the same DXIL size and GPU time. The generated HLSL is
unchanged. XCL_LINK_MEM=0 turns it off; a program that cannot be linked is
compiled whole.
… stops the attempts

Two points of the review of the linked form. The kept accessor library was looked up under
the map's lock and inserted under it again after the compile, so two programs that asked for
the same library together compiled it twice (shdann): each key now has its own cell, the
first caller compiles outside the map's lock, the others of that key wait for it, and a
failure is not kept. And only the warning was behind a Once, so with a DXC that cannot link
(before 1.8 it refuses [WaveSize] on a library entry) every program with enough accesses paid
a failed attempt before the whole compile (Kalmarv, ryosen0): the first failure now closes the
gate for the rest of the process. The README says the linker needs DXC 1.8 or newer.
@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@throny thank you again for the pair on d466910. If you have a moment, one more, please: I rebased the branch to solve the conflicts with main (2898511), so the head changed and PR checks wants a pair for the new one. It is mergeable now.

The head is 6ccfd1d (fork gefydev/xcl, branch mem-accessor-cost), two commits. The code is the same as in d466910, with two differences: main's new E_OUTOFMEMORY case now sits inside output() in dxc.rs, and the three tests of this PR moved to their own file, link_tests.rs, so that tests added at the end of tests.rs stop conflicting with them.

What is needed, as before: scripts/smoke.ps1 -Game <title folder> -Seconds 60, release builds, the same title and time for main (2898511 or newer) and for 6ccfd1d, both blocks posted as printed as a comment on #174; I will paste them into the description. On my GTX 1650 the whole suite at 6ccfd1d gives 1,366 passed, 3 failed, 47 ignored; the 3 failures are the title-texture tests of #718 and its poisoned lock, which fail the same way on a clean main and pass alone.

I will not push anything more to the branch until your pair is in.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Test report for exact head 6ccfd1d.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 MSVC; DXC 1.9.2602.17; tests in debug, title runs in release.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on 6ccfd1d as it is (its own base): 1369 passed, 0 failed, 47 ignored. SKIPPED: 26 lines (no wave64 on this adapter, and the like).
  • scripts/smoke.ps1, the retail title, 60 s, release builds, main 2898511 first, then this head. Both runs started without the preload list newer builds leave behind (used-pipelines.txt in the DXIL cache), which makes builds on an older base run out of memory at start:

main:

xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1625 (PresentX 1625)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14099 MB

PR:

xcl-smoke v1
commit: 6ccfd1d2679a3d15f74efa341e647d7824376ef8
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14014 MB

Not tested: AMD, the head merged onto current main, a world load.

AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety before it was built.

Note on the choice of main: the pair above is against this head's own base, 2898511. Against a newer main (72b59b5) the same head showed 14,010 MB against main's 9,225 MB, because main itself got lighter in between (the shared stand-ins, 625a0f3 and after), not because of this PR. A rebase onto current main should bring this head down with it.

@bmjask bmjask left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No source-level defect found, but this draft is not merge-ready. Current-head main/PR smoke pair is missing, and RX 6600 results show 133.5%/141.5% of main peak commit—above the project 125% threshold—without root cause. Resolve/gate that regression before merge. Also add title-output validation for linked programs and, if practical, end-to-end DXC 1.7 failed-link fallback coverage. Windows no-GPU build/test alone is insufficient.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@throny thank you, that is the pair for the exact head. I pasted your two blocks into the description as printed, and added your numbers: 1,647 against 1,625 frames (101 %) and a peak commit of 14,014 against 14,099 MB, no device removal and no crash on either; and the suite on 6ccfd1d, 1369 passed, 0 failed, 47 ignored.

Noted too that against a newer main (72b59b5) the head shows 14,010 MB against 9,225 MB because main itself got lighter in between (625a0f3 and after). I put that in the description as you reported it and did not rebase again, so that the head that has your pair stays the same. If a maintainer asks for it, I will rebase and ask for one more pair.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@gefydev
gefydev marked this pull request as ready for review November 25, 2026 21:21
@thiagocalile

Copy link
Copy Markdown

@bmjask @gefydev Fresh AMD RX 6600 run on the rebased head 6ccfd1d (compared against its base main 2898511: peak commit is 13,687 MB vs 11,934 MB = 114.7%, within the 125% threshold).

Independent test and smoke report for head 6ccfd1d2679a3d15f74efa341e647d7824376ef8 on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- link --test-threads=4: 6 passed, 0 failed, 1 ignored (0 skipped).

Regression run (scripts/smoke.ps1, release builds, XCL_ADAPTER=radeon)

main (2898511):

xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1488 (PresentX 1489)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11934 MB

PR #174 (6ccfd1d):

xcl-smoke v1
commit: 6ccfd1d2679a3d15f74efa341e647d7824376ef8
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1483 (PresentX 1483)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13687 MB

Not tested: full workspace suite on this head (tested by @throny on RTX 4080), NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.

AI use: Antigravity (Gemini 4 Hydrogen) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.

@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@thiagocalile thank you, that is the run that was missing on AMD. For the exact head 6ccfd1d on the RX 6600: 1,483 frames against 1,488 for its base main 2898511, no device removal and no crash, and a peak commit of 13,687 against 11,934 MB (114.7 %), inside the 125 % of the check; the 6 tests with link in their names pass. I added it to the description, and changed what I had written about your earlier run (133 % and 141 % on the previous head against an older main): the run on the current head does not repeat it, and I do not know what made the difference.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.