Commit Graph
521 Commits
Author SHA1 Message Date
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
localandClaude Opus 5.5 6b07e2e02d Texture uploads wait for no mapping, ask no guards and hash cheaply; the sweep looks at a part; bakes pass once for what is new
A bake's uploads waited for the lock the runtime holds while it remaps, and a staging buffer a draw kept waited at every later
refresh (29 to 239 ms a frame, all threads, run n04): gone, a read through the kernel gets every page. A staging buffer made for
one upload asks neither the write watch nor the guards (VICTORY_TEXTURE_ONCE=0: as before). blake3 makes way for a 128-bit digest
(0.035 against 0.2 ms a megabyte). While textures are kept for minutes the sweep looks at 8,192 a time (VICTORY_TEXTURE_SWEEP=whole).
The pass before a bake is made again only for something new.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:14:38 -06:00
localandClaude Opus 5.5 6c0978abbf Merge local/next into night/cpu
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:09:04 -06:00
local 708c13484c Merge branch 'night/crash' into local/next 2026-11-25 05:00:34 -06:00
localandClaude Opus 5.5 8ec2df703c Draw records of 2^23 vertices or more and unfilled mesh records run empty
After victory-fork f85101b6, whose window checker found 90 records of 2^24 vertices in one list; ours
also run mesh records over 65,535 groups (all ones) empty instead of as 65,535 groups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:00:34 -06:00
localandClaude Opus 5.5 6ee5b724e5 Every buffer read as raw bytes through the heap is read at its raw twin
Runs n03 and n04 lost the device in the main pass. The pixel program
3711fdad456538a1, bound in both stopped lists, reads entry 35 of its big table
as raw bytes per lane, and that slot is a structured view of 8 byte elements
that begins at 8 mod 16 (capture play-1125-0127, all 766 draws): no raw view
begins there, so it stayed structured, and a raw load through it has no end on
AMD. So not only picked buffers: tables' buffers too, in title slots and in
the dynamic slots, which have twins now as well (a constant buffer of a fresh
table has a raw one of its bytes).

