Skip to content

Integration / RTX 3080 Ti validation stack on 9376fd6 (22 PRs + #518/inflight + CBV clamp) - #770

Open
ExoCalibra wants to merge 52 commits into
fxceless:mainfrom
ExoCalibra:integration/rtx3080ti-8dd30ab
Open

ExoCalibra wants to merge 52 commits into
fxceless:mainfrom
ExoCalibra:integration/rtx3080ti-8dd30ab

Conversation

@ExoCalibra

@ExoCalibra ExoCalibra commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

Validation & integration stack on top of official main (9376fd6) for Windows 11 + NVIDIA RTX 3080 Ti (12 GB VRAM, SM 6.6, Wave32, 64 GB RAM) running retail Xbox Series X|S (�1.0.2.1).

Built on 9376fd6 (multi-view page guards, byte-copied descriptor mirroring, #670 write-watch skip, #648 VICTORY_CARD_FETCH_INFLIGHT=1, #633 unused_descriptor_kind, VICTORY_LEVELS_ON_DEMAND=1, translator-keyed shader cache), cleanly integrating 22 community PRs plus 2 small local integration fixes.


Community PRs Included (22)

Input

GPU / Performance

GPU / Rendering & Video

Shaders & Formats

Local Integration Commits

  • cf43f2 — Clamp D3D12_CONSTANT_BUFFER_VIEW_DESC.SizeInBytes to D3D12's 64 KiB (65536) limit (checked_next_multiple_of(256)) in crates/victory-gpu/src/descriptor/host.rs (prevents x887A0001 DXGI_ERROR_INVALID_CALL on oversized CBVs).
  • 42e2aa3 — Update warp_card_fetch_copies_flagged_pieces_to_their_slots test in crates/victory-gpu/src/indirect.rs to use card_compare_dispatch so Card compare: one thread group per 64 KiB piece instead of one thread #518 and 9376fd6's inflight fetch work together.

(Thanks to @ArturoWolff for testing notes on depth-pyramid shader ceb5eb68cd99cb07 / #203.)


Verification (RTX 3080 Ti 12 GB, Windows 11, Series X mode)

claude-GTA6 and others added 18 commits November 24, 2026 19:54
…le [controls])

The title reads gamepads and keyboards only (it registers no mouse), so
the keyboard and mouse act as a pad: on the first connected host pad, or
on the stand-in pad when none is. The series' usual PC keys sit on the
console buttons that do the same; F switches to a vehicle layout (W/S on
the triggers), G switches it alone.

Mouse look: raw input (no pointer acceleration) becomes the right stick.
The title reads its stick as a turn rate, so the counts since its last
pad read are divided by the time since then, at that read: the same hand
movement turns the same angle at any frame rate (spans up to 1 s, for
today's slow world frames). The title's stick dead zone and curve can be
undone (stick_deadzone, stick_curve), a flick past full stick is turned
in full a little later, and the cursor is hidden and held in the window
while it has focus (Alt-Tab or Esc frees it, a click or Esc captures it;
the capturing click is no shot).

Pad and keyboard/mouse work together: buttons OR, triggers max, each
stick from whichever device moved it last (a resting pad's drift never
takes it). Presses and wheel steps stay down until the title has read
them, so taps shorter than a frame count.

Letters, digits and punctuation are the keys at their places on a US
keyboard (scan codes), so the left stick is Z Q S D on an AZERTY
keyboard with no setup; keys_by_position = false matches by letter.

[controls] in victory.toml sets and rebinds everything; enabled = false
keeps the old stand-in pad. The scripted VICTORY_KEYS keep their meaning.

Diagnostics: VICTORY_KBM plays keys and mouse motion into this layer;
gameinput=debug logs each pad state the title reads.

First written for Marvisak/VIctory#1529.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The compare's single thread per piece walked 4,096 dependent 16-byte
steps, so every pass took the time of a whole piece (0.4-0.77 ms on an
RX 9070 whatever its group count) and several hundred passes ran a
frame. Now 64 threads hash a piece together, each taking every 64th
16-byte block, and thread 0 folds their hashes in thread order.
card_compare_dispatch records a pass as a group per piece, in
dispatches of at most 65,535 groups. New WARP test: a change in every
part of a piece is flagged, also with a skewed copy and swapped blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nst their definitions

ds_sub_u32 and ds_sub_rtn_u32 were emitted as an `atomicrmw sub`. DXIL's
atomic operations are add, and, or, xor, min, max, unsigned min and max and
exchange (the global atomics here already add the negated value for the same
reason). Run on WARP with the shader's WaveSize left out (as fxceless#78 does for
one-thread groups, so that WARP takes the pipeline at all), the first
dispatch of a ds_sub program removes the device (DXGI_ERROR_DEVICE_REMOVED),
which fails every GPU test after it in the process. The LDS path now adds
(0 - value), which returns the same old value and leaves the same new one.
The title's shader pack has no program with ds_sub (a translate run over all
26148 programs counted none), so nothing there changes; a shader of another
title with the instruction would have hit it.

The new test runs the 32-bit LDS atomics the translator lowers (add, sub,
and, or, xor, min and max signed and unsigned, compare-and-store) on one
dword over 128 cases of initial value and operands from the 32-bit edges, in
both the form without a result (the new content is read back) and the _rtn
form (the old content comes back), against the definitions in Rust. With
the change every operation agrees on WARP (the run above); before it the
first ds_sub case removes the device. Like the other single-thread LDS tests
it runs on the hardware adapter only (WARP refuses the WaveSize(32) such a
shader declares). ds_rsub, ds_inc, ds_dec and ds_mskor have no lowering and
are not in the table.

Assisted-by: Claude Code (Claude Sonnet 5.5)
…oes not capture it

Dragging a window border with the cursor captured collapsed the window
to its title bar: every poll clipped the cursor to the client area, and
the clip followed that area as the size loop shrank it (reported with a
repro on the pull request).

- Between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE the cursor is the user's:
  a captured cursor is freed when the loop starts, nothing captures or
  clips during it, and it stays free afterwards until a click in the
  window.
- Focus gained by a mouse click no longer captures by itself: a click in
  the client area captures (as before), one on a border or the title bar
  does not. Focus gained without a button down (Alt-Tab) still captures.
- A captured cursor is held 16 px inside the client area, so it cannot
  reach the borders; a client area too small for that is not clipped.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n cast (fxceless#578)

A shader view of a typed texture in another format of its family was
given the texture's format. For RGBA8 that dropped the sRGB conversion:
an sRGB view of a UNORM texture read its texels as linear, and a linear
view of an sRGB texture read them converted.

On a host that reports CastingFullyTypedFormatSupported (Options3, queried
once and logged), an RGBA8 shader view now keeps the sRGB or linear format
it asks for. Unordered access views, other format pairs and hosts without
the cast are as before. The fix follows the patch proposed in fxceless#578.

Test: rgba8_views_keep_their_srgb_conversion samples one 0x80 texel on the
GPU through all four texture/view pairs. Here the sRGB view of
the UNORM texture reads 0.2159 with the change and 0.5020 without it.
Under the D3D12 debug layer the views raise no messages. Inplace's Rig is
pub(crate) so the test can use its queue.
…n mode

Measured with `victory translate --validate` over all 26,148 programs of
the title, against 310c6eb: vertex and pixel programs validated
14,065 -> 14,173, mesh 8,657 -> 8,691, compute unchanged (2,722).

- Signature parts keep the console's element order instead of sorting
  by register and column: the validator rebuilds the parts from the
  metadata in element order and compares bytes, so a program listing
  TEXCOORD16 before TANGENT0 in one row was refused.
- Elements sharing a row get one interpolation mode (the validator
  refuses a row whose modes differ): the mode of the elements the
  program reads; constant when none is read, or on an output row with
  a constant member.
- A test for a 16-bit write over an f16 first half
  (PS_DeferredTextured_c5fd36bb), which the first-half fix on main
  already passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pipeline whose blend description enables blending on an integer render
target (UINT/SINT) is created as it is today. D3D12 calls that an error
(debug layer message 676: "The render target format at slot 2 is format
(R8_UINT). This format does not support blending", from a G-buffer pass
of Grand Theft Auto VI), and what NVIDIA's driver then writes to that
target is undefined. The console's blender passes integer targets
through.

GraphicsState::host_blend turns blending off for every integer slot,
spreading the first slot's description to all of them first when the
title's description is not independent (D3D12 applies RenderTarget[0]
to every slot then). Float and UNORM targets keep the title's blend.
Both the plain and the stream (mesh, depth bounds) pipelines use it.
VICTORY_FIX_INTBLEND=0 keeps the title's description as it is.

Four unit tests cover shared and independent blend descriptions, a
non-blending integer slot, and float-only targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rHNfuPpCyeMjHxWTEyhiQ
GraphicsState::describe, part of a pipeline's library name and of its
early-start key, formatted the title's blend description. With integer
slots now made without blending, a pipeline stored by an earlier build
(or with VICTORY_FIX_INTBLEND toggled) kept its name, and the pipeline
library would refuse it at every run (its description no longer
matches) and never store the new one. describe now formats host_blend,
so two descriptions the host turns into the same pipeline share a
name, and different host pipelines never do.

New test: descriptions that differ only in an integer slot's blend
describe the same; a float slot's blend still tells them apart.

Reported by @avt0m4t48 in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rHNfuPpCyeMjHxWTEyhiQ
Handle arbitrary combinations of Source::Phi and Source::Select for both
uniform heap-indexed descriptors and immediate constant samplers:

- In resource::Tracer::phi, when classifying all predecessors fails,
  prune provably dead incoming edges with Tracer::meet so dead edges
  become None in Source::Phi (while unwrapping single live constant or
  root-descriptor edges).
- In emit::lower, replace descriptor_phi with uniform_heap_index for
  arbitrary nested Phi/Select over heap descriptors, and add
  const_sampler_choice/const_sampler_index to dispatch image sampling
  and LOD calculation across distinct immediate constant samplers chosen
  by control flow.

Archive census on shaders.rpf: +37 VS+PS (14,164 -> 14,201 / 14,247),
+3 MS (8,762 -> 8,765 / 8,765, 100%), reducing 'a descriptor chosen by
control flow' from 40 to 0 with 0 regressions.
…n executions (VICTORY_INDIRECT_KEEP=1)

Every indirect execution ended with a transition of its scratch buffer back
to COMMON: a barrier between every two indirect draws, also between those
reading one window clamped once for all of them (VICTORY_INDIRECT_WINDOW).
On an RTX 3080 Ti a barrier between draws costs about 1.1 microseconds and
a compute pass of ours between draws about 5 (`bare_command_cost` (c) and
(h)), and the transition here waits for the execution that just read the
buffer. With the switch the scratch stays in INDIRECT_ARGUMENT and goes
back only before a clamp writes it again; a buffer decays to COMMON when
its submission is done, so a list still starts with it there.

The world, a still scene, Series X, 4,800 draws a frame (ms a frame | GPU):
neither switch 283 and 250 | 96-100; WINDOW=1 260 | 110; KEEP=1 269 | 97;
WINDOW=1 and KEEP=1 209, 204, 204 | 64, 61, 60. The two together are what
helps: the window leaves most draws without a clamp, and the switch leaves
them without the barrier. Proposed: KEEP on whenever WINDOW is, and both on
by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured in the opening lookout scene (two scripted 420 s runs, one capture
every 10 frames): right stick 0.30 turned ~0.04 px per frame, 0.49 turned
1.9 px, 1.0 about 5 px. The title's dead zone sits near 0.3, so mouse
motion under ~600 counts/s at sensitivity 1.0 used to turn nothing.
stick_deadzone now defaults to 0.3; curve and sensitivity stay 1.0.
Tests of the linear mapping set deadzone 0.0 themselves.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 538c7883d495eb77045df5b6522df62b0d2c0d04)
…E_TEXTURES=1)

