[OFFICIAL] Swarm: ports from the VIctory line (GPL-3.0) into XCL #3011

Open
opened 2026-11-27 12:20:41 +00:00 by github-bot · 2 comments
Owner

@⁠throny on GitHub · 2026-11-27 12:11 UTC · original

Goal

Coordinate ports from the VIctory 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 (https://github.com/vuyp/gta6-pc-race) lists about 37 projects ahead of XCL on this title; nearly all descend from one Rust code line: VIctory, victory-fork and, built on them, Vice-Tay, 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)

  • Keep the original copyright and licence notice; add a provenance note in the file header (project, URL, licence, date of changes) and an entry in THIRD_PARTY.md. GPL-3.0-only files stay GPL-3.0-only inside XCL.
  • 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. Say which upstream commit the code was taken from.
  • 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).
  • Credit the upstream authors in the PR description.

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 (#2403), and a black world on Intel CPUs since #2892 (being looked at there).

Candidates

A first comparison of how the VIctory 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

  • The licence itself (#3002).
  • Work that is not a port: the existing official issues stay where they are (#2088 for cold pipeline compilation).

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.

**@⁠throny** on GitHub · 2026-11-27 12:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/3011) # Goal Coordinate **ports from the VIctory 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 (https://github.com/vuyp/gta6-pc-race) lists about 37 projects ahead of XCL on this title; nearly all descend from one Rust code line: [VIctory](https://github.com/Marvisak/VIctory), [victory-fork](https://github.com/fxceless/victory-fork) and, built on them, [Vice-Tay](https://github.com/TaynanGT/Vice-Tay), 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) - Keep the original copyright and licence notice; add a provenance note in the file header (project, URL, licence, date of changes) and an entry in `THIRD_PARTY.md`. GPL-3.0-only files stay GPL-3.0-only inside XCL. - 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. Say which upstream commit the code was taken from. - 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). - Credit the upstream authors in the PR description. # 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 (#2403), and a black world on Intel CPUs since #2892 (being looked at there). # Candidates A first comparison of how the VIctory 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 - The licence itself (#3002). - Work that is not a port: the existing official issues stay where they are (#2088 for cold pipeline compilation). 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 12:20:41 +00:00
Author
Owner

@⁠throny on GitHub · 2026-11-27 12:18 UTC · original

Candidates: what the VIctory line does differently, and what to port first. From a read-only comparison of Vice-Tay 1f69d67 (with VIctory 63bcca4 and victory-fork 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 Vice-Tay victory-gpu/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) victory-shader/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 victory-gpu/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) victory-gpu/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 victory-loader/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 victory-loader/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 victory-formats/src/texture.rs (AMD addrlib); a Wine patch under linux/ (do not port); credits to the Belobug and fxceless 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 Vice-Tay 1f69d67 victory-gpu/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.

**@⁠throny** on GitHub · 2026-11-27 12:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/3011#issuecomment-7218087843) **Candidates: what the VIctory line does differently, and what to port first.** From a read-only comparison of Vice-Tay `1f69d67` (with VIctory `63bcca4` and victory-fork `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 | Vice-Tay `victory-gpu/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) | `victory-shader/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 | `victory-gpu/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) | `victory-gpu/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 | `victory-loader/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 | `victory-loader/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 `victory-formats/src/texture.rs` (AMD addrlib); a Wine patch under `linux/` (do not port); credits to the Belobug and fxceless 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 Vice-Tay `1f69d67` `victory-gpu/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.
Author
Owner

@⁠VolenNakov on GitHub · 2026-11-27 12:21 UTC · original

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 #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.

**@⁠VolenNakov** on GitHub · 2026-11-27 12:21 UTC · [original](https://github.com/xcl-dev/xcl/issues/3011#issuecomment-7218139224) **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 #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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.