Skip to content

Integration / RTX 3080 Ti validation stack on f85101b (16 PRs + #854 Wave64 + #868 + CBV clamp) - #770

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

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

Conversation

@ExoCalibra

@ExoCalibra ExoCalibra commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

Validation & integration stack rebased cleanly onto official main (f85101b — "Frame rate, second night") for Windows 11 + NVIDIA RTX 3080 Ti (12 GB VRAM, SM 6.6, Wave32, 64 GB RAM) running retail Xbox Series X|S (v1.0.2.1), maintained in ExoCalibra/victory-exo.

Combines f85101b (VICTORY_ASYNC_SUBMIT=1, VICTORY_QUEUE2=1, VICTORY_INDIRECT_WINDOW=1, fill-ahead, 512 idle host lists, staging buffer reuse) with 16 cleanly integrated community PRs plus our own integration & stability fixes.


Community PRs Included (16)

Performance & Sync (f85101b generation)

Shaders & Wave32 / NVIDIA

Rendering, Textures, Series S & Input


Our Own Integration & Fix Work

  • 88f2b82 (CBV 64 KiB clamp): Clamps 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, preventing NVIDIA 0x887A0001 (DXGI_ERROR_INVALID_CALL) device removals on oversized title CBVs.
  • eabd5ee (#765 + #510 + f85101b test integration): Updated #765's Staging unit test in crates/victory-gpu/src/texture.rs for #510's motion_copy / frame parameter and f85101b's pooled field so all three PRs compose cleanly.
  • d034ac1 (#853 vs #812 conflict triage): Verified via victory-gpu unit tests that #853 regressed 4 multi-view watch::tests when combined with #812; reverted #853 to keep all 174 victory-gpu tests green.
  • RTX 3080 Ti launch profile & live telemetry: Verified zero-crash switch combination (VICTORY_ASYNC_SUBMIT=1, VICTORY_QUEUE2=1, VICTORY_SKIP_WC_COMPARE=1, VICTORY_LEVELS_ON_DEMAND=1, VICTORY_CARD_FETCH_INFLIGHT=1, VICTORY_WIDE_TEXTURES=1, VICTORY_INDIRECT_WINDOW=1, VICTORY_CARD_BUFFERS_MB=1024).

(Special thanks to @ArturoWolff for Linux/dxv replay checks and @HLVM04 for RTX 5070 Ti Series S cross-architecture validation.)


Verification (RTX 3080 Ti 12 GB, Windows 11, Series X, v1.0.2.1)

  • cargo xtask policy: 183 files ok (lower.rs = 501,927 / 524,288 bytes)
  • victory-gpu: 174 passed (4 ignored, 0 failed)
  • victory-hle: 118 passed (0 failed)
  • Shader cache warm-up (translate --warm): 3,199 / 3,199 translated (0 do not translate) in 91.4 s on 4 threads
Metric (4,700–6,100 draws/frame) Previous (9376fd6) Now (f85101b stack) Delta
Steady FPS 4.1–4.7 fps 7.8–8.8 fps (10+ fps peaks) ~2× faster
Frame time 213–243 ms 113.2–127.8 ms −48%
GPU time 81–147 ms 29.6–47.5 ms ~3× faster
copying back 38–42 ms (50–66 MB) 5.2–7.2 ms (2.4–2.9 MB) ~8× faster
preparing / copies 83–96 ms (150–163 MB) 55–66 ms (60–76 MB) ~2× less copied
Refused / untranslated shaders 7 refused, 1 untranslated 0 refused, 0 untranslated 100% clean
Crashes / Device removals 0 0 Clean

Visuals confirmed on live run:

  • Dark square silhouette artifacts on Lucia's shirt edge: gone (#854).
  • Guard's arm rainbow/purple BC-block corruption: fixed (#764 + #765).
  • Remaining minor artifacts: subtle stair-stepping on hair/neck edges and pixelated wall decals, plus brief 1 fps dips during heavy cutscene asset streaming.

claude-GTA6 and others added 10 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>
…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.
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
…e first_shown

Levels-on-demand (`tiles.rs`) shifts a tiled texture's host SRV to start at
`first_shown()` once tiles are mapped, and queues the texture's start address
in `RESHOWN` for `HostHeap::texture_views_remade()`. Two gaps left tabled (and
non-placed) tiled texture slots permanently stuck on unmapped `MostDetailedMip
= 0` (solid black) or stale mip levels:

1. `HostHeap::note_buffer()` excludes `tabled_lately` slots from `self.placed`
   (`Spans`), so `HostHeap::texture_views_remade()` never found tabled slots
   when draining `RESHOWN`.
2. `HostHeap::mirror()` checked only `made[index] != key`, so once a tiled
   slot was built before its first upload (`first_shown() == None` ->
   `MostDetailedMip = 0`) or before finer mips arrived, subsequent draws
   calling `mirror()` hit `made[index] == key` and never rebuilt the SRV.

Track made tiled slots in `HostHeap::tiled_shown` (recording the `OnDemand`
handle, optional placed start address, and the `first_shown` level baked into
the slot). Include `tiled_shown.slots_at(start)` in `texture_views_remade()`,
and rebuild the slot in `mirror()` whenever its `first_shown()` has changed
since the slot was last built.
…s skipped

Two levels-on-demand bugs in crates/victory-gpu/src/texture.rs (`Staging`):

1. Fresh `Staging` initialized `detiled = 0`, and `upload()` unconditionally
   queued `on_demand.uploaded(staging.detiled.load(Relaxed), ...)` after
   `Step::Texture`. When `Staging::refresh` skipped `detile()` (either
   because `refresh_unlocked()` failed during a remapping under
   `VICTORY_TEXTURE_NO_WAIT=1`, or because a partly-mapped texture read all
   zeros), `staging.detiled` remained `0` and `on_demand.uploaded(0, ...)`
   wiped `Tiled::held` and reset `first_shown` to `None`, turning a
   previously valid tiled texture permanently black. Track whether `detile()`
   has actually run (`has_detiled: AtomicBool`), skip calling
   `on_demand.uploaded()` when it has not, and mark `dirty = true` when
   `refresh_unlocked()` fails so the next draw retries.

2. On a partly-mapped all-zero tiled texture, `refresh_timed()` returned
   early before `detile()`, leaving `staging.judged == [0, 0]`. Because
   `judgement()` always returns `limit >= HEAD` or `u64::MAX`,
   `judgement() != judged()` evaluated true on every subsequent `upload()`,
   calling `staging.forget()` (wiping `last.partial` and `last.hash`) and
   setting `dirty = true` on every submission — causing an infinite
   every-frame full-texture read/hash/upload storm. Record `self.judged` when
   the all-zero check completes so `judgement() != judged()` fires only when
   `first_viewed` or `next_start` actually changes.
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.

…memory on the card

Both are off by default; without the switches nothing changes.

VICTORY_CENSUS=1 logs every 10 s (VICTORY_CENSUS_SECONDS) the title
buffers whose host copies are in the card's memory: the XMemVirtualAlloc
reservation each lies in with the flags the title asked for (the runtime
drops write-combining, uncached and the GPU access bits; the census keeps
them), how much of it is physical-page views and how much shows a page at
more than one address, and per frame the bytes sent up, the pieces
compared and the bytes fetched back. A second line counts the host
resources made per frame by kind (read-back, upload, shared, UAV,
textures, depth twins, placed, host lists).

On an RTX 5080 in the prologue's first room it found 100 copies (about
1 GB); per frame some 100 MB fetched back, 97 to 99 % of it from memory
the title reserved write-combining, which the console's CPU does not read
back either.

VICTORY_SKIP_WC_BACK=1, an experiment: what shaders wrote to copies of
write-combining title memory is not fetched back into title memory.
VICTORY_SKIP_WC_COMPARE=1 (implies it): those copies are not hashed or
compared on the card at all. The CPU's changes are still sent up, and
pending ranges are still closed by the flights' declared writes.
Expect wrong bytes where the CPU writes part of a piece the card wrote, or
reads what the card wrote: a correct form would fetch such a piece on the
CPU's first touch (a no-access guard) instead of every frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 3 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>
…e black)

The title chooses its upscaler by console: on a Series S with the
FidelityFX capability, FSR 4 (type 7); otherwise its own (type 6, as on a
Series X). FSR 4's output never reaches the screen under VIctory, so every
world frame was black with `--console series-s`, and holding its DLL back
makes the title divide by zero in the FSR 4 wrapper.

The known build now carries code patches (victory-game: per-build RVA, a
short signature checked before anything is written, our own bytes): both
functions that make the choice return 6. The prepared copy is patched
before it is mapped and gets a file name of its own.
VICTORY_TITLE_PATCHES=0 turns them off; VICTORY_TITLE_PATCH=<rva>:<old>:<new>
adds more.

In game (RTX 3090 Ti, Series S, no switches): the prologue renders, 6.1 to
6.4 fps steady (about 73 ms on the GPU), against 4.7 to 4.8 fps on the
Series X profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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)