While the world streams in, a submission checks hundreds of textures one
after another on the submitting thread: each is read, hashed whole and,
when it changed, detiled into its staging buffer. With the switch the
checks that come due in a batch are queued (Batch::textures_due) and run
at its next flush, before a step that writes title memory and before the
lists run, so their order against those steps is unchanged, on the
threads kept for the snapshots (shadow::wide_run). Each check reads its
texture's title memory and writes its own staging buffer and notes under
its own lock, and a texture is queued once per batch (texture_due), so no
two threads check the same texture. The frame line's "textures" counts
the time it took, not the threads' sum.

Measured on the opening cutscene and the first world minutes (RTX 3090
Ti, 8dd30ab, same binary, one launch each):

  default                        frame ~1,030 ms, textures ~330 ms
  VICTORY_WIDE_TEXTURES=1         frame   ~826 ms, textures ~120 ms
  VICTORY_TEXTURE_NO_WAIT=1       frame   ~654 ms, textures  ~44 ms
  both                           frame   ~518 ms, textures  ~16 ms

Steady state after streaming: 4.0-4.3 fps in all four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rHNfuPpCyeMjHxWTEyhiQ
@ArturoWolff

Copy link
Copy Markdown

I replayed two retained Linux/Proton shader samples against the stack at 17b9f09 and its common base 8dd30ab, using the direct translator on Linux, hash-checked inputs, a 32-lane compiler limit, and independent builds. This is a different sample from your 1,164 runtime hashes.