Measured with it: constant buffer loads, uniform and per lane, end with a
constant buffer's view. Loads by title address end with the raw view of the
copy, or read the null view for a page without one. VICTORY_RAW_VIEWS=0: as
before. Every shader is translated again (5 min).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 05:00:17 -06:00
localandClaude Opus 5.5 fbe8ecc617 Stores by address are bounded: title buffers take the builder's only where it was given them to write
A directory entry says whether stores by address reach its page (translator and host). Faults take at most 128 pages a frame and 8,192 in all; every slot of the copies' run holds a null view until its copy is there; a page is looked at once a frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:53:33 -06:00
localandClaude Opus 5.5 3b3aabc896 Merge branch 'local/next' into night/card
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:47:24 -06:00
localandClaude Opus 5.5 a008b7ee8d Card memory the CPU maps: scratch switch gone, what the others measured; a test
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:47:23 -06:00
localandClaude Opus 5.5 0700caf1ea Merge local/next (b69eab84) into night/cpu
xmem.rs is local/next's: its side-by-side mapping (VICTORY_MAP...) takes the place of 4180818's runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:45:58 -06:00
localandClaude Opus 5.5 ffca1949e2 The title's page mappings are mapped in runs, and not again where they are (VICTORY_MAP_RUNS=0: page by page)
13 % of the title's main thread while walking (profile cpu-1: two kernel calls for each 64 KiB page).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:45:39 -06:00
localandClaude Opus 5.5 5ead1cfb0b The heaps' records are also looked at between submissions (VICTORY_HEAP_SYNC_EARLY=0: not)
Every 4 ms while submissions come, on the thread for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:45:38 -06:00
localandClaude Opus 5.5 3ffc66634e Copies that shaders write are brought up to date together ahead of a submission's steps (VICTORY_REFRESH_AHEAD=0: one by one)
580 a frame, 3.4 to 6.5 ms of the submitting thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:45:38 -06:00
localandClaude Opus 5.5 6bc69a0e7b Refreshes copy and send the 4 KiB parts of a page that were written (VICTORY_PAGE_PARTS=0: the 64 KiB page); the early asking is off
Where the kernel or a landing names them; what is checked stays a page. VICTORY_ASK_EARLY=<ms> turns the early asking on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:45:37 -06:00
local 57a8ff2214 Merge branch 'night/stream' into local/next 2026-11-25 04:44:19 -06:00
local 5b2af05e9a Merge branch 'local/next' into night/light
# Conflicts:
#	crates/victory-shader/src/emit/mod.rs
2026-11-25 04:43:44 -06:00
localandClaude Opus 5.5 4c53da0a52 Pages are mapped side by side: eight threads stand in the host's queue instead of one
Mapping and unmapping a view wait for what every protection change of a
view takes too (about 100,000 a second, the guards'): 0.2-4 ms a page, all
on the one thread the title loads with. Scatter maps and the GPU's
page-mapping copies go in groups of up to 64 pages, noted before and after
on the caller's thread, the system calls on up to eight
(VICTORY_MAP_THREADS=1: one after the other, as before).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:31:31 -06:00
localandClaude Opus 5.5 0aa2ab952b The title's idle and lowest threads run below normal: loading no longer waits for idle processors
VICTORY_TITLE_PRIORITIES=0: as the title sets them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:31:31 -06:00
local 150557a525 Merge branch 'night/crash' into local/next 2026-11-25 04:27:45 -06:00
localandClaude Opus 5.5 3d6cbbd527 Views are made beside the heaps the card sees and copied in whole
Measured on the RX 7900 XTX (indirect::tests::descriptors_written_under_readers):
a thread that makes texture views in a slot of a shader-visible heap lets the
card see a descriptor that is neither the old one nor the new one in 4 % of its
reads (35 of 822 million: the driver clears it and fills it step by step).
Copied from a CPU-only heap: none in 8,582 million reads, and three times as
fast (51 ns against 149). Title threads and our passes rewrite slots while
submissions run whose shaders pick them; three device losses of 2026-11-25
(play-1125-0203, n02, n03) were reads of memory no view names.

Every slot of the host heaps (views, raw twins, null views, constant buffers,
samplers) is now made in a slot of the thread's own in a heap the card does
not see and copied in. VICTORY_VIEW_COPY=0: made in place, as before.

A raw twin whose view begins between two multiples of 16 (35 a frame, left as
the title's unbounded view) is made from the 16 bytes below and its descriptor
moved on, if it is the one AMD's raw buffer descriptors are; null otherwise.

indirect::tests::textures_read_in_another_dimension (a measurement): a view
read in another dimension or level than its own gives zeros or its own texels:
not a cause.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:27:38 -06:00
local 12f082b27e Merge branch 'night/textures' into local/next 2026-11-25 04:21:13 -06:00
localandClaude Opus 5.5 a220a7bbb8 Title memory by address: packed structures go up whole when the builder unpacks them; small buffers' pages stay title memory
The arenas of run light-3, read offline: 2,833 instances, valid top levels and dynamic structures, three quarters of the streamed ones unpacked right. The rest were unpacked a second time (the same bytes streamed in again do not differ from those last taken), into garbage over their neighbours. And the sizes the title reads of a structure (compaction) never came back where their small buffer lay in an arena's page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:15:29 -06:00
localandClaude Opus 5.5 4b826da377 The first copy into a texture the title fills goes over what title memory holds
What the copy does not write was whatever the block of the pool held: the atlas of baked decorations (a 2048x2048 BC3 texture of
which a bake writes 256x256 at most) drew other textures' bytes over the waitress's face. VICTORY_COPY_OVER_TITLE=0: as before.
With a measurement of what a cold texture costs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:14:51 -06:00
localandClaude Opus 5.5 8bbdc42783 Title memory by address: pages in arenas, structures' pages made ready ahead
Windows of title memory around every page took 8 GB (run light-2, 0.5-1 s a frame): structures are streamed in anywhere between other data. A 64 KiB page outside title buffers now has a page of its own in an arena on the card; only the title's GPU memory is taken; what instances in a list's upload memory name is there before the top level is built, 1 MiB from each root view before the rehydration stages unpack it in place.
VICTORY_MEMORY_DUMP=<folder> writes the arenas out (diagnostics).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:03:24 -06:00
localandClaude Opus 5.5 86694b5ad2 VICTORY_CARD_AWAKE: the card's clocks kept up between submissions
A captured frame whose lists take 28.6 ms sent in one go takes 37.8 ms with
1.2 ms between its submissions, as the game sends them; with one group of
threads counting on a compute queue it takes 28.6 ms again, and nothing
changes when sent in one go (36.1 against 36.3 ms with its copies).
=turns: 20 s on, 20 s off, to compare in one run. Replay: --awake,
--no-restore makes no copies to restore from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:00:22 -06:00
local 611315291c Merge branch 'night/crash' into local/next 2026-11-25 03:56:18 -06:00
localandClaude Opus 5.5 630aef45a4 The pass over the heap's buffer views is made beside the recording (VICTORY_HEAP_PASS_ASIDE=0: in it)
12 to 17 ms of one recording thread at the frame's first list that needs it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:50:05 -06:00
localandClaude Opus 5.5 c2734ec5cd A submission's fills of upload memory are done together on several threads (VICTORY_WIDE_FILLS=0: one by one)
5 ms of the submitting thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:50:05 -06:00
localandClaude Opus 5.5 92feb49bf1 A thread asks the write watch ahead of the submissions (VICTORY_ASK_EARLY); the time ahead of the preparing is split
VICTORY_ASK_EARLY=0: no such thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:50:04 -06:00
localandClaude Opus 5.5 30317314af The heaps' records are brought up to date beside the preparing (VICTORY_HEAP_SYNC_ASIDE=0); a made slot is told without the lock (VICTORY_QUICK_MIRROR=0)
Changed pages are compared sixteen records at a time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:50:04 -06:00
localandClaude Opus 5.5 d4943c43fb Snapshot memory, host lists and send memory kept for reuse (VICTORY_SNAPSHOT_POOL=8: as before)
Made anew and given back all the time: 30 % of the submitting thread in the opening (profile cpu-1: allocations of snapshots 11, preludes 12, lists dropped 5, send memory 3).

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