@HLVM04

HLVM04 commented Nov 25, 2026

Copy link
Copy Markdown

A check on a different architecture: RTX 5070 Ti 16 GB (Blackwell, 32-lane only, driver 616.64), Series S profile. This was an earlier head of the stack (16 PRs, before the latest additions), merged onto 9376fd6 + #798 #783 #799 #780. Percentiles of the frame lines after the first 60 s (two runs with the stack):

p10 / p25 / p50 p90 max
without the stack 143 / 154 / 158 ms 338 ms –
with the stack 144–147 / 148–151 / 150–154 ms 509–642 ms 1.1–1.4 s

PiloteCode and others added 4 commits November 25, 2026 11:11
…s-only count

`cargo clippy --workspace --all-targets -- -D warnings` (CI) fails on 9376fd6
with this toolchain: unnecessary_sort_by in draw.rs, the bench's
depth_written in indirect.rs never read, and placed_filler_twins unused
without the diagnostics feature. No code changes.
…rams over 32 KiB linked with their pixel program, and more: 230 more programs pass

Over the title's shader pack (`victory translate --validate --pipelines`
on an RTX 5090, 32-lane waves), 25,682 of 25,953 programs translate,
validate and get a pipeline, against 25,452 on 9376fd6 (compute 2,729
against 2,695, mesh 8,694 against 8,657, pixel 12,067 against 11,947,
vertex 2,192 against 2,153). Of the 271 left, 195 are the unused voxel
geometry stages and 71 the mesh programs below, valid once linked.