This checks translator coverage, not a Linux gameplay run, PSO creation, or the cause of the black frame. I haven't attributed any of the 361 differences to individual PRs. No game files or captures attached.

AI disclosure: Hermes Agent ran the replay and validation and wrote this comment on ArturoWolff’s behalf.

marquezinii and others added 11 commits November 25, 2026 04:24
…texture

A title texture's staging buffer was an upload buffer made for it and
released with it. On an RTX 5070 making and mapping one costs about 1.9 ms
a megabyte and releasing it 1.2 more, whatever the heap flags, against
0.36 to write one already there. The pass over the heap's textures stages
up to 192 MB a frame (576 MB while it catches up) on the thread that
records the frame, so most of its 250-750 ms went to that.

A staging buffer let go now goes back to a pool by size class (whole
64 KiB up to 1 MiB, then eighths of a power of two), and the next texture
of that class takes the one given back last. With the pool full, the
oldest buffer of the class holding the most bytes is released to make
room: most staging buffers live a frame, so the newest are the likeliest
to be asked for again. A buffer taken from the pool that the first
refresh does not detile into (memory all zero, or not there yet) is
zeroed, as a new one would be.

The pool keeps at most VICTORY_STAGING_POOL_MB (512); 0 makes and
releases every buffer as before. The memory line counts buffers made,
taken from the pool, given back and released.
…k in one call

