Commit Graph
551 Commits
Author SHA1 Message Date
localandClaude Opus 5.5 2ad419b24d Writes of the title's that change nothing are not made: faulting stores and copies beside the guards, and flags it sets that are set (VICTORY_WRITE_SITES=<file>: places changed at load to look first; off without it)
A store that faults, or a part of a copy into a guarded block, whose bytes
are there already is left out (with VICTORY_STORE_BESIDE, VICTORY_COPY_BESIDE).
The places in the title's code where that is the rule and the instruction is
an `or` of a byte with a constant are written into the file, and made to look
before they write at the next start. The file holds offsets, no code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:10:05 -06:00
localandClaude Opus 5.5 44c69a8fee The title's writes into guarded blocks go in beside the guard: its memcpy, memmove and memset (VICTORY_COPY_BESIDE=1) and single stores that fault (VICTORY_STORE_BESIDE=1); both off
Most of what faults is the runtime's memcpy (a third by time) and single
stores into objects that lie in memory some copy covers: flags, reference
counts, links of free lists. The bytes are put in through our own view of the
page, the block told as written at every view by a bit that the next asking
takes: no protection changes, for the write or for the next taking.

Copies: the title's imports are ours and look at the blocks' bits. Stores:
the instruction that faulted is decoded and done in the handler. Too many to
a block, or code that fills blocks: opened as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:41:23 -06:00
localandClaude Opus 5.5 0578afffbb Write faults: a block just written rests before it is guarded again (VICTORY_GUARD_REST=0: not), a fault opens the view it came through alone (VICTORY_OPEN_ONE_VIEW=0: every view), guarded blocks kept as bits
A book of the faults (VICTORY_FAULT_BOOK=<file>, diagnostics) says of the
dorm: 586 faults a frame on 900 blocks, 245 of them on a block that had
faulted in the same frame already, 220 within 3 ms of the refresh that made
the block read-only; 69 ms a frame of the title's threads, of which 6 with
the guards' lock and 63 waiting for it. What is held under it is mostly
VirtualProtect (5 us and more in the game's process, one at a time whoever
asks: a bench found 14 threads no faster than one).

- A block a write fault opened is left open by the refreshes of the next
  3 ms and told as written at each.
- The other views of its page stay read-only, not clean.
- The sets of guarded, clean, absent and aliased blocks are bits, a range is
  looked at by words; the lock is let go between the runs a refresh guards;
  a fault that finds its block open takes no lock; the record of the title's
  views is read by many threads at once; the kernel is not asked about memory
  known to be a guarded view.

Run faults-2 (A/B of both switches, 20 phases of 10 s in the dorm): faults
601 -> 391 a frame, blocks made read-only 928 -> 407, the title's threads
27.5 -> 15.8 ms a frame in them (69 before), frame 64.8 -> 62.5 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 11:36:09 -06:00
localandClaude Opus 5.5 bc83b16387 Structure builder and rays: dispatches counted in threads, empty slots never entered, pages that are not there never hit; vertex signatures as DXC orders them
From DexNom/VIctory (GPL-3.0-or-later) bc3cd4b0 and 5f4c3df4:
- DispatchX's flag 0x20 says the counts are threads (bc3cd4b0). Taken for
  groups, a rehydration stage ran up to 64 times its threads and stored over
  the structures after its own. The lanes past the count leave at once, in
  every builder program of one dimension without a group barrier (there: in
  two, by digest). VICTORY_THREAD_DIMENSIONS=0: as before.
- A child that is not there may have inverted infinite bounds: it was entered
  at minus infinity, came first and ended the walk (bc3cd4b0).
- A node in a page without a copy reads zeros, a child and a box: no hit
  (bc3cd4b0).
- Signature rows in the order of their names; vertex outputs interpolated as
  the title's PSV0 says; an unread input packed beside a per-vertex one is
  constant too (5f4c3df4), with their tests.
