Commit Graph
607 Commits
Author SHA1 Message Date
localandClaude Opus 5.5 5e2394c2f4 The same render targets are not set again (after ZJOU acf478b8, author local); VICTORY_BIND_CACHE=0 sets them every time
Theirs compares the handles, which a title may write other views behind;
here the views themselves (resource, host texture, description) are compared.
A call with the same ones saves a host view per target and the driver's call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:44:14 -06:00
localandClaude Opus 5.5 a869d90e3a A root constant buffer not 256-byte aligned is copied into scratch memory once for the draws of a list that bind it (from Belobug 84ea9c12, romainhedouin)
Until the list next writes title memory, as for refreshes: up to 64 KiB of
fill less for every repeat. How often this title binds one was not measured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:43:00 -06:00
localandClaude Opus 5.5 14692d11ff A pipeline a list binds again is not kept and named again (from Belobug 92d353f8, romainhedouin)
Two queries for an interface, three locks and a name looked up at every
change of pipeline; now one lookup by address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:42:59 -06:00
localandClaude Opus 5.5 c8ede50886 A range shaders write is declared once until the list next writes title memory (from Belobug dd799aad, romainhedouin); VICTORY_DECLARE_ONCE=0 for the old way
Dispatches declare the same few ranges again and again: 4,003 to 5,550
steps a frame of fork-b1-fast, each a flush of its copy's pending refreshes
and two locks on the thread that submits (the snapshots alone 1.7 to 2.0 ms
a frame). The ranges and their order stay what they were.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:42:04 -06:00
local 2547124475 Merge branch 'day/faults' into local/next 2026-11-25 15:35:09 -06:00
localandClaude Opus 5.5 e3fa9c60c0 Title buffers' copies down to any size in the card's memory (VICTORY_CARD_BUFFERS_MIN_KB), the card's hashes over the buffer's own bytes (both after fxceless c36971b2)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:35:09 -06:00
localandClaude Opus 5.5 df787d4d3d Views mapped beside guarded ones: all views of the page are opened together, under the lock
A page shown at several addresses, and one more view of it being mapped: the
views that were to be opened were looked for before the lock was taken, so one
made clean in between stayed clean with a writable view beside it (a write of
the title's through that one was not told until its block's next told write),
and they were opened one range after another, so for some microseconds one was
writable while others were still known by their bits (told one asking late).
Both are older than the faults' work; VICTORY_OPEN_ONE_VIEW made the first
common. Also: what is known by its bits is not where bytes were just put in
beside the guard (VICTORY_COPY_BESIDE, VICTORY_STORE_BESIDE).

The test of writes through other views failed in 6 of 200 runs, then 4 of 380
with the first mended, 0 of 603 (four tests each) with both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:31:36 -06:00
localandClaude Opus 5.5 41d9b5b9b0 Textures shaders write that the title reads on the CPU are copied back into title memory (from fxceless f5c03f3b, pull request 999: Geckomacabre 895c0b8f, 04df4350); on by default
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:31:36 -06:00
localandClaude Opus 5.5 0f1607c82a The pages shaders' writes were put into are noted without a lock
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:31:33 -06:00
local e7f4650235 Merge branch 'local/next' into day/faults 2026-11-25 15:31:33 -06:00
localandClaude Opus 5.5 80d95bcd41 Copies in the card's memory: the changed runs sorted once and stably, piece runs joined while built; steps on the card: slots made on several threads
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:29:08 -06:00
localandClaude Opus 5.5 d8acf26bf8 Views mapped beside guarded ones: all views of the page are opened together, under the lock
A page shown at several addresses, and one more view of it being mapped: the
views that were to be opened were looked for before the lock was taken, so one
made clean in between stayed clean with a writable view beside it (a write of
the title's through that one was not told until its block's next told write),
and they were opened one range after another, so for some microseconds one was
writable while others were still known by their bits (told one asking late).
Both are older than the faults' work; VICTORY_OPEN_ONE_VIEW made the first
common. Also: what is known by its bits is not where bytes were just put in
beside the guard (VICTORY_COPY_BESIDE, VICTORY_STORE_BESIDE).

The test of writes through other views failed in 6 of 200 runs, then 4 of 380
with the first mended, 0 of 603 (four tests each) with both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:24:11 -06:00
localandClaude Opus 5.5 a69eb0cacb Title bytes under flights' writes compared with AVX2 on threads of their own, the pairs sent up made on them; helpers that work ahead are not kept on the fast cores
VICTORY_UNDER_WIDE=0, VICTORY_UNDER_THREADS (6), VICTORY_FAST_CORES=3 (as before: all of them), VICTORY_WIDE_SPIN=<us> (0: off).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 14:23:12 -06:00
local fa4f6c33e6 Revert "Replay: buffers in heaps opened from memory are made again (without the cross-adapter flag)"
This reverts commit a50c7fdeb5.
2026-11-25 14:01:37 -06:00
local b5410ccd82 Merge day/light 2026-11-25 14:01:37 -06:00
localandClaude Opus 5.5 a36d7dec8c Sets of heap slots are bits, the heaps' records have threads of their own, what is mirrored of them is counted
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 14:01:36 -06:00
localandClaude Opus 5.5 db2308a32c Structure builder: the wait for sizes is off (VICTORY_BVH_SIZES_WAIT=1 turns it on): it mended nothing and costs some 20 ms a frame (light-15)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 14:01:14 -06:00
localandClaude Opus 5.5 7fdcfd885b Test of parts taken: other tests' notes at the address
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:46:47 -06:00
local 6c9b078296 Merge branch 'local/next' into day/faults 2026-11-25 13:45:09 -06:00
localandClaude Opus 5.5 90c59251c3 Look-first stubs for moves and vector stores (VICTORY_WRITE_SITES); descriptors copied onto themselves are not written (VICTORY_SAME_RECORDS=0: they are); of tracked pages the parts written are taken (VICTORY_TAKE_PARTS=0: pages); waits for the trackers' locks and the heap sync's parts counted
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:45:09 -06:00
local 3321b7e346 Merge day/textures 2026-11-25 13:44:40 -06:00
localandClaude Opus 5.5 f3e166db72 The panel is drawn by the diagnostics build only
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:44:39 -06:00
localandClaude Opus 5.5 fe20cd8dbd VICTORY_MAP_THREADS=auto is asked for, not the default: 16 threads map no more pages than one in the dorm, and a frame takes longer
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:31:25 -06:00
local 8c69173bf0 Merge day/shaders 2026-11-25 13:29:56 -06:00
local 04d10818e1 Merge day/light 2026-11-25 13:29:55 -06:00
local 866b84d5ce Merge day/faults 2026-11-25 13:29:54 -06:00
localandClaude Opus 5.5 ebdefa6f99 The image's name is kept for VICTORY_WRITE_SITES (the program did not build)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:21:00 -06:00
local 911e551513 Merge day/submit 2026-11-25 13:17:35 -06:00
localandClaude Opus 5.5 71f7541fd1 VICTORY_PLACED_ORDER is off unless asked for: the case did not come up in three runs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:12:38 -06:00
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 9c414454a4 What a landing put into title memory is not sent up again (VICTORY_LAND_ECHO=0: sent)
Memory the kernel watches counts as written by the landing of what shaders wrote; the next
refresh copied those pages and sent them up again (run submit-2, the dorm: a copy of 90 MB,
write-combined for the title, 14.9 MB a frame fetched and 14.4 MB of the same pieces sent).
Pages a landing was noted in are compared with the CPU side, 4 KiB at a time, and left if
they are alike. Not run in the game yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:59:04 -06:00
localandClaude Opus 5.5 eedfe35319 A flipped slot's quick record is forgotten
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:57:55 -06:00
localandClaude Opus 5.5 78228ea8e2 Structure builder: accesses stay near the root views, a size that cannot be one counts as none (VICTORY_BVH_BOUNDS=0: neither)
A structure that was written over names gigabytes; the builder's copy of it
(CopyForBVHUpdate, 63 a frame in the dorm, 13.3 of 84 ms in the timing run
light-13) went through all other structures' memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:57:50 -06:00
local 53ab99577f Merge day/faults 2026-11-25 12:55:59 -06:00
local a02177b7d0 Merge day/light 2026-11-25 12:55:58 -06:00
local f6e2b31ceb Merge day/textures 2026-11-25 12:55:58 -06:00
localandClaude Opus 5.5 fa8cd8071c Merge day/submit: the panel, parts of submissions prepared as one (VICTORY_JOIN_PARTS, off), fills cut free of copies
A submission whose lists are still being translated is unfolded where the
one before it may take it along.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:55:14 -06:00
localandClaude Opus 5.5 4b3141fac5 Frame replay: shaders of another translation (--retranslate, --shaders, --shaders-b turn by turn), times per pass as medians
--shaders after local/models 098ec1d4. The capture's 1,266 containers are
collected from the title's files once (beside the capture) and translated by
this build in 15 s; a pipeline that is refused with them keeps the recorded
ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:49:12 -06:00
localandClaude Opus 5.5 565ab8517e Max, min, legacy products, medians and fractions as the RDNA card's own (VICTORY_RDNA_FLOAT, on; 0: spelled out as before)
The console's v_max/v_min (seven host operations each, for the order of the
two zeros), v_mul_legacy (a product, two comparisons, an or and a select;
two thirds of all products of the lighting program), v_med3 and v_fract are
written as the one operation the driver makes the same instruction of, where
the host is an AMD card with waves of 32 and 64. Checked on the RX 7900 XTX
against the spelled-out forms with zeros, infinities and NaN (a legacy
product's zero may have the other sign).

RX 7900 XTX, yard capture replayed turn by turn with and without (12 loops
each): dispatches and draws 18.41 -> 17.58 ms, the lists' 29.2 -> 28.4 of a
36.6 ms frame; 0.4 of it without the legacy products. The picture is the same
(79 dB; two replays of one set differ by 68). A product that is only a
product would give 0.65 ms more and NaN where the console has 0.

Measured and left out (nothing): v_mad as one multiply-add, fast
reciprocals, scalar loads of four dwords at once, buffers picked from the
heap read without asking for their kind (0.12 ms), a wave size for every
compute program (32: +0.26 ms, 64: +0.1, the console's: +0.1), no barriers
at all (0). Changes the translator: every shader is translated again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:49:12 -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 bc478bb832 Two measurements for placing memory: bytes over the bus by host copy, and what the title asks its memory to be
Diagnostics: per copy what goes up and what is fetched (every five seconds, the eight that
move most), and the protections title memory is asked for with (write-combined and GPU bits).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:40:10 -06:00
localandClaude Opus 5.5 efca06ba45 The panel shows what helps, and what it costs; nothing but a key asked for while it is off
FPS, draws, the submitting thread, the card, waits, recording, MB a frame, memory; its own
microseconds a frame on the submitting thread. VICTORY_PLACED_ORDER can be one of
VICTORY_AB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:40:10 -06:00
localandClaude Opus 5.5 4d4d9bcee6 Host heaps' slots are made under locks of their own; the heaps' records and the buffer views picked by index are made on several threads (VICTORY_VIEW_THREADS)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:36:58 -06:00
localandClaude Opus 5.5 8a1058c12f Ray tracing document: the stand-in, the sizes, what is known
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:19:01 -06:00
localandClaude Opus 5.5 6563de95d8 Passes over the screen have pipeline workers and a wait of their own (VICTORY_SCREEN_WAIT_MS=0: not); after Belobug 18e57db8
The first run after a new translation (textures-d2: 2,500 pipelines being made,
594 draws a frame dropped in the world's first minute) had no lamps and no
colour in the shade to its end; the second (textures-d3) had them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:09:23 -06:00
localandClaude Opus 5.5 6c105a5e45 The stand-in for the indirect light can bound what the air scatters (VICTORY_AMBIENT_AIR, off)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 11:45:56 -06:00
localandClaude Opus 5.5 5108036010 Pages are mapped by sixteen threads while the title streams as fast as they are mapped, by the caller alone otherwise (VICTORY_MAP_THREADS=auto, which it is unless set)
The title's streaming thread spends 400 to 750 ms of a second in mapping calls
in the world's first minute (runs stream-1 to -4; DirectStorage itself answers
in 1 to 8 ms): each call waits a millisecond or two in the host's queue behind
the guards' protection changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 11:40:12 -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 b8a3e77407 Parts of submissions prepared as one (VICTORY_JOIN_PARTS=8; off), fills cut free of copies at their place (VICTORY_PLACED_ORDER)
The thread that runs the line takes the Run entries that follow in the queue along, with
the waits they meet themselves and the signals between them (the idea: fxceless/victory-fork
39731795), as long as nothing of them reads on the CPU what those before them write; what
they refresh is brought up to date in one go in front (VICTORY_REFRESH_FRONT on its own:
measured at nothing); each part still goes to the queue in a call of its own.
Run submit-1, the dorm: 12 of 28 parts joined, 54.8 -> 51.4 ms a frame of that thread.

A copy at its place in a list is in the way of fills done on the card only from its place
on, and the submission is cut behind its list for those (opening, run n19: 40-60 ms a frame
of the submitting thread standing). Not seen in the dorm; not measured yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 11:32:41 -06:00
localandClaude Opus 5.5 1316d0819d A stand-in for the title's traced indirect light (VICTORY_AMBIENT, off): estimated from the light visible surfaces send out
After beloooo's constant (VIctory-Belobug-AMD 06031237, 4f45ab88, cd9f78ce).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 11:09:43 -06:00