Two costs of the paths a26859f added, on a 3840x2160 window with a 2522 to
4394 draw world frame (RTX 3080, Windows 10, release build). 9376fd6 already
took the third (the fingerprint), so that is not here.

1. sync_heaps walked the 1,024 to 2,048 records of every page the kernel
   called written: 300,000 to 485,000 records a frame, of which 12,000 to
   20,000 were new. The kernel marks a page written even when the title put
   back the bytes it already held, so most of that walk found nothing. The
   page's bytes are now compared with the ones last read (64 KiB, a few
   microseconds) and the page's records are skipped when they are the same.

2. copy_back_with wrote every run of changed bytes through the kernel on its
   own: 53 to 75 MB a frame in runs a handful of bytes long, at 3 to 4
   ms/MB. The runs of one copy are contiguous, so they and the gaps between
   them (the title's bytes as read, so putting them back writes what is
   already there) now go back in one write per copy.

Measured, same scene band (2400 to 3200 draws/frame), medians of the frame
lines, before and after:

| | before | after |
| --- | --- | --- |
| frame | 815 ms | 364 ms |
| preparing, copies | 123 ms / 191 MB | 71 ms / 194 MB |
| copying back | 216 ms / 64 MB | 210 ms / 62 MB |

The first change is what moved the frame; the copies fell with it (fewer
slots left stale, so less to refresh). The second did not move the copying
back figure on its own — the one-write form lands in the same 210 to 256 ms
band, so the time there is not the write call itself. It is here because it
is fewer syscalls over the same bytes, not because I can show a win from it,
and it can be dropped without touching the first.