Every shader is translated again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 09:39:18 -06:00
local 0769cc9dc8 Merge branch 'night/crash' into local/next 2026-11-25 09:25:28 -06:00
localandClaude Opus 5.5 886e2040fc Title slots show a new texture after its upload has run (VICTORY_SHOW_AFTER=1; off), and the book says more of one
Three losses were page faults in a texture made and shown in the last tenth of a second. With the switch the
texture pass, and a draw's table for the title's slots, put a neutral 1x1 texture (or the old view of the same
texture) there until the submission with the upload has finished. The book's report has the piece and its
block, the submissions at the making, the upload's submission, and what the slot showed before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 09:24:15 -06:00
local 3d738f0f3e Merge branch 'night/cpu' into local/next 2026-11-25 09:13:31 -06:00
localandClaude Opus 5.5 bfe6e4a73c A copy's buffer is asked for its bytes when they are first needed (copies of tests have none)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 09:07:01 -06:00
local e7c7210657 Merge branch 'local/next' into night/cpu 2026-11-25 09:03:29 -06:00
localandClaude Opus 5.5 29be4bfd47 A list makes a view its tables hold once and copies its descriptor (VICTORY_LIST_VIEWS=0: for every table); a draw's tables are gone through without memory of the heap
The recording job the frame waits for last (24 of 65 ms, timeline waits-2) is
2,500 indirect dispatches, each with a table of its own that differs in a
constant buffer. VICTORY_AB can turn VICTORY_MAP_THREADS (8 or 1) too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 09:03:29 -06:00
local fe950427e6 Merge branch 'night/crash' into local/next 2026-11-25 08:43:34 -06:00
local 5851d8b7e3 Merge branch 'local/next' into night/crash 2026-11-25 08:23:49 -06:00
localandClaude Opus 5.5 161e51ebf1 Textures are cut from blocks older than every list on the card (VICTORY_RIPE_BLOCKS=0: from new ones too)
Runs n08 and n11 were lost to page faults in the first texture of a block made that instant: lists on the
card read the slots new textures are put in. 12 empty blocks are made ahead; textures up to a whole block
lie in them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 08:23:49 -06:00
localandClaude Opus 5.5 300d5e9389 New card memory is waited for until a queue of its own has run after it (VICTORY_WAIT_RESIDENT=0: not)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 08:23:19 -06:00
localandClaude Opus 5.5 66c935eac2 Recording: a lock a descriptor slot, a thread's own answers about buffers, tables left as they are when nothing changed
Timeline waits-1 (dorm, 78 ms): the title's render thread stands 20 to 30 ms
a frame at one recording job and the rest at others; recording is the
critical path, and our list calls are 95 % of it. Profile waits-1, the five
recording threads: 21 % contended locks, 11 % HostHeap::keep, 17 % readable,
7 % the look-up of buffers, 8 % clocks and counters of ours.

VICTORY_QUICK_FIND=0 and VICTORY_READY_ONCE=0 go back; counters of the
diagnostics by thread, a coarse clock for what is noted per texture and slot.
VICTORY_AB=<s>,<switches> turns switches on and off while the title runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 08:14:21 -06:00
local e35b212b20 Merge branch 'local/next' into night/crash 2026-11-25 08:09:33 -06:00
localandClaude Opus 5.5 30f2aa7796 A measurement: textures of new blocks read by lists sent before; the book knows a block again whose pointer something else had
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 08:09:33 -06:00
local 7c62f5b707 A timeline of a few frames, with the chain each present came out of (VICTORY_TIMELINE)
Diagnostics only. VICTORY_TIMELINE=<file> records three frames (or
VICTORY_TIMELINE_FRAMES) after VICTORY_TIMELINE_AT seconds and writes a
Chrome trace and a text summary: spans of our work, the waits and wake-ups
of the title's threads (its imports) and of ours (our import table), long
kernel calls on the address space, and when each submission ran on the card.
The summary walks back from each present through who waited on whom.
Nothing is wrapped without the variable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 008de5f9ffcef132079b1af8b7f4f1c22235cee9)
2026-11-25 07:46:13 -06:00
localandClaude Opus 5.5 fdbae8592e New memory is resident before anything names it (VICTORY_WAIT_RESIDENT=0: as before)
Lists already on the card read our descriptor heaps as they are; only lists sent later wait for a new
heap's mapping. Run n08's loss: a page fault in a texture made that instant, in a new block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 07:40:47 -06:00
local faf5687af9 Merge branch 'night/cpu' into local/next 2026-11-25 07:21:55 -06:00
localandClaude Opus 5.5 7999171444 Objects let go and lists that ran are kept about two frames longer (VICTORY_BURY_LAG=0: not)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 07:21:55 -06:00
localandClaude Opus 5.5 2acfdfb380 Scripted keys can be held from one time to another
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 07:19:34 -06:00
local c618881373 Merge branch 'night/crash' into local/next 2026-11-25 07:09:38 -06:00
localandClaude Opus 5.5 e270944699 The crash report names direct mesh dispatches; buffers and groups stay inside what there is
- The lists' notes for a lost device hold direct mesh dispatches too (pipeline,
  groups, user data): run n06c stopped among them.
