Skip to content

Integrate the fxceless base (rendering + performance + ray tracing) with this fork's infrastructure - #29

Merged
devin-ai-integration[bot] merged 30 commits into
mainfrom
devin/integration-2
Nov 25, 2026
Merged

devin-ai-integration[bot] merged 30 commits into
mainfrom
devin/integration-2

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Integration of the fxceless/victory-gta6 tree as the rendering/performance base, layered with this fork's infrastructure. (Replaces #18 — same content, fresh branch because the old branch's CI concurrency group was held by a stuck workflow run.)

What the fxceless base brings (none of which this fork had):

  • Rendering: meshlet culling, light read-back through real copies (sky, probes, fog), fog reconstruction / shadow-mask / hair / blend-shape skinning / fire / material programs translating, gathers at a named mip level, implicit-level samples outside pixel shaders (730 compute programs), rectangle lists.
  • Performance: VICTORY_RELAY copy-back relay thread, VICTORY_WIDE_BACK, in-place buffers, late waits, card copies — 3–6 s → 240–450 ms per frame on their test machine.
  • Ray tracing: console BVH node test emulated in DXIL (compute, no DXR), 59/64 trace programs translating.
  • Measured state there: boot/menus 30 fps, opening cutscene complete, prologue renders, saves work; 2.5–4 fps in the world on i7-14700KF + RTX 4070.

On top of their tree, this PR carries only:

  • Linux/Proton chain (shell.nix, scripts, docs), extended CI (linux-subset.yml jobs), compatibility/debugging docs, this fork's README.
  • CI fixes needed because our checks are stricter than theirs: cfg(windows) gate back on the loader's crash module, clippy lints (dead code, sort keys), the fixture lints block, unbracketed private intra-doc links, the depth-bounds test skipping on hosts that report but do not enforce support (WARP), and RUSTFMT_CRATES scoped to the crates the tree keeps rustfmt-clean.