- Wave64 compute programs on 32-lane hosts in a paired form: each console
  wave runs as one host wave, each thread two of its lanes (n and n + 32);
  every per-lane branch is taken by the whole wave with EXEC as each
  lane's guard, and lane reads, permutes, lane masks and reductions take
  both halves through the host wave's own operations. Tried after every
  other form for a program the host refuses (it asks for 64-lane waves)
  or that does not translate: 28 programs (screen-space tracing tiles,
  particles, decal trails, hair shadow masks, alpha resolve, three
  structure-builder programs, a cascade shadow program). Tried before the
  per-half forms that are approximate: 36 programs in which each half-wave
  counted, ORed or elected over its own 32 lanes now run as on the
  console. VICTORY_WAVE_PAIRS=0 turns it off. The allocation idiom also
  takes a base with a multiply-add (three lens-flare scans keep their
  per-half form, which is exact for them).
- Mesh programs whose outputs pass D3D12's 32 KiB as translated alone (71:
  pedestrian, vehicle and prop transforms, 65 to 71 components for 128
  vertices; NVIDIA builds them, the validator refuses them) are
  translated again with the pixel program of the pipeline
  (emit::link_mesh): the mesh program writes only what the pixel program
  reads, which declares only the inputs it reads. pipeline/host.rs makes
  such a pipeline from the linked pair (once per pair, same root signature
  and bindings; VICTORY_MESH_LINK=0 turns it off). `victory translate`
  with VICTORY_PAIRS links and validates pairs as the runtime does: 710
  pairs (each of the 71 with the ten pixel programs that read most of its
  outputs) link, validate and get a pipeline.
- One interpolation mode per signature register (70 programs: a float the
  console declared nointerpolation beside an integer or the front face);
  signature rows in the validator's order (72 programs); a level-of-detail
  query of an array texture leaves the layer undefined.
- An immediate sampler chosen by a uniform branch: the block is copied for
  each way in (ir::split_joins; the terrain programs).
- Pixel programs ordered by primitive (POPS) go past the console's wait and
  use rasterizer-ordered views (ten cut-out programs).
- A 16-bit write over a first interpolation half reads that half as zero
  (eight deferred and decal programs). The write of zero over every first
  half (v_interp_p1_f32, v_interp_p1ll_f16) is left out: with it, 59 pixel
  programs that translated came out changed and none more translated; the
  retry with first-half pairs stays.
- Whole-wave sections that a jump splits are joined into one block (the
  water optical depth program), tried first for a program whose permutes
  no followed section holds; elsewhere the v_permlane16/x16 lowering
  stands.