- A mesh dispatch of more than 65,535 groups is cut to that (more is undefined
  on the host; said once). Vertex and index buffer views end with the copy they
  show.
- indirect::tests::loads_far_outside_views (a measurement): raw, typed,
  constant buffer and texture loads at the ends of 32 bits, uniform and per
  lane, samples at coordinates, levels and gradients that are no numbers: all
  198 ways end inside their views on the RX 7900 XTX.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 07:09:17 -06:00
localandClaude Opus 5.5 e980f553cc The threads a frame waits for are kept on the fast cores (VICTORY_FAST_CORES=0: not; 1: without the helpers)
cpu_sets and keep_on_fast_cores are fxceless/victory-fork's (framelog.rs,
commit 0b0074e0). Asked for by: submit, relay, late-wait, heap-sync, aside;
and the helpers of the wide copies (refreshes, fills, snapshots) and of the
landings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:53:52 -06:00
local 8bb6fb2da8 Merge branch 'night/card' into local/next 2026-11-25 06:53:23 -06:00
local 343a712e21 Merge branch 'night/crash' into local/next 2026-11-25 06:53:23 -06:00
localandClaude Opus 5.5 a8943a8c86 A book of who has and had the card's memory; a check of every view slot
With device-removed data on, every buffer, texture and texture block stands in
a book with its address (a texture's is the base in its first descriptor) and
stays with the time it went. A device loss prints who has and had the faulting
address, newest first, and every slot of the view heap whose descriptor
reaches it, with what our books say of the slot. VICTORY_BOOK=0: not kept.

VICTORY_SLOT_CHECK=1 walks the view heap (2^22 slots, 3.8 s a round) and says
which slots name memory that is gone. Run crash-5 (opening, -Walk, 260 s): 1.7
million descriptors a round, 105,352 things alive, 27,342 gone, none of the
slots named anything gone or unknown in any round.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:53:10 -06:00
localandClaude Opus 5.5 77df0c0042 Wait instructions over the end of eight bytes are replaced too; clzero loops become plain stores (VICTORY_PATCH_CLZERO=0: emulated)
Run cpu-5: 25,000 exceptions a second at five clzero loops of one function
of the title, against 1,400-7,000 at the one monitorx/mwaitx pair (28,000
at the monitorx alone with only the mwaitx replaced, run cpu-6).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:48:29 -06:00
localandClaude Opus 5.5 7e062c005b VICTORY_CARD_AWAKE: menus keep the card awake too (comment)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:26:36 -06:00
localandClaude Opus 5.5 7d51f42418 Merge night/cpu: processor work, wait instructions patched, submit thread (off)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:21:22 -06:00
local 02214f8c72 Merge branch 'night/light' into local/next 2026-11-25 06:21:08 -06:00
localandClaude Opus 5.5 c46dac8df9 Title memory by address: what streaming brings is taken when the list is submitted, not when it is recorded
Dumps of runs light-8 and light-9: of structures of the same size some are unpacked right and some not, more of them in frames that stream much. The title's queue waits for its streaming, so a packed structure's bytes may come after the dispatch that unpacks it is recorded. Not run in the game yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:20:48 -06:00
localandClaude Opus 5.5 0ca4cda3ea A texture is not copied onto itself; the process opts out of the efficiency mode (victory-fork a2537066)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:19:18 -06:00
localandClaude Opus 5.5 1d4738ec41 Title memory by address: every list brings up every copy, whoever made it
An arena another list made while this one was being recorded was brought up by that list's submission alone: structures unpacked from zeros, then written over by the arena's first upload. In run light-8 half of the 470 structures unpacked in the frame with the most (1381) were wrong, 5-15 % in frames with few. A title buffer the builder stores in sends up only the dwords the title changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:09:43 -06:00
local 4b3bdf1f98 Merge branch 'night/textures' into local/next 2026-11-25 05:57:28 -06:00
local 5e2c95a8ce Merge branch 'night/crash' into local/next 2026-11-25 05:50:28 -06:00
local 6553e304b3 Merge commit 'f61ecf3b' into night/light
# Conflicts:
#	crates/victory-gpu/src/shadow.rs
2026-11-25 05:50:06 -06:00
localandClaude Opus 5.5 ca714f12af docs: ray tracing, the state after the first runs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:48:49 -06:00
localandClaude Opus 5.5 34e2365e95 Title memory by address: the dump names what was built and unpacked; a small buffer's results once a list
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:48:04 -06:00
localandClaude Opus 5.5 db5a2be860 Merge local/next (f61ecf3b) into night/cpu
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:44:51 -06:00
localandClaude Opus 5.5 6fa0bbe02f Raw twins of views off dwords are moved there too, not null
4.6 twins a frame of run crash-3 were null because they begin off a dword (16
bit values at an odd one); the typed view they stand for begins there as well.
Measured (raw_loads_past_views): a raw view moved on by 8 bytes gives the
bytes from there and ends where it should, uniform and per lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:44:04 -06:00
localandClaude Opus 5.5 b0c7fa5b57 Merge local/next into night/textures
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:43:37 -06:00
localandClaude Opus 5.5 2c165e09cd The first copy into a texture the title fills goes over zeros
VICTORY_COPY_OVER_TITLE=title: over what title memory holds; =0: over whatever the block of the pool held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:43:37 -06:00
localandClaude Opus 5.5 92cce2ac9d Submissions are prepared and sent by a thread of ours (VICTORY_ASYNC_SUBMIT=1, off)
The idea is fxceless/victory-fork's, commit f85101b6. Here one line holds
what all queues were given, presents too, in the order of the calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:38:51 -06:00
localandClaude Opus 5.5 9ec6973b48 AMD's wait instructions are replaced in place at their first fault (VICTORY_PATCH_WAITS=0: emulated each time)
monitorx and mwaitx raised an illegal instruction exception at every pass of
the title's wait loops. Diagnostics builds log the faulting console
instructions a second by kind and place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:38:51 -06:00
local 3f16581e03 Merge branch 'night/card' into local/next 2026-11-25 05:38:11 -06:00
localandClaude Opus 5.5 b7838005c0 Batched clamp: an unfilled mesh record is all zeros, as the clamp of one leaves it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:38:11 -06:00
localandClaude Opus 5.5 a0678ad1fa Landing goes beside the guards while mappings change; rectangles read without that lock
Pieces went through the title's address, guards opened, whenever the runtime was mapping pages, which is most of the time since they
are mapped in groups (28 of 1,620 pieces a frame beside the guards in run textures-4, 640 before): 5,000 blocks opened and 7,000
guarded a frame. VICTORY_LAND_ANYTIME=0: as before. The vertices of rectangle lists are read through the kernel at submission, not
under the lock the mapping holds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:32:52 -06:00
localandClaude Opus 5.5 a3d5a8f532 Title memory by address: packed structures that are gone give their pages back; ranges only for views written
4 MiB for every constant that looked like an address took a third of the pages (run light-5). Which pages came for what is in the ten-second line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:29:50 -06:00