Deliberately deferred as follow-up re-ports (dropped here because they depend on this fork's old emit architecture, which the fxceless tree supersedes):

  1. Mesh shader emulation (GPU: tolerate repeated command-list close #25/Shader: add mesh emulation translation and cache metadata #26) — top priority: the RX 580 unblocker, must be re-based onto the fxceless emit stack.
  2. Barrier coalescing (GPU: coalesce texture state barriers #23), parallel refreshes (GPU: copy submission refreshes on worker threads #22), repeated-close tolerance, streaming BCPack (Formats: stream BCPack decoding without per-call allocations #17), frame-time percentiles (Log frame-time median and p95 #24).
  3. This fork's older unique pieces: breadcrumbs, signed-overflow helpers, FreshTable, known_mapped, descriptor words.

Verified before adopting: this fork's upstream shader waves are a subset of their tree (test counts match exactly). Local: cargo check --workspace and clippy -D warnings clean, test binaries compile.

Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed

fxceless and others added 26 commits November 24, 2026 13:02
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI
(Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README
describes the state, the changes and the credits. Based on VIctory by Marvisak
and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as
a reference. No game files are included.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- 59 of the 64 trace programs and the irradiance-cache shading program
  translate; 51 programs leave the approximate wave64 forms.
- The workspace passes the lint with warnings as errors in both feature sets;
  a few style lints are let through in Cargo.toml for this fork.
- README status updated (relay and in-place memory results);
  docs/fork-ray-tracing.md describes what the title does and what is built.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: ZazaJr24 <218105339+ZazaJr24@users.noreply.github.com>
…ning

- Shader tests: a software adapter given as the default device is not taken
  for a hardware device, so the tests that need a real card skip there.
- Diagnostics: the stencil plane of dumped depth-stencil targets and the
  title's descriptions of its stencil views.
- README: the newest commits lose the GPU device shortly after start on the
  test machine; the cause is not found yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The update moved the particle light-atlas compute programs to a form that
puts group barriers inside branches and loops; a dispatch of them stood on
the card until the device was reset. That form is now off unless
VICTORY_WAVE_WIDE=1, and the shader cache key includes the wave switches.
Checked with a plain run of this tree on the test machine.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…apter

Hosted runners list a display stub first, so the default device there is the
software adapter; the tests that need a real card now skip it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Clean-up passes over each translated module (VICTORY_SHADER_OPT bits: dead
  code, folding, reuse, branch facts, loads within a block, wave64 first-lane
  exchange), part of the shader cache key. About 43 % fewer host instructions
  over the pack; about 20 ms less GPU time per frame on the test machine.
- translate: a census of the emitted code.
- Checked with plain game runs of this tree on the test machine.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ative VGPR reads keep parked lanes (#11)

The console compiler parks a wave64 lane mask in two lanes of a spare VGPR
and may restore the halves with other instructions between the two
v_readlane_b32. The pair restore now looks ahead in the block (nothing between
may touch the second register, write the first, or save into the lanes), so
the mask comes back as a mask. This lets indirect_light_probes
CS_IrradianceCache_Shade / ShadeSecondary translate: they were dropped every
frame, leaving the irradiance cache unlit and everything in shadow black.

An M0-relative read (v_movrels_b32) names every VGPR from its base up, which
marked the parking VGPR as an ordinary one and turned unspilling off for the
whole program. Relative reads no longer count there (relative writes still
do). billboard_nobump CS_RaytracingResolve_a56bfb9c translates with it.

translate: VICTORY_TRANSLATE_ONLY=<hash prefixes> limits a run to those
containers; VICTORY_HOST_MAX_WAVE=32 translates as on a 32-lane host, so
--pipelines matches what the runtime creates on NVIDIA.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Comments, documents and descriptions now say "the title". No code changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Its programs translate and run, but on the test machine the lighting gain
could not be shown, it costs about 40 ms of GPU time per frame, and the
picture is being re-checked one change at a time from a known-good tree.
It may come back once that is settled.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The previous commit took it out; that was not wanted. The tree is again as
it was before that commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Double-precision shader instructions (v_cvt_f32_f64, v_add_f64 sums, the
makeDouble overload name and flag), a first half of a paired interpolation
read as data, sooner eviction of idle textures and caches under memory
pressure, a retried DirectStorage destination write, the texture catch-up
budget, VICTORY_FIRSTLANE_OWN, and zlib-rs in place of miniz_oxide.

Left out: the fork's personal launcher scripts and its readme.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e commit)

Every host view heap ends at a null slot that view indices past the heap
read (a host that takes large heaps gets 2^21 views; one that caps them
keeps the capped heap), the cache key includes that limit, and
v_permlane16/x16 are lowered.

Both forks lower v_cvt_f32_f64. The IEEE form with its test is the one in
use; this branch's flush-to-zero form is kept beside it, unused, and its
test is ignored until the console's float mode for the instruction is
checked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…acters' skin and hair without colour in most launches)

A texture a shader picks by index was uploaded once, when the title wrote
its view, and again only if the view was rewritten or the runtime told of
a remap. The title often fills the texture's memory only afterwards (its
streaming reads land later), so the host copy kept what the memory held at
the first look for the rest of the run: zeros. Which textures lost that
race changed from launch to launch; the main character's face came out
black and her hair pale in about three launches of four.

Now a texture uploaded whole is looked at again after 4, 12, 40, 120 and
400 frames (a fingerprint of 48 KiB of its memory); a changed one is
uploaded again and the looks start over. One test launch re-uploaded more
than 6,000 textures this way. VICTORY_HEAP_RECHECK=0 turns it off.

Known gap: the fingerprint samples the start, middle and end of the
memory, so a texture whose other parts arrive later is still missed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he card before the character bake; one host copy per placed texture

- The depth bounds test (#82 by Kaivyyy, as is): a pipeline that enables
  it is made from a DEPTH_STENCIL1 stream under its own library name, and
  the title's OMSetDepthBounds reaches the host list. Before, such draws
  passed at every depth. On the test machine (RTX 4070) the first room is
  lit by its lamp for the first time: walls, table, bunks.
- Defaults: what shaders wrote is copied back by a thread of its own
  (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and
  256 lists in the air. About 230 ms a frame where it was about 400.
  Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16
  VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128.
- Textures picked by index are uploaded while loading and before a draw of
  the title's decoration bake, which samples them by index and runs once
  (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off).
- Placed textures are keyed without the filler words of their description:
  two views that differed only there each had a host copy
  (VICTORY_PLACED_FILLER=1 keeps the old key).
- VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may
  get before textures picked by index wait.

Known: the first room's walls are still missing in some launches, and
shaded areas are too dark (the bounce light has no ray-tracing structure
to trace yet).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…freshed when the card is full

Two fixes for textures that shaders pick by index, both proven with a
slot listing before they were made:

- The title keeps only a texture's small levels and places the next
  texture in the address range of the absent large ones. Described at full
  size every neighbour overlapped, and each view written took the textures
  beside it out of the upload queue and made their host slots null (tens
  of thousands of slots a run). A newer view now makes an older one stale
  only when it starts within that one's first 4 KiB.
  VICTORY_STALE_TEXTURES=overlap: the old rule; =0: never. Unit tests on
  the span table alone. The first room is lit with its walls and the
  characters' textures in the first launch with it.
- With the card at its limit, a texture that already has its host copy is
  uploaded again when the title changed its memory (it took no new card
  memory, and was refused all the same).
  VICTORY_REUPLOAD_WHEN_FULL=0: as before.

Logging only, off unless asked for: both video memory groups and budget
moves; card accounting (VICTORY_CARD_ACCOUNTING=1); the slots a listed
draw's shaders read, with their state (VICTORY_LIST_SLOTS=); a trace for
the missing first-room walls (VICTORY_WALLS_TRACE=1 or 2). A card test of
what a bare command costs (ignored by default):
cargo test -p victory-gpu --release -- --ignored bare_command_cost --nocapture

Known: about 3 to 5 frames a second; more than half of the texture memory
on the card is held for levels the title has not loaded yet (next).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The fxceless tree is strictly ahead on everything the game needs:
the rendering fixes (meshlet culling, light read-back, fog, shadow
mask, hair, skinning, gathers at a named mip, rectangle lists), the
performance work (relay thread, wide copy-back, in-place buffers,
late waits, card copies), and the compute-emulated ray-tracing
machinery. The shader-stack content of this fork's upstream waves is
a subset of it (wave64, permlane16, heap clamp, atomics, waterfall);
the test counts match exactly.

This commit keeps the fxceless tree as-is and adds this fork's
infrastructure: the Linux/Proton chain (shell.nix, scripts, docs),
the extended CI jobs (linux, windows-target-check, msrv) and the
debugging/compatibility docs.

Follow-ups re-apply the pieces genuinely unique to this fork
(breadcrumbs, descriptor words, signed-overflow helpers, FreshTable,
known_mapped) one at a time, where their architecture has no better
answer.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Resolves the divergence in favour of the fxceless tree everywhere:
their architecture supersedes this fork's divergent GPU/shader
pieces (address_map, breadcrumbs, profile, per-test emit modules
now consolidated differently in their tree). The pieces genuinely
unique to this fork come back as small follow-up PRs where their
tree has no better answer. Keeps this fork's xtask (Proton/Linux
tooling), githooks, workflows and docs.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
main gained PR #17 (streaming BCPack decode) while this integration
was in flight. Resolved in favour of the fxceless tree as with the
rest; the streaming-decode improvement is a candidate for re-porting
as a follow-up since their formats crate diverges.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- loader: crash is windows-only again (the fxceless tree dropped the
  gate; the linux subset builds the crate without windows-sys)
- shader: the test-module imports used only by windows tests are
  windows-gated (unused-import errors in the linux clippy)
- gpu: placed_filler_twins is read only by the diagnostics-gated
  copystat module, so it is gated the same; the test Rig keeps its
  depth view in _depth_written (kept alive, never read);
  sort_unstable_by_key for the diagnostics sorts (clippy)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- tests/fixtures/hle-probe: repeat the workspace lints as the policy
  check requires (the fxceless tree never had that check)
- gpu draw: sort_unstable_by_key(Reverse) for the rect sort
  (clippy::unnecessary_sort_by)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- linux-subset: RUSTFMT_CRATES back to the crates the fxceless tree
  keeps rustfmt-clean (core/pe/pipeline/game/xtask); re-widening the
  list is a follow-up of its own
- shader: unbracket the intra-doc links to private Tracer::lane_copies
- gpu: the depth-bounds test now skips on hosts that report support
  but do not enforce it (the software adapter), keeping the full
  asserts on hardware that does

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
main moved meanwhile: the other sessions' rx580 work — mesh shader
emulation (#25/#26), barrier coalescing (#23), parallel refreshes
(#22), repeated-close tolerance, streaming BCPack (#17). Resolved in
favour of the fxceless tree as before: those features are main-only
and depend on this fork's old emit architecture, so each is a
re-port follow-up on the new base. Mesh emulation is the top
priority of those — it is the RX 580 unblocker.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Personed and others added 2 commits November 25, 2026 06:12
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Personed and others added 2 commits November 25, 2026 06:19
main gained mesh-emulation GPU dispatch (#30). Same resolution: the
fxceless tree wins; re-porting mesh emulation onto it is the top
follow-up.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…guate windows()

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants