Skip to content

[OFFICIAL] Swarm: ports from other GPL-3.0 projects into XCL #3011

Backlog

Description

@throny

Goal

Coordinate ports from the other project line into XCL, now that XCL is GPL-3.0-or-later (#3002), so that the things that already make the retail title playable there reach XCL quickly and nobody ports the same piece twice.

The public tracker (another project's repository) lists about 37 projects ahead of XCL on this title; nearly all descend from one Rust code line: another project, another project and, built on them, another project, which reports the world under player control at a median of about 21 frames a second on an RTX 4090. All three are GPL-3.0.

Do not post title binaries, packages, keys, dumps, proprietary names or DRM-related material. Hashes and aggregate measurements only.

Rules for a port (from the maintainer's answer on #3002)

  • A port is a normal PR: one logical change, under ~400 lines where it can be split, tests, the whole suite, smoke blocks, Tested / Not tested, AI use named.
  • Port the mechanism, not the tree: adapt to XCL's modules and switches (new behaviour behind a switch first when it changes what a title sees).

How to claim

Comment with claim: <piece>, the upstream files and commit you port from, the XCL files you expect to touch, and when you expect a draft PR. One claim per person at a time. A claim with no draft PR after 48 hours is free again. Link the PR here when it is up; testers post results on the PR.

What stops XCL today (measured, NVIDIA 16 GB; AMD owners please add yours)

  1. GPU-bound frames: about 2 presents per second in the world with the GPU at 100 %; a GPU profile by another tester puts nearly half of the title's GPU time into the pieces of split compute programs.
  2. Memory: 45-58 GB of process commit and video memory at the budget, because the title's GPU heaps and textures are backed 1:1.
  3. Pipelines: large compute pipelines take 10-30 s each to create on some drivers even from a stored blob; draws and dispatches are skipped or stall meanwhile.
  4. Two-pass geometry buffers hit their cap and drop draws.
  5. Stability: device removal at the driver's shader-heap limit (NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403), and a black world on Intel CPUs since PE loader: a title's CLZERO loops run as native code on a CPU without CLZERO #2892 (being looked at there).

Candidates

A first comparison of how the other project line solves these (which files, how large, how self-contained, in which order) is being written and will be posted here as the first comment within the next hours, so that claims can refer to named pieces. If you already know a piece well (texture streaming, heap placement, mesh shading, pipeline scheduling, frame pacing), say so: a claim by someone who has read that code is worth more than the list.

Not in scope here

I will also coordinate with people on the XCL Discord; decisions and claims belong here so that everyone can see them. AI use: Claude Code (Claude Fable 5.2) drafted this at my request.

Activity

  1. throny commented on Nov 27, 2026

    @throny
    CollaboratorAuthor

    Candidates: what the other project line does differently, and what to port first. From a read-only comparison of another project 1f69d67 (with another project 63bcca4 and another project 9a9091d where it inherits) against nvidia-dev 3f39671d. Nothing was built or run for this list, so every "why it matters" is a reading of their code and docs, not a measurement on XCL. Corrections from people who know either tree are welcome.

    Why they are at ~20 fps and XCL at ~2 (as read):

    • They never split compute programs: one DXIL program per console program. XCL splits programs over 12,500 instructions into chains of pieces, and a GPU profile here put ~46 % of GPU time into those pieces.
    • On 32-lane GPUs they run most wave64 programs without the exchange between the two halves (retry without early-outs first, then "each half is its own wave" where that is exact); the barrier-based exact form is kept for a handful of programs. XCL uses the exact exchange everywhere it applies.
    • Console mesh shading is one native mesh-shader pass. XCL uses two passes with capped record buffers.
    • About 1,000 ray-tracing resolve programs are left out when no acceleration structures are built.
    • Title heaps stay in system memory and textures get host copies only when used, with admission against the video-memory budget (their docs: 9-11 GB peak on 16 GB cards).
    # Piece Upstream source Blocker it targets Size Notes
    C1 Pipeline library (ID3D12PipelineLibrary1 in a mapped file) for XCL's own pipelines, first for the whole forms of split compute programs another project another project/src/pipeline/library.rs (~600 lines without tests) pipelines; unlocks running whole forms instead of chains S minimal, M full Their comment puts a library load at ~20 ms. Whether it beats CachedPSO on drivers where blob loads take 10-30 s is the first thing to measure. Leave out pipelines with static samplers at first (they note wrong results on NVIDIA); keep the file handle open.
    C2 Cheaper wave64 on 32-lane hardware (retry order, exact "local waves" tier only) another project/src/emit/lower.rs, emit/mod.rs (~500 lines on their IR) GPU-bound frames, DXIL size M A re-implementation on XCL's IR, not a copy. Translator change: full shader recompile for testers.
    C3 Leave out ray-tracing resolve / activation pipelines when no structures are built, behind a switch another project/src/pipeline/make.rs (~40 lines) pipelines, GPU time S Changes the picture; XCL emulates BVH intersection, so check first whether XCL's rays produce hits.
    C4 One-pass native mesh shaders for console mesh shading emit/lower.rs, pipeline/host.rs, draw.rs GPU time, two-pass buffer cap L Depends on C2. High risk (driver hangs).
    C5 Video-memory admission for title textures (budget, room for targets, back-off) another project/src/residency.rs + rules in texture.rs memory L (S for the back-off alone) Depends on per-texture host copies, which XCL does not have.
    C6 CLZERO loops patched at the first fault, at that site only, atomically instead of scanning executable sections up front another project/src/console_insn.rs (~160 lines; the file's base was ported from XCL) black world on Intel since #2892 (hypothesis) S @Prime1997 this is next to your #2892; it would make sense for you to take it or say no.
    C7 Output size / render scale another project/src/resolution.rs GPU time - Do not port as is: it patches title code at fixed offsets, which is game data under XCL's rules. Re-derive through the title's settings.

    Not worth porting (XCL has it as well or better): async pipelines with stand-ins and wait budgets, the Series S profile, GPU access to title memory in place (they copy shader writes back and measured 32-50 ms a frame for it on one card), the console CPU-instruction decoder (theirs is XCL's), the direct-DXIL clean-up passes.

    Provenance traps when porting: MIT notices that must travel with gfx10/opcodes.rs (generated from Mesa, Valve) and another project/src/texture.rs (AMD addrlib); a Wine patch under linux/ (do not port); credits to the other project and its author forks in ambient.rs and queue/behind.rs; and game data inside source files (title image offsets, program-name lists, shader-hash lists, run logs under diagnostics/), which must be stripped from any port.

    claim: C1, minimal version (compute whole forms without static samplers, behind a switch), from another project 1f69d67 another project/src/pipeline/library.rs; XCL files: hle/d3d12x/real.rs beside the CachedPSO path, real/dispatch_chain.rs, a new pipeline_library.rs. This machine is the one where blob loads take 10-30 s, so it is the right place for the gate measurement: library load against CachedPSO for the same whole forms. If loads are not clearly under a second I will say so here and release the claim. Draft PR or that answer within 24 hours.

    AI use: Claude Code (a Claude Opus 5.5 sub-agent read both trees; Claude Fable 5.2 wrote this). I have checked the structure of the comparison, not every file reference.

  2. VolenNakov commented on Nov 27, 2026

    @VolenNakov

    claim: C3 (leave out ray-tracing resolve / activation pipelines while the title has built no acceleration structure, behind a switch, off by default).

    • Upstream: Vice-Tay 1f69d67, crates/victory-gpu/src/pipeline/make.rs (left_out, ~40 lines; VICTORY_RT_RESOLVE, VICTORY_ACTIVATE_RAYS, VICTORY_BVH_BUILDER).
    • XCL files I expect to touch: hle/d3d12x/real.rs (where compute pipelines are created and left out), the acceleration-structure build path that gpu/bvh.rs serves (to know whether any structure was built), plus a test.
    • Not ported as is: upstream picks the programs by a name inside the shader container; that is a program-name list, which [OFFICIAL] Swarm: ports from other GPL-3.0 projects into XCL #3011 says must stay out. I will select them by what the program does (and fall back to a user-supplied hash file, as the lab's XCL_PSO_SKIP_FILE does), so no title data goes into the source.
    • The gate first, as the candidate list asks: unlike VIctory, XCL builds console-format acceleration structures (gpu/bvh.rs) and emulates image_bvh_intersect_ray, so its rays may hit. Before writing the PR I will measure on this machine (RTX 4060 Ti 16 GB, i7-8700, no ReBAR, main-based tree) whether the title builds structures and whether those programs' output changes anything. If XCL's rays do produce hits, leaving them out would change the picture, and I will say so here and release the claim instead.
    • What it should win if the gate passes: fewer cold compiles (about 1,000 compute records in this title's pack; a local skip file of exactly these already removed a crash at +0x23cf683 for me on MacieGx's lab tree), and their GPU time per frame.

    Draft PR or the gate answer within 48 hours.

    AI use: Claude Code (Claude Opus 5.5) read both trees and wrote this; I run the tests on my machine.

  3. throny commented on Nov 27, 2026

    @throny
    CollaboratorAuthor

    C1 (pipeline library): first result, and I am releasing the claim. The minimal port exists (480 lines from another project library.rs with its provenance header, behind XCL_PSO_LIBRARY=1, unit and GPU tests pass, an independent review found no blockers), but two runs on the title show it does not reach the pipelines that matter in XCL as it is:

    • Of 245 large compute pipelines created in a run, only 11 are eligible. The rest have a root signature with static samplers, which another project's own notes say come back wrong from a library on NVIDIA, so the port leaves them out.
    • The premise also got weaker on this machine: with the NVIDIA shader-heap profile at 2 GiB instead of 1 GiB, creating compute pipelines of 750 KB+ of DXIL from CachedPSO takes 0.8-4.6 s on average per run here (177-256 of them a run), not the 10-30 s I measured in the preparation workers yesterday. A library could still be faster, but not by the factor that would justify it.
    • The library was never saved in these runs (fewer than 16 stores, and both runs ended in a title crash), so I have no load times to show. I am not spending more GPU time on it.

    If someone wants to continue, the branch is throny/xcl@pso-library (I will push it as it is, unreviewed fixes listed in the commit message); the open question is whether static-sampler pipelines can be made safe. Otherwise C1 is free.

    claim: C6 (CLZERO loops patched at the first fault, at that site only, atomically; from another project 1f69d67 another project/src/console_insn.rs), unless @Prime1997 wants it: say so and it is yours. Reason: it is what blocks a usable picture on Intel CPUs right now. On this i9-12900K the last build with a visible world is 71b9f7b2; from #2892 on the world is black with the eager patch, and with XCL_CLZERO_PATCH=0 (or the commit removed) loading takes 7 minutes and the world then runs at 2 frames a minute. XCL files: eh.rs, loader.rs. Draft PR or a "does not help" within 24 hours.

    AI use: Claude Code (Claude Fable 5.2); the port was written by a Claude Sonnet 5.5 sub-agent and reviewed by a Claude Opus 5.5 sub-agent.

  4. throny commented on Nov 27, 2026

    @throny
    CollaboratorAuthor

    Correction on C6, and I release that claim too. The reason I gave for it (a black world on Intel since #2892) came from a bisect that turned out to be wrong: the "visible" builds before #2892 were still on the loading screens when I sampled them (correction on #2892). The eager patch of #2892 is what makes the world reachable in 3 minutes on Intel at all. The lazy, atomic variant from another project is written and passes its unit tests (branch throny/xcl@clzero-at-fault, pushed as it is), but it fixes no known problem now, so it is not worth a PR unless @Prime1997 or someone else wants it for robustness. C6 is free; C1 as well (see above). I will pick the next piece from the measurements, not from a guess. AI use: Claude Code (Claude Fable 5.2).

  5. ClosetPie107 commented on Nov 27, 2026

    @ClosetPie107

    AMD numbers for "What stops XCL today" (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV, Ryzen 5 9600X, 32 GB; CachyOS, Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194, the lpVtbl checks for command allocators and lists dropped). main 83b00818, release, warm shader cache, XCL_DIRECT_DXIL=1 XCL_PREPARE=1 XCL_PSO_PRELOAD=1 XCL_PSO_WAIT_MS=50 XCL_TEXTURE_LEVEL_PAGES=1 XCL_COHERENT_MB=1024 VKD3D_CONFIG=ignore_shared_fence, 300 s, A pressed every 10 s, 4 runs today.

    1. No 3D picture in the intro. The audio plays and the 2D credit names appear over the intro, but the characters and the scene never show. The runtime is busy all the time: from ~100 s it mostly runs 650–4,200 draws and 3,000–17,000 dispatches per 2 s, at 1–6 presents per 2 s, and only 256 of 96,410 draws and 8 dispatches were skipped. So the title is rendering, but nothing of it reaches the screen. For comparison, VIctory (63bcca4 + its D3D12.X: share dispatch-chain root signatures per device and key compute blobs on NodeMask #2723) on this same machine yesterday played the intro cutscene lit, with characters and hair (~1 fps), then the prologue at 2.9–3.3 fps with ~12.7 GB of video memory (Shader: key every heap handle cache by element type (#177 on main, fixes the NVIDIA compute-pipeline crash) Marvisak/VIctory#2723, my comment there).
    2. Memory: ~10 GiB of video memory at 90 s, and the 16 GiB card full (16.2 GiB) later in every run.
    3. Pipelines: with a warm cache the first present comes at ~33 s. With an empty cache, the startup preparation does not finish within 2 × 20 minutes here, so on Linux a first run without a filled cache never reaches the title.
    4. Stability: 0 crashes in today's 4 main runs. Crashes seen on this machine in other runs: game_scarlett_master.exe+0x23cf683 (a write at address 0; 16 runs on 11-24 and 11-26, at ~110–130 s, and once today while the title was being stopped). @VolenNakov, that is the crash you say a skip file of the ray-tracing programs removed for you, so it may be a point for C3. Also a copy in ucrtbase.dll+0x171d9 writing into title memory right after the writing empty BVH descriptor warnings (3 runs).

    I'll test C3 on this card once there is a draft PR, and can check here meanwhile whether the title builds acceleration structures on AMD, if that helps the gate.

    AI use: Claude Code (Claude Opus 5.5) collected these from the run logs and wrote this; the observation in 1 about what is on screen is mine.

  6. coolpersonnn commented on Nov 27, 2026

    @coolpersonnn
    Contributor

    claim: C2 (cheaper wave64 on 32-lane hardware — exact tiers only: no-cross-half native wave32, exact wave_local allocation idiom, and early-out/skip removal retry order, behind XCL_WAVE_LOCAL=1, off by default).

    • Upstream: Vice-Tay 1f69d67 (inheriting from VIctory 63bcca4 and victory-fork 9a9091d, GPL-3.0-or-later): crates/victory-shader/src/emit/lower.rs (wave_local + no-cross-half/local-wave lowering), crates/victory-shader/src/emit/mod.rs (exact retry order), crates/victory-shader/src/ir.rs (without_early_outs, without_skips).
    • XCL files I expect to touch: new crates/xcl/src/gpu/recomp/wave_local.rs (+ THIRD_PARTY.md), crates/xcl/src/gpu/recomp/mod.rs, crates/xcl/src/gpu/recomp/pso.rs, crates/xcl/src/gpu/dxil/kernel.rs, crates/xcl/src/gpu/dxil/lanes.rs, crates/xcl/src/gpu/recomp/lower_dxil.rs, crates/xcl/src/gpu/recomp/lower.rs (split into stacked PRs under ~400 lines each: analysis + unit tests first, then opt-in lowering + GPU tests, then early-out/skip retry).
    • Gate first: Before opening the first draft PR I will measure on this RTX 5090 / Ryzen 9 9950X3D (Windows) how many compute programs in the corpus qualify for each exact tier and compare DXIL size, --measure-pso compile time, and GPU execution time against Partner::Spin. If the exact-tier hit rate or speedup is too small to justify the complexity, I will post the numbers here and release the claim.
    • ETA: Gate numbers and first draft PR within 24–48 hours.

    AI use: T3 Code (Gemini Pro Orchestrator) compared both trees and drafted this claim; I will review the code and run all builds, tests, and measurements locally.

  7. VolenNakov commented on Nov 27, 2026

    @VolenNakov

    C3: the draft PR is up as #3026 (XCL_RT_LEAVE_OUT, off by default).

    • The gate passed on my machine. The title names 5 acceleration structures, and none got a root node in 900 s, so every ray misses. XCL now warns once in the log if one ever does. The hit-shading programs do not trace rays themselves.
    • A hands-off A/B on an RTX 4060 Ti 16 GB with an i7-8700, same build, the switch the only difference: world presents/s went from 3.98 to 5.25 (+32 %), and driver compiles started during the run from 957 to 418. No errors, removals or wait timeouts.
    • Selection: the programs are named by the user's fragments, so no title names are in the source.
    • Not tested: the picture (the world is grey on this tree), a cold-cache preparation, later scenes, AMD. Testers welcome, especially on a cold cache.

    AI use: Claude Code (Claude Opus 5.5) wrote the port and ran the tests on my machine.

  8. vitor127wt commented on Nov 27, 2026

    @vitor127wt

    Thats weird. The VItory repo seems stalled, not a single merge or commit in days.

  9. throny commented on Nov 27, 2026

    @throny
    CollaboratorAuthor

    New candidates C8-C11 from the upstream watch (another project, 20 commits since 1f69d67, now 57deba5). Read by subject, files and message only; none states a measurement, and I have not checked whether XCL has the same problem, so the first step of each claim is that check. Claim them like the others (claim: C8 …).

    # Piece Upstream commit Size Targets
    C8 The diffuse ambient resolve gets a depth view of the same texture when the bound view is the stencil plane another project 292adb5 (draw.rs, descriptor/host.rs) S (~90 lines) dark / unlit views (#505)
    C9 Due texture slots and the per-frame counters gathered in one pass under one lock another project 369f940 (descriptor/host.rs) S (~75 lines) CPU cost of texture streaming per frame
    C10 A submission's copy runs laid out in one pass instead of three another project bb529f1 (host/send.rs, shadow.rs) S (~170 lines) CPU cost per submit; only if XCL's equivalent is hot
    C11 Every DXIL loop gets a single back edge (a latch block with phis) another project 8058344 (emit/bitcode.rs) S-M (~240 lines) translator; only the rule transfers: check first whether XCL's direct-DXIL path emits loops with several back edges

    Further upstream changes will be added here as C12 and up when the projects move (a script checks every three hours). AI use: Claude Code (a Claude Haiku 5.5 sub-agent screened the commits; Claude Fable 5.2 wrote this).

  10. tiagonleal commented on Nov 27, 2026

    @tiagonleal
    Contributor

    claim: a pipeline build that panics fails like a driver error instead of hanging its waiters (not on the candidate list; a small stability piece).

    • Upstream: victory-fork 46da5ee "GPU: finish a pipeline queue entry when its build panics", crates/victory-gpu/src/pipeline/make.rs, Pending::make_with (author Filip Michalski).
    • XCL files: crates/xcl/src/hle/d3d12x/pso_async.rs (build, the bind-side build in resolve_wait_for, build_pieces), crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs (one lock made tolerant to poisoning), THIRD_PARTY.md.
    • What it fixes in XCL: a build that panics on a worker left its entry "building" forever, so waits without a budget never returned, the worker thread died, and in build_pieces the parent's recv blocked. The test fails without the change (10 s wait, worker xcl-pso-0 dies) and passes with it.
    • No new behaviour for a title: a panicking build now takes the path a failed driver build already takes (stand-in pipeline), so no switch.
    • Draft PR: within the hour, against main; I will link it here.

    Also for the list: the Alt/F10 menu-mode freeze fixed in victory-fork ff8694a is already covered by open PR #1441, so nobody needs to port it.

    AI use: Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing with the supervision of @tiagonleal.

  11. tiagonleal commented on Nov 27, 2026

    @tiagonleal
    Contributor

    Draft PR for the claim above: #3028

    AI use: Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing with the supervision of @tiagonleal.

  12. Decodere commented on Nov 27, 2026

    @Decodere
    Contributor

    claim: C5 (back-off slice only — E_OUTOFMEMORY cooldown + OS commit-headroom upload admission, behind XCL_UPLOAD_BACKOFF=1, off by default)

    Note on scope: full per-texture host-copy VRAM residency admission in C5 remains unclaimed and open for anyone working on that L slice. This claim covers only the standalone S back-off & OS commit-headroom guard (~140–180 non-test LOC), behind opt-in XCL_UPLOAD_BACKOFF=1 (off by default).

    • Upstream source: TaynanGT/Vice-Tay commit 57deba5c4c752b97a8286bdbd80b96517f0988fc, crates/victory-gpu/src/residency.rs (GPL-3.0, inheriting from VIctory / victory-fork).
    • Expected XCL files (nvidia-dev base): new crates/xcl/src/hle/d3d12x/residency.rs (with GPL-3.0 provenance header + matching THIRD_PARTY.md row), plus small wiring in crates/xcl/src/hle/d3d12x/texture_upload.rs, title_textures.rs, sparse.rs, vram.rs, and mod.rs.
    • What it changes (XCL_UPLOAD_BACKOFF=1 only):
      • Keep pooled FREE upload-buffer reuse open while gating fresh CreateCommittedResource upload-buffer growth under low GlobalMemoryStatusEx ullAvailPageFile commit headroom.
      • Preserve E_OUTOFMEMORY detection across texture_upload, sparse, and vram to trigger a shared 500 ms upload cooldown and trim idle FREE upload buffers in title_textures without dropping dirty/pending textures.
      • Track aggregate UPLOAD_DEFERRALS counts (no shader hashes or title names logged).
    • Verification gate (RTX 4060 8 GB, Windows 11, --release): deterministic unit + GPU tests covering default-OFF no-op, 500 ms OOM cooldown, commit-headroom admission, and zero lost dirty textures, plus paired quiet 60 s retail smoke (default vs XCL_UPLOAD_BACKOFF=1) and scripts/pr_check.py --local.
    • ETA: Draft/ready PR expected within a few hours (I will release this claim promptly on [OFFICIAL] Swarm: ports from other GPL-3.0 projects into XCL #3011 if verification hits a blocker).

    AI disclosure: Google Antigravity (Gemini 4 Neon) assisted with the read-only source comparison and drafting of this claim, and will assist implementation and verification on local RTX 4060 8 GB hardware.

  13. UncommonDLL commented on Nov 27, 2026

    @UncommonDLL

    @throny We tested the static-sampler question on a desktop RTX 5070 Ti with driver 621.40. Two fresh processes opened the same 2,202-byte D3D12 pipeline library. One created the CLAMP and WRAP root signatures in the writer’s order. The other reversed them. Both readers loaded both named compute pipelines from disk and returned the expected, distinct texel values. Across the direct baseline, writer and two readers, all eight dispatches completed their fences. There were no load failures or fallbacks.

    This was a standalone compute fixture on local commit 31e8fd133060612327f5c9763363e5ba577c1610, based on your 355919fb experiment. It tested root-signature creation order on this adapter and driver. XCL’s cache keys and the earlier graphics case with an extra sampler were outside its scope. We can share the fixture if useful.

    OpenAI Codex implemented and ran the Windows test. The session identified the GPT-6 family. The exact variant and reasoning setting were unavailable. Claude Sonnet 5.5 with Extra reasoning independently reviewed the method.

  14. throny commented on Nov 27, 2026

    @throny
    CollaboratorAuthor

    @UncommonDLL thank you, that is the question the experiment left open: static-sampler compute pipelines come back right from a library on 621.40 in your fixture, in both creation orders. So the exclusion in 355919fb is probably too cautious for XCL, and with it lifted the library would cover the ~230 large compute pipelines it skipped here. What I still cannot show is the gain: with the 2 GiB shader-heap profile CachedPSO loads of those programs take 0.8-4.6 s each on my machine, so a library has to beat that to be worth its complexity. If you (or anyone) want to take C1 on from that branch, lifting the exclusion and timing library loads against CachedPSO for the same programs is the whole gate; I will test whatever comes out of it on this card. AI use: Claude Code (Claude Fable 5.2).

  15. pvfreis commented on Nov 27, 2026

    @pvfreis
    Contributor

    C11: XCL's direct-DXIL path already has this rule in open #1860 (@Royalflamejlh): gpu/dxil/cfg.rs single_latch gives every loop head and every block one back edge, and module/opt.rs no longer folds the new latch blocks away. Its description measures vkd3d-proton's dxil-spirv segfaulting on 77 of the retail title's 2,682 direct-DXIL compute programs (split wave64 form) without the change and on none with it. Differences from Vice-Tay 8058344: #1860 works on the console program's control flow before lowering rather than on the finished module, and the per-lane form (XCL_PER_LANE=1) is not covered. Both fixes are for Proton (dxil-spirv's structurizer), and #1860 notes that dxil-spirv's master handles these programs without it. So C11 is probably best served by testing or reviewing #1860 (its description lists pixel and vertex programs as not tested) rather than a separate port.

    AI use: Claude Code (Claude Opus 5.5) compared the two diffs; Claude Fable 5.2 rechecked this.

  16. 99 remaining items

  17. changed the title [-][OFFICIAL] Swarm: ports from the VIctory line (GPL-3.0) into XCL[/-] [+][OFFICIAL] Swarm: ports from other GPL-3.0 projects into XCL[/+] on Dec 1, 2026
  18. throny commented on Dec 1, 2026

    @throny
    CollaboratorAuthor

    @KDenKC agreed on both: ray tracing stays on, and step 2 is a clean re-implementation in XCL, not a port. We read that approach before it went offline, so we can write it up as a short design note here (where the PC structures come from, how the node test is answered from a RayQuery, the lifetime rule for unnamed structures, the numbers it reported) as a basis for whoever takes step 2 — words and measurements only, no code. I'll post it tomorrow unless you already have one.

    AI use: Claude Code (Claude Opus 5.5).

  19. KDenKC commented on Dec 1, 2026

    @KDenKC
    Contributor

    @throny findings so far on our side of the split (RTX 5090, read from our logs and code; the in-world runs that test the fixes are next on our rig).

    The title's own ray tracing runs here, so true ray tracing is open to us. Layers that turn ray tracing off on NVIDIA do so because the title's BVH builder (64-lane programs) is refused there; every ray then misses and the interiors need a stand-in light. In XCL on the 5090 nothing is refused: in our room run 1,531 compute pipelines were made, 0 refused, and the 64-lane programs run in XCL's split 2x32 form (106 programs), with console threads taken from a group counter, so NVIDIA's 2-D warp layout does not split console waves wrongly. So the job here is to make the title's own rays correct (and then fast, your step 2), not to replace them.

    What is wrong today, found so far:

    1. The node test reports triangle hits behind the ray's origin. Both the HLSL bvh_intersect and the direct-DXIL lowering check the barycentric signs but never the sign of the distance; hardware reports hits ahead only. A shadow ray that starts on a surface then counts the triangles behind it as blockers, which would darken exactly the indirect-lit and lamp-shadowed areas. Fix: 9 lines (t >= 0 for det > 0, t <= 0 for det < 0), with our own test (a triangle ahead is hit, one behind the origin is missed, both windings, both shader paths); it fails without the fix. Checked against a broader set of ray/node cases, behind-origin hits went to 0 and agreement rose from 436 to 448 of 474; the rest differ at exact box faces, triangle edges and node kinds the instruction doesn't read, reported not asserted. PR after the in-world run.
    2. Indirect mesh dispatch records written as (X, 0, 0) are dropped. The title's terrain tessellation writes them; D3D12 runs nothing for Y or Z = 0, on our two-pass path and on the native one. A switch runs them as (X, 1, 1) on both paths (tests on both); an even stronger rule, the console reading X alone whatever Y and Z hold, is a second value of the same switch. Effect expected on the near ground (black with specks), not on the rooms.
    3. Shader reads of unmapped title memory are silent. A ray program reading a node outside every memory window, or on an unmapped tile, reads zero, so a partly built or partly mapped structure looks like empty space. A counter for the direct-DXIL node test (XCL_RAY_UNMAPPED=1: node tests, nodes outside every window, nodes on unmapped tiles, plus box/triangle tests and hits) is in the next runs; if it is high, a fault-drain (map what rays asked for, next frame) is the next build.

    Module tagging (our step): builder pipelines are tagged at creation (console compute slot 62) and every builder dispatch is counted, including the ones that ran on a stand-in while their pipeline compiled; the first 16 such are logged with the present they hit. That should show directly whether a run's structures were built in part, which fits your "about a quarter of starts dark" on the RTX 4080.

    Whole-frame trace: each pass is tagged as a ray program when one of its shaders has the node test, and the room's lighting inputs are followed back to the ray passes that wrote them, so the first runs show whether the interior's light depends on them, pass by pass.

    Next on our rig (in order): (a) the node-test fix + the mesh-dispatch switch on a tree without #3282 (does the room brighten; hit shares and unmapped counts), (b) the same on our best tree, (c) Pipodi's #3282 placement check. We'll post the numbers here and the dark/lit grade per run.

    AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.

  20. throny commented on Dec 1, 2026

    @throny
    CollaboratorAuthor

    @KDenKC the behind-origin hits are a strong lead for the dark rooms. As soon as the node-test fix and the mesh-dispatch switch are on a branch or PR, we'll run them first on the RTX 4080 (it goes ahead of our baseline runs): same save and inputs, 900 s, lit/dark grade on the wall cells, presents/s and the profile of the ray programs. Tonight's queue is measuring the dark-start rate on current main + #3617 as the baseline for exactly that comparison.

    AI use: Claude Code (Claude Opus 5.5).

  21. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    Baseline for the ray-tracing comparison, as promised: current main 1c8b5514 + #3617, RTX 4080 16 GB, XCL_RESIDENCY_PRIORITY=1, six 900 s runs of the same save and inputs overnight: 1 of 6 starts dark (left wall cells 13 % bright vs 43–66 % in the lit ones), no device removal, no draws skipped, 3.01–3.23 presents/s. When the node-test fix and the mesh-dispatch switch exist on a branch, we run the same six-run block on them.

    AI use: Claude Code (Claude Opus 5.5).

  22. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    New upstream candidates (another project each; read, not built here):

    • C115 5e5b56c: lazily committed allocations are split into sections of at most 64 MB, so a thread no longer waits on one large section's lock per page; its message: 225 such waits took 342 of 367 ms in one profiled stretch. ~230 lines. Worth a look if XCL's large lazy allocations hit the same single-section lock (check first).
    • C116 2092559: the submit thread finds the view copies that reach a written range through a sorted index instead of scanning all of them (~3,900 copies, 1.35 ms a frame saved). Large (+2.1k lines, five parts); only the index idea is worth taking, with its own measurement of XCL's copy scan.

    AI use: Claude Code (Claude Opus 5.5), with a Claude Haiku 5.5 sub-agent reading the commits.

  23. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    #3011 step 2: answering the ray/node test from a PC RayQuery

    Based on another project's approach (since offline), read before it went down. Numbers are its reported ones (one RTX 4070), not XCL measurements.

    What the node test returns, and what XCL does today

    One instruction tests one 64-byte node against one ray and returns four dwords:

    • Box node: ids of up to four children hit within the ray extent, closest first when the sort bit is set; misses all-ones.
    • Triangle node: distance and determinant numerators plus barycentric numerators or a triangle id; a miss is infinity over 1.
    • Instance nodes: all-ones; the title's own compute code walks instances and the stack.

    XCL emulates this per node (HLSL emitter and direct-DXIL lowering), reading console-format nodes from title memory: one dependent memory step per node. Its triangle test has no t >= 0 check, so triangles behind the origin can be reported as hits.

    Where the PC structures come from

    The title builds its structures into title memory with its own compute builder. Right after each build, two small passes read the nodes and write PC-builder input:

    • BLAS: each triangle node becomes two PC triangles (a missing one is NaN), in node order, so PC primitive 2n+t is triangle t of node n. One PC BLAS per title BLAS, keyed by title address; a title refit is a PC refit, a title copy a copy.
    • TLAS: instance nodes become PC instances in node order: the stored world-to-object transform is inverted, all mask bits, the PC BLAS found by sorted lookup of the title address, the BLAS's first triangle node as id. The pass also writes the TLAS root (it moves every build) into a small table shaders read.
    • TLASes are rebuilt every build (fast-build); BLASes only when the title rebuilds, refit when it refits. The host learns what was built from the title's builder library (kind, address, node count, update).

    How the node test is answered; the walk stays the title's

    Every triangle is a candidate (no culling, no opaque decision, no procedural), so the title's masks, culling, any-hit code and shading run unchanged. One RayQuery per instruction site:

    • TLAS root box: the next candidate: two children, the candidate's instance node and the root again; none when exhausted. A ray extent shorter than the committed distance means the title took the last candidate: commit first. A new root or ray starts a new query.
    • Box after an instance: one child, the candidate's triangle node.
    • Triangle node: the candidate's distance and weights with determinant +1 (front) or -1 (back) if the pointer names it; otherwise a miss.

    The walk visits two nodes per hit triangle instead of every box. This relies on the standard console walk: its stack takes any children and stops when a pop finds none. The PC order is not strictly nearest first; the title's own nearest-hit logic keeps the closest committed hit.

    Lifetime rule

    The first version never gave structures up: 5.6 GB of card memory, a lost card at 13.6 minutes. Rule:

    • The TLAS pass marks every BLAS a TLAS names (with the frame count); marks are read back a few frames later.
    • A BLAS no TLAS named for 300 frames leaves the lookup at once; its memory goes 96 frames later (every TLAS is rebuilt within 32).
    • A BLAS named after all is remade from title memory on demand.
    • A pool with nothing live for 120 frames is returned to the card (empty pools returned, not kept).

    Numbers reported

    • One recorded frame: nine ray programs 3.4 ms against 33 ms (good run) to 190 ms (bad run) emulated.
    • About 36,000 real hits against a few hundred (most emulated rays hit the walk's step limit).
    • After the fix: structures about 630 MB over 20 minutes (2.6 GB of pools made in a streaming burst); building 2-6 ms a frame (was 21-92 ms).

    Requirements

    DXR tier 1.1 (checked at start; otherwise the emulated path stays), a shader-visible table of TLAS roots (16 reserved view slots), and a switch, off at first.

    Risks for XCL

    • Behind-origin hits: KDenKC found XCL's node test reports triangle hits behind the ray origin. The PC query will not, so the paths differ; decide which is right (hardware returns no negative t) and fix the emulation first, or exclude those rays from the comparison.
    • Partial builds: while builder pipelines compile on stand-ins, builds are empty or partial. The passes must refuse headers or counts that look unfinished (empty BLAS, instance without PC address), and drop zero, NaN or infinite transforms.
    • Memory budget: a second copy of every structure plus build scratch. On 8-12 GB cards the lifetime rule is part of the feature, not polish.
    • Wrong primitive/id mapping fails silently as wrong shading; test sparse and rotated triangles.

    Suggested PR split (each under ~400 lines)

    • (a) PC structure build from the title's builds behind a switch (off): both passes, BLAS/TLAS maps, refit and copy, refusals; a card test against the CPU reading of the same nodes.
    • (b) RayQuery-answered node test behind a second switch: the three cases; a per-instruction GPU test running the same rays through the emulated and PC paths, skipping without DXR 1.1 (behind-origin rays excluded until settled).
    • (c) Lifetime: marks, 300/96-frame give-up, remake on demand, empty pools returned; card tests (kept while named, given up when unnamed, remade, same hits).
    • (d) In-world measurement: counters and a log line (structures held, pools returned, build ms); a 20-minute run on the retail title with memory and frame numbers; decide the default from them.

    @KDenKC @rison1337 as promised; corrections welcome before anyone claims step 2.

    AI use: Claude Code (Claude Opus 5.5); drafted by a Claude Sonnet 5.5 sub-agent from a read of that code, no code copied.

  24. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    Candidates from a read of another project's code (GPL-3.0; read, not built or run; its numbers, not ours). The headline: on an RTX 4060 Ti 16 GB at 1440p output it reports 50–56 ms of GPU time per frame (16–18 rendered fps, ~10,500 draws, frame generation not counted), against ~0.8 s per frame for XCL on an RTX 4080 at 4K Series X — and its GPU time barely changes between 1080p and 1440p, so the gap is not resolution. Its per-draw cost is ~4 µs; XCL's small operations cost ~45 µs each in our profile.

    AI use: Claude Code (Claude Opus 5.5), with a Claude Sonnet 5.5 sub-agent reading the code.

  25. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    claim: C117 (whole-program paired-lane wave64 form, including memory and LDS, on 32-lane GPUs), as a re-implementation in XCL's direct-DXIL translator. First only a prototype behind a switch on the most expensive "split in halves" program of our profile, with one in-world A/B; the PR series follows only if that program gets substantially cheaper. Builds on our earlier folded-form work (#3529/#3530/#3543).

    AI use: Claude Code (Claude Opus 5.5).

  26. throny commented on Dec 2, 2026

    @throny
    CollaboratorAuthor

    C117 prototype result, and releasing the claim: a paired-lane form (one 32-lane host wave runs a whole 64-lane console wave, memory, LDS, DPP, swizzle and permlanex included) was built for the most expensive "split in halves" program of our profile and matches the split form bit for bit in a GPU test. In the world (RTX 4080, 900 s each) that program cost 19.0 ms per call paired vs 20.0 ms split — its time is its own work, not the exchange between halves. Applied to all programs it could take (154), the run got slower (3.19 → 1.06 presents/s): programs with several console waves per group (16x16x1, 256x1x1) cost 32–100 ms per call paired, cause not investigated. So on this card the exchange is not where the time goes, and a PR series is not worth it for speed as measured; the code stays on our side if someone wants to pick up the multi-wave case.

    AI use: Claude Code (Claude Opus 5.5); the prototype and runs by a Claude Fable 5.2 sub-agent.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions