World start: no 1.6 s stall (heap buffer views made while the title loads), plus DirectStorage, detiler and pipeline-crash ports #3138

Open
github-bot wants to merge 6 commits from github-bot/gh-3138 into main AGit
Owner

@⁠duckey-dev on GitHub · 2026-11-29 20:14 UTC · original
duckey-dev:amd-ports → main · +2800 −26 · 13 files · 6 commits · open

Measured on an RX 7900 XTX + 7800X3D, Series X profile, prison opening, ray tracing off, diagnostics build, victory play's switch set.

  • Heap buffer views made while the title loads (VICTORY_HEAP_PASS_EARLY, on): the first heap-buffer pass in the world 1,590 ms -> 16-41 ms; first world frames 85-93 ms -> 54 ms. Steady frame time unchanged (about 47 ms before and after).
  • DirectStorage waits until the title has mapped the pages its list names (VICTORY_DSTORAGE_SETTLE, on): a guard against stale pages for queues that submit themselves; it never had to wait in these runs.
  • A title buffer's in-place copy placed off the buffer-table lock (VICTORY_PLACE_UNLOCKED, on): only acts with VICTORY_INPLACE=2 or VICTORY_PORT_CONSTANTS=1; not measured.
  • SIMD micro-tile detiler from TaynanGT/Vice-Tay#191 (VICTORY_DETILE_SIMD, on; falls back to the walk for XOR, linear and multisampled layouts): a parity test against Layout::offset is included; speed not measured.
  • A BC texture placed over block-sized texels the host writes is read from them (VICTORY_ALIAS_BLOCKS, on): not checked visually.
  • Pipelines: a driver compiler crash on one pipeline is survived and the pipeline remembered in crashed.txt: not exercised.
  • The diagnostics build compiles again (two names in diagnostics-only code).

Every port is behind its switch with the old path kept. Not compiled or run on NVIDIA hardware.

🤖 Generated with Claude Code

**@⁠duckey-dev** on GitHub · 2026-11-29 20:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3138) `duckey-dev:amd-ports` → `main` · +2800 −26 · 13 files · 6 commits · open Measured on an RX 7900 XTX + 7800X3D, Series X profile, prison opening, ray tracing off, diagnostics build, `victory play`'s switch set. - **Heap buffer views made while the title loads** (`VICTORY_HEAP_PASS_EARLY`, on): the first heap-buffer pass in the world 1,590 ms -> 16-41 ms; first world frames 85-93 ms -> 54 ms. Steady frame time unchanged (about 47 ms before and after). - **DirectStorage waits until the title has mapped the pages its list names** (`VICTORY_DSTORAGE_SETTLE`, on): a guard against stale pages for queues that submit themselves; it never had to wait in these runs. - **A title buffer's in-place copy placed off the buffer-table lock** (`VICTORY_PLACE_UNLOCKED`, on): only acts with `VICTORY_INPLACE=2` or `VICTORY_PORT_CONSTANTS=1`; not measured. - **SIMD micro-tile detiler** from TaynanGT/Vice-Tay#191 (`VICTORY_DETILE_SIMD`, on; falls back to the walk for XOR, linear and multisampled layouts): a parity test against `Layout::offset` is included; speed not measured. - **A BC texture placed over block-sized texels the host writes is read from them** (`VICTORY_ALIAS_BLOCKS`, on): not checked visually. - **Pipelines: a driver compiler crash on one pipeline is survived** and the pipeline remembered in `crashed.txt`: not exercised. - **The diagnostics build compiles again** (two names in diagnostics-only code). Every port is behind its switch with the old path kept. Not compiled or run on NVIDIA hardware. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A page list is a part of the title's own table of its streaming pool's
pages, written by its page-commit batch, which then maps each page at the
address its entry stands for. Requests start at the title's submit, after
that batch, but a queue that leaves auto-submit on still submits itself at
half and a full queue always does: such a request reads page numbers left
from the address's last use and writes into another resource's pages.
A destination's pages are now taken once each is mapped at
`entry address * 8192 + shift` (shift learned by vote), waiting at most
200 ms. VICTORY_DSTORAGE_SETTLE=0: taken as read, as before. xmem gains a
read-only `places_of`. Overlapped reads (VICTORY_DSTORAGE_IO) and one view
per section (VICTORY_SECTION_WINDOW) were here already.

(from the Duckey fork's perf/local-wins 0632f922)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
victory-formats gains `detile` (Vice-Tay's detile.rs at 447dbb1f0): 256-byte
micro tiles read once, runtime-detected AVX2/SSE2 transposes with a
portable fallback, subresources from 2 MiB on split over a persistent pool
of threads. Layout::detile and Layout::tile try it for the layouts whose
offsets come of the swizzle pattern alone (no XOR mode, linear or
multisampled layout) and walk the layout as before where it refuses; it
validates before writing, and refuses layouts of no rows, columns or
slices, elements other than 1, 2, 4, 8 or 16 bytes and 2D subresources of
more than one slice. The walk itself is unchanged. victory-formats reads no
environment, so the switch is set_simd_detile, which the device creation
calls with VICTORY_DETILE_SIMD. A new test checks both kernels and the
tiling back against Layout::offset for every non-XOR 2D mode and element
size.

(from the Duckey fork's perf/local-wins 39c44350c and e181d90b5)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Placing one opens a heap on its memory (VICTORY_INPLACE=2) or a region of
renderer port 1 (VICTORY_PORT_CONSTANTS=1), milliseconds each, and every
thread that looked up any title buffer waited behind it. It is now placed
off the lock and put in unless the entry changed or in-place memory was
let go meanwhile (a count of title_memory_freeing calls); what was refused
is not asked again under the lock. VICTORY_PLACE_UNLOCKED=0: under the
lock, as before. Nothing changes while neither of the two is on.
VICTORY_SECTION_HEAPS_EARLY is not ported: no heap is opened on a section
here. VICTORY_MIRROR_PREPARE is not: slots are made under locks of their
own already (4d4d9bce).

(from the Duckey fork's perf/local-wins 415a951e)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Coloured 4x4 block noise on some surfaces is what a BC texture shows when
its bytes are not blocks. A texture compressed on the GPU is written as
one 8- or 16-byte texel per 4x4 block (R32G32 / R16G16B16A16 /
R32G32B32A32, a quarter as wide and high) through a texture the host
writes, and read through a BC texture placed at the same address; the
alias lookup paired them only at the same width, height and texel size,
so the BC texture's host copy was filled from title memory, which the
shaders never wrote.

The lookup now also pairs a 2D BC texture with a host-written texture of a
block's texel size at width/4 and height/4 (rounded up), the same levels
and layers, and the alias copy takes parts whose footprints differ in
width and height alone when their rows and row bytes match, as they do
block for block. The warning for pairs of other shapes stays.

(from the Duckey fork's perf/local-wins f7f1f99bb)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A thread, started with the first shader-visible heap, runs the pass over
a view heap's buffer views every 250 ms over the slots written since its
last look, until a frame's own pass runs. It brings nothing up to date
(the frames' passes do, from the ranges it leaves), leaves the frames'
pass count and round as they were, and looks only at heaps whose host
heap is made already. VICTORY_HEAP_PASS_EARLY=0: as before.

(from the Duckey fork's perf/local-wins 96852fcf)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A driver that faults on the first pages while it makes a pipeline (the
RDNA 4 compiler on some of the world's compute shaders, amdxc64.dll+0x861b9f)
ended the process. Now a vectored handler, armed only while this thread
makes a pipeline, notes the pipeline's name in crashed.txt in the pipeline
cache folder and parks the thread; the other workers and the title go on,
and later runs refuse that pipeline (E_FAIL, as one the driver refused)
without asking the driver again. Loads from the library are not covered.

(from the Duckey fork's perf/local-wins 01fde0366)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:18:26 +00:00
github-bot changed title from AMD: no 1.6 s stall on arriving in the world; streaming and texture ports from the Duckey fork to World start on AMD: no 1.6 s stall (heap buffer views made while the title loads), plus DirectStorage, detiler and pipeline-crash ports 2026-11-29 20:29:26 +00:00
github-bot changed title from World start on AMD: no 1.6 s stall (heap buffer views made while the title loads), plus DirectStorage, detiler and pipeline-crash ports to World start: no 1.6 s stall (heap buffer views made while the title loads), plus DirectStorage, detiler and pipeline-crash ports 2026-11-29 20:34:51 +00:00
github-bot force-pushed github-bot/gh-3138 from 731629ce1a to f779ed856d 2026-12-01 16:06:49 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3138/head:github-bot/gh-3138'
git switch 'github-bot/gh-3138'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3138'
git switch 'github-bot/gh-3138'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3138'
git switch 'github-bot/gh-3138'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3138'
git switch 'main'
git merge --squash 'github-bot/gh-3138'
git switch 'main'
git merge --ff-only 'github-bot/gh-3138'
git switch 'main'
git merge 'github-bot/gh-3138'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3138
No description provided.