- 64-bit floats and their wave sums (five water volumetrics programs),
  one implementation of the two that existed (float64.rs): both dwords of
  a sum from one host wave operation (in place of Red64F/ActiveF64, which
  summed each dword on its own), v_add_f64, v_mul_f64, v_cvt_f64_f32, and
  the IEEE v_cvt_f32_f64 on integers. Its unused flush-to-zero twin and
  ignored test are left out.
- Descriptors read only for their size, one implementation of the two
  (descriptor_data.rs): a buffer with a used-resource entry gets the
  title's view, structured where its elements are whole dwords (a raw
  handle of such a view answered 2 records where it holds 9 on the RTX
  5090); VICTORY_DESC_WHY stays.
- A subtraction on group-shared memory (ds_sub, or ds_add of 0 - x) is a
  compare-exchange loop: NVIDIA's compiler refuses the pipeline otherwise
  (E_OUTOFMEMORY; DXC's own InterlockedAdd(g, -x) too). The weather
  particle update gets a pipeline.
- A lane mask parked in two VGPR lanes that also hold single scalars comes
  back as the mask (ir::with_shared_slots; the voxelization program).
- Loops of programs that test rays against tree nodes stop at 1,024
  iterations (the compute limit is 4,096): with the title's builder off, a
  walk follows whatever memory holds. Shadow mask 11.7 -> 2.4 ms a frame
  in timing runs of the opening of the gameplay.

The allocation-idiom check (idiom.rs), descriptors read as data
(descriptor_data.rs) and 64-bit floats (float64.rs) are modules of their
own, so that lower.rs stays under the asset policy's 512 KiB a file.

Tests: each new form is run on the card against what the console's 64
lanes give; the linked signatures, the LDS subtraction loop, the shared
slots, the joined sections and the descriptor sizes have tests of their
own.
…, mesh programs linked with their pixel program (VICTORY_MESH_LINK)

The whole pack on an RTX 5090 (32-lane waves): 25,682 of 25,953 programs
translate, validate and get a pipeline, against 25,452 at 9376fd6. All 52
structure-builder programs translate (three in the paired form); switched
on in game runs, the builder crashed the title about 80 s into the
gameplay, so it stays off.
… (240,000 writes a frame under Wine)

Since only the GPU's bytes are written back (upstream #2009), every run of
changed bytes in a piece is a write of its own (`write_mapped`, one
NtWriteVirtualMemory call each). A shader that writes records leaves many
short runs, because every byte of a record that comes out as it was ends
one: in the world frames of the opening scene about 250 pieces a frame held
240,000 to 280,000 runs. At about 4 microseconds a call under Wine that was
0.8 to 1.2 s of every frame ("putting them back" in the frame account).

Runs with fewer than 64 bytes between them are now written as one
(`VICTORY_BACK_RUN_GAP`; `0` writes every run on its own, as before). That
leaves about 4,000 writes a frame.

What it gives up: the bytes between two joined runs are written as they
were read a moment before, so a title write that lands on one of them
between the read and the write is lost. Before #2009 that held for the
whole stretch from a piece's first changed byte to its last; now it holds
for bytes less than 64 bytes from one the shader wrote.

Test: `runs_closer_than_the_gap_are_joined`.
…rtualProtect opening them"

This reverts commit 1d0eefb, reversing
changes made to d39d7c8.
@ExoCalibra
ExoCalibra force-pushed the integration/rtx3080ti-8dd30ab branch from 28b74a9 to d034ac1 Compare November 25, 2026 11:32
@ExoCalibra ExoCalibra changed the title Integration / RTX 3080 Ti validation stack on 9376fd6 (22 PRs + #518/inflight + CBV clamp) Integration / RTX 3080 Ti validation stack on f85101b (16 PRs + #854 Wave64 + #868 + CBV clamp) Nov 25, 2026
@ExoCalibra

Copy link
Copy Markdown
Author

Rebased the validation stack cleanly onto official main (f85101b — "Frame rate, second night") and resolved all merge conflicts (ExoCalibra/victory-exo).

What's new in this rebase (d034ac1)

Live RTX 3080 Ti Results (Series X, 4,700–6,100 draws/frame)

  • Steady FPS: 4.1–4.7 fps → 7.8–8.8 fps (10+ fps peaks)
  • Frame time: 213–243 ms → 113.2–127.8 ms
  • GPU time: 81–147 ms → 29.6–47.5 ms
  • copying back: 38–42 ms (50–66 MB) → 5.2–7.2 ms (2.4–2.9 MB)
  • Shaders: 3,199 / 3,199 translated (0 do not translate, 0 refused pipelines) — @HLVM04 this clears the last 2 refused pipelines + 1 untranslated shader from your RTX 5070 Ti check!
  • Visuals: Lucia's shirt dark square edge artifacts are gone (#854) and the guard's arm texture corruption is fixed (#764 + #765).
  • Checks: cargo xtask policy (183 files ok), victory-gpu (174/174), victory-hle (118/118). Zero crashes or device removals.

@grosterr

Copy link
Copy Markdown

Heads-up for this stack: with VICTORY_WIDE_TEXTURES=1 (#768) and VICTORY_LEVELS_ON_DEMAND=1 together, some textures come out black or stale (on an RTX 3060: white blotches over a table and stools, a black towel, a black sheet of paper in the prologue bedroom). Cause, A/B runs and a few-line fix with a test are in #768 (comment). Measured on d034ac1 + main a253706: with the fix the picture is clean and the frame is 330 ms against 380 ms. AI-assisted (Claude Code); runs and observations are mine.

@npanu420

Copy link
Copy Markdown

RTX 3070 8 GB + i9-9900X (10 cores, no hybrid), Windows 11, Series S profile. Data point for this stack.

Build: your d034ac1 + #809, #95, #108 (moves) + #827 + #154, a port of #523, and fork main 0b0074e merged on top.

Switches: ASYNC_SUBMIT=1 QUEUE2=1 INDIRECT_WINDOW=1 SKIP_WC_COMPARE=1 LEVELS_ON_DEMAND=1 EARLY_TEXTURES_MS=40 CARD_REHASH_RUNS=1 CARD_BUFFERS_MIN_MB=1 CARD_BUFFERS_MB=1024 TEXTURE_NO_WAIT=1 PIPELINE_WAIT_MS=24 JOIN_COPIES=1 BAKE_TEXTURES_MS=0.

Steady play (median over world frames ≥ 400, 6-minute runs):

  • standing at the cell window: 188.0 / 188.7 ms (5.3 fps);
  • walking into the cell (about 7,000 draws): 215.7 ms;
  • no crashes, no device removals, no driver-watch events.

The first ~400 world frames, while the scene streams in, run 280-365 ms.

Per frame: submit thread busy 150 ms, made up of:

  • preparing 88 ms (copies 39 ms / 74 MB);
  • heap pass 44 ms;
  • write-watch 31 ms;
  • waiting for the card 27 ms.

The card is about 71-77% busy and the render thread spends 85 ms in Present.

On this machine:

(AI-assisted, Claude Code. No game data.)

@grosterr

Copy link
Copy Markdown

Heads-up for rebasing/merging this stack onto main (465b94f / d510ee4, VICTORY_INDIRECT_GATHER=1): there is one non-conflicting auto-merge trap in crates/victory-gpu/src/indirect.rs besides the HLSL conflict.

  1. HLSL (SOURCE): keep #864's uint index = base + gi; and replace id.x with index in the gather branch:
bool active = index < eff_count;
uint src_at = args_offset + index * stride;
[branch]
if ((has_count & 4u) != 0) {
    src_at = count_buf.Load(count_offset + index * 4u);
}
uint dst_at = index * stride;
  1. record_gather_as (auto-merges without a git conflict!): main's record_gather_as passes only 6 root constants (SetComputeRoot32BitConstants(0, 6, ...)) and runs a single l.Dispatch(records.div_ceil(64), 1, 1). With #864's 7-constant cbuffer Record (uint base; at word 6), that leaves base uninitialized and breaks any gather batch with > 64 records. Matching record_clamp_as fixes it:
let constants = [kind, stride, records, 0u32, 4u32, 0u32, 0u32];
...
unsafe {
    l.ResourceBarrier(&first);
    l.SetComputeRootSignature(&c.root);
    l.SetPipelineState(&c.pso);
    l.SetComputeRootShaderResourceView(1, src_gpu);
    l.SetComputeRootShaderResourceView(2, table_gpu);
    l.SetComputeRootUnorderedAccessView(3, dst_gpu);
    l.SetComputeRootUnorderedAccessView(4, budget);
    let mut offset: u32 = 0;
    while offset < records {
        let mut chunk = constants;
        chunk[6] = offset;
        l.SetComputeRoot32BitConstants(0, 7, chunk.as_ptr().cast(), 0);
        l.Dispatch(1, 1, 1);
        offset += 64;
        if offset < records {
            l.ResourceBarrier(&[uav_barrier()]);
        }
    }
    l.ResourceBarrier(&second);
}

Verified on this merged tree (#770 + d510ee4 + #1014): cargo test -p victory-gpu 199/0 (including warp_gathered_records_come_out_as_if_clamped_one_by_one), and tested in-game on RTX 3060 12 GB with VICTORY_INDIRECT_GATHER=1 (G4 alone: 198 ms / 5.05 fps; full set: 174–198 ms / 5.0–5.7 fps, 0 errors, 0 device loss, clean picture).

AI-assisted (Claude Code / Antigravity); the runs and observations are mine.

@grosterr

grosterr commented Nov 25, 2026 •

Copy link
Copy Markdown

More merge notes for this stack, for the next rebase onto main. Tree: this stack (d034ac1) with main merged in up to d827419, plus #1014, #1057, #1112, #1044, #1101, #1150, #1023, #1032, #1136, #1156 and #1031. Every test passes after the changes below (victory-gpu 216/0, victory-shader 245/0). Three places need a hand: the first merges with no textual conflict and shows up only as a failing test; the other two are conflicts whose resolution is not obvious:

1. Main 44bff61 (VICTORY_ABSENT_ONCE) vs #812's view set (VICTORY_VIEW_SET). Main's new test watch::tests::a_block_noted_uncommitted_is_asked_about_again_only_when_its_note_is_old fails in the stack (left: Some([]) right: Some([21798434])), passes on clean main, and passes in the stack with VICTORY_VIEW_SET=0. #812 parks a view block found uncommitted in a placeholder and asks Windows nothing more about it until the runtime tells of a mapping. A block mapped there "without a word", as the test does, therefore stays unseen. That is #812's design (only the runtime's replace calls can fill a placeholder, and they tell). So I made the expectation depend on view_set():

let parked = view_set();
let silent = |block: usize| if parked { Vec::new() } else { pages(block).collect() };
assert_eq!(guard_at(from, to, 1_100, KEEP), Some(silent(1)), "the note is old: the block is found (unless parked)");
// ...
assert_eq!(guard_at(from, to, 1_101, 0), Some(silent(3)));

Both switches attack the same VirtualQuery storm (main's run 279: ~690,000 questions in 20 s, 40–50 % answered from the 100 ms notes). With the view set on, placeholder blocks are not asked about at all, so ABSENT_ONCE probably has little left to do in this stack.

2. #1156 vs 05c5898 and #768's motion tracking (texture.rs). #1156 replaces refresh_unlocked (the read through the kernel during a remap) with a deferral, and a fresh staging buffer now waits for the mapping lock. Kept both sides: the deferral is Staging::defer_refresh with #1156's behaviour (asked = 0, DEFERRED count, staging keeps its last complete image and is not marked dirty, which #1156's remap_tests assert). observe_hash (motion) is untouched, because a refresh that reads nothing updates neither hash nor motion. Step 1 of 05c5898's on_demand_skipped_detile_preserves_none_and_updates_judged now checks the deferral: nothing read, detiled_levels() stays None, asked is reset. Its old scenario, a fresh staging buffer failing under NO_WAIT, can no longer happen, because a fresh buffer waits.

3. #1031 vs 5181f96 (descriptor/host.rs, tiles.rs). 5181f96 remembers a tiled slot's first_shown and remakes the slot when it changes. #1031 builds the view from the mask of resident levels (show_from → show_resident). The slot now remembers that mask (None while it is 0), and tiled_stale compares masks. So a slot is also remade when a hole closes and the first level stays the same, as #1031 intends. tabled_tiled_slot_remakes_when_first_shown_changes passes with VICTORY_LEVELS_ON_DEMAND=1. Tiled::first_shown stays, now for tests only.

Also, for the alias problem Ym1r1710 reported under #812 (protect_alias removing the other views' blocks from unclean): the stack's protect_alias at d034ac1 does not remove them, and a_write_is_reported_at_every_checked_view passes here.

RTX 3060 12 GB, Ryzen 7 5700X, Windows 11. Not run in a game yet with #1150–#1031; the base without them (main 9c184b3 + #1057/#1112/#1044/#1101) runs at 179 ms a frame with 0 errors.

AI-assisted (Claude Code); the merges were checked by me.

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.