Honest limits: the run drifts through the prologue, so the bands are medians
of 2 to 4 frame lines at matching draw counts rather than a fixed camera, and
the later runs had a warm shader cache.

Two things the fork needs on Windows 10 to run at all, not part of this PR:
the app-local Agility SDK runtime (without it the title dies at +0xb5a5f8 on
the in-box runtime) and the keyboard stand-in pad fix from upstream fxceless#729
(with an XInput keyboard such as a Wooting the title otherwise gets no input).
@ExoCalibra
ExoCalibra force-pushed the integration/rtx3080ti-8dd30ab branch from 17b9f09 to 42e2aa3 Compare November 25, 2026 08:03
@ExoCalibra ExoCalibra changed the title Integration / RTX 3080 Ti validation stack on 8dd30ab (16 PRs + #633/CBV clamp) Integration / RTX 3080 Ti validation stack on 9376fd6 (12 PRs + #518/inflight + CBV clamp) Nov 25, 2026
victory-local and others added 9 commits November 25, 2026 05:04
…es the texture (fxceless#776)

The tiles of a texture made level by level (VICTORY_LEVELS_ON_DEMAND=1) are
in heaps of ours, not in the texture. A list recorded or in the air keeps
the texture it names (`HostList::keep`), not its host copy, so the host
copy could be let go (the sweep, the title's release) while a list still to
run read through the texture's mappings: the tiles went back to the pool,
were given to other textures, and a heap with all of its tiles free went
back to the card.

On an RTX 3080 Ti, Series X, levels on demand with room for buffers: the
device was removed (0x887A0006) in 1 run of 3, about ten seconds into the
world, 6.4 s after a sweep let go 610 host copies of textures, with one
heap given back to the card; in the runs that went on none was. With this
change: 0 removals in 4 runs (292, 274, 279 and 272 ms a frame), two of
them with a heap given back.

A host copy let go now hands its texture and tiles to a list
(`tiles::let_go`); the tiles go back when nothing but that list names the
texture (`tiles::give_back_let_go`, at every sweep), at once if nothing
does already. Step 8 of the levels-on-demand test lets go of a texture a
list still keeps and checks that its tiles wait until the list is reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… after fallback fetches

In `Host::relay_card_back()` (`crates/victory-gpu/src/host.rs`), when
`relay_card_inflight(plans)` returned `false` and fell back to the old fetch:

1. `inflight_tickets_landed(plans)` pruned `inflight.brought` BEFORE the
   fallback fetch ran, and then `relay_card_back()` unconditionally pushed
   `(shadow.clone(), lo, hi, after - 1)` for every fetched piece whenever
   `after > 1`—even when `after - 1 <= landed` (no later flight in the air can
   ever match `b.3 >= sent_as`).
2. `Host::card_done()` reset `work.taken = 0` when `work.out == 0` (no
   `CardPlan`s left in flight) without clearing `inflight.brought`, leaving
   stale `Arc<Shadow>` clones pinned across `settle()`/`let_go_idle()` until a
   future `CardPlan` landed.

Guard `inflight.brought.extend(...)` with `should_record_brought(after, landed)`
(`after > 1 && landed.is_none_or(|last| after - 1 > last)`), clear
`inflight.brought` in `card_done()` when `!relay() || work.out == 0`, and add
`host::batch::should_record_brought_only_when_later_flights_exist`.
The source view already committed the section page. First mappings and restored fragments retain the existing commit path. The XMem tests verify commitment, shared writes, and the number of calls to commit. Tested with the Windows XMem suite. AI-assisted.
The guards' walk over a view range asked Windows (VirtualQuery, through
uncommitted_end) about every block it had noted absent, at every check.
In the first room ~86,000-96,000 such blocks lie in the ranges host
copies cover, nearly all 64 KiB placeholders, each its own region: some
88,000 questions a frame, 26 ms of the submitting thread's frame on an
RTX 5080.

A placeholder can only be filled by a call that replaces it (a plain
VirtualAlloc commit into one fails), and on title memory the only such
call is xmem's map, which tells title_memory_remapped. So a block found
uncommitted in a placeholder is parked: not asked about again until it
is remapped. QueryVirtualMemoryInformation(MemoryRegionInfo) tells a
placeholder apart by flag bit 8; VirtualQuery cannot. A one-time check
on a placeholder of our own keeps the walk where the flag is not filled.
Parked blocks that are no placeholder are looked at once per 32
submissions' checks (VICTORY_PARK_EPOCH), and XMemVirtualAlloc announces
its commits (title_memory_committed).

Checks are answered from a set of the view blocks that are not clean: a
range with none is one lookup, otherwise only those blocks are walked,
with the walk's rules. The set changes wherever clean does; the alias
guards never mark a block clean. known_view also answers for a known
view range. VICTORY_VIEW_SET=0 is the walk as before. A frame line
counts the checks, parked blocks and questions to Windows.

RTX 5080, first room, one run each way on this base: guards 26.2 ->
14.4 ms, all write checks 35.9 -> 21.4 ms, frame 253.1 -> 250.8 ms (the
copy-back thread sets the frame here). On an integration branch of
310c6eb with the same change, guards 20 -> 7-8 ms and the frame median
135.8-144.7 -> 127.9 ms over three runs.

Tests: watch tests with the switch on and off; new
parked_blocks_come_back_when_committed; the partly committed test steps
the epoch for its unannounced commit; the placeholder test checks its
blocks are parked and not looked at.
@ExoCalibra ExoCalibra changed the title Integration / RTX 3080 Ti validation stack on 9376fd6 (12 PRs + #518/inflight + CBV clamp) Integration / RTX 3080 Ti validation stack on 9376fd6 (16 PRs + #518/inflight + CBV clamp) Nov 25, 2026
@ExoCalibra

Copy link
Copy Markdown
Author

Updated the stack (fast-forward on 9376fd6) with 4 additional GPU-only PRs (#795, #768, #793, #783) and verified across a 28-minute, 94,140-line RTX 3080 Ti run (0 errors, 0 crashes, 0 device removals, victory-gpu 156/156 passed, xtask policy 174 files ok):

Metric (~4,600–4,800 draws/frame) Previous (42e2aa3) Updated (+ #795, #768, #793, #783)
FPS 2.9–3.7 fps 4.1 fps (2.6–2.9 fps at ~7,000 draws)
Frame time 273.7–344.5 ms 241.6–243.6 ms
GPU time 134.1–184.0 ms 111.5–112.6 ms (#793)
CPU preparing 106.5–126.8 ms 89.8–95.3 ms (#768, #783)
copying back 44.2–53.9 ms 40.2–41.6 ms (#783)
heap buffers 40.1–62.4 ms 27.0–31.5 ms steady (#783)

Because none of the 4 added PRs modify victory-shader, the DXIL shader cache stayed 100% warm (hits=3101, misses=0).

@ExoCalibra ExoCalibra changed the title Integration / RTX 3080 Ti validation stack on 9376fd6 (16 PRs + #518/inflight + CBV clamp) Integration / RTX 3080 Ti validation stack on 9376fd6 (22 PRs + #518/inflight + CBV clamp) Nov 25, 2026
@ExoCalibra

Copy link
Copy Markdown
Author

Updated branch (2b4ee0c..28b74a9, fast-forward) with 6 additional verified performance PRs:

Live RTX 3080 Ti results (�1.0.2.1, Series X)

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.