Commit Graph
344 Commits
Author SHA1 Message Date
localandClaude Opus 5.5 c6604f99cf Merge Each submission's shaders read the bytes it was prepared with (VICTORY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:17:28 -06:00
localandClaude Opus 5.5 7114782978 Merge Merge local/next
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:17:28 -06:00
local 1161647e1d Merge local/next 2026-11-25 00:01:05 -06:00
localandClaude Opus 5.5 7a2b0b0099 Addresses of ray-tracing structures: views of a structure have no buffer
A shader that walks a structure takes its address out of the structure's
descriptor. The view has no resource, so the address came out 0 and every
ray missed. Also: only programs that store by raw address declare the
copies they reach that way as written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:08 -06:00
localandClaude Opus 5.5 6bdb85106c A pipeline sync waits for shader writes on the host
The console's syncs recorded nothing on the host, which orders nothing
between dispatches by itself. The ray-tracing structure builder has no
other wait between its stages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:07 -06:00
localandClaude Opus 5.5 fa83615d1e victory replay --flow, --images, --until; shader-info names the hashes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:07 -06:00
localandClaude Opus 5.5 05f7bcff65 Each submission's shaders read the bytes it was prepared with (VICTORY_SEND_OWN)
On by default. Sends to card copies were copies out of their CPU sides made
when the card came to them, and later submissions had written those by then:
of three submissions that each copy a value to the same bytes and read them,
all read the last one's (test: 12 of 12 wrong). The bytes are taken into
memory of the submission's own at preparing; short runs go as one scatter per
copy. Title buffer copies go up whether our side changed or not.

VICTORY_CARD_ALL=1 (off): every title buffer's copy has two sides, so that
this holds for the small ones too (they are written in place now, under the
submissions in the air). VICTORY_PICKED_WRITES: 1 declares, 2 lands too.

The check (VICTORY_UPCOPY_CHECK): what a submission took twice is no longer
counted as older values sent; copies of the title's out of their place in a
submission; copies held for unchanged that are not title memory's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:59:54 -06:00
localandClaude Opus 5.5 f15df2cca2 Merge local/world: VICTORY_IMAGE_WATCH
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:56:38 -06:00
local 22967b2124 Indirect dispatches of more than 65,535 groups run whole (VICTORY_INDIRECT_WIDE)
The title's tile lists are dispatches of a group per tile: in the captured frame 2dc364df5d3278b8 asks for 67,440 groups (the one before it 67,272) and 940c2635dc1312f4 for 47,760, the 115,200 tiles of 2560x1440. The clamp cut the first to 65,535: 1,905 tiles at the list's end, the lowest of the picture, did not run. Up to 2^20 groups run as asked on AMD cards (a test on the card: every group once, under its number); more still runs 65,535.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b856c46dd10bbb550157b255d113a3cca2f3f38a)
2026-11-24 23:55:23 -06:00
localandClaude Opus 5.5 f1541634fd Merge local/shaders2: the dynamic descriptor search
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:54:17 -06:00
localandClaude Opus 5.5 7704c3e460 Dynamic descriptor slots: the search goes past the cursor as far as it should
The scan was cut to the heap's length, which left out the slots past the
cursor a run that crosses it needs; upstream's corrected test (072fde0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:52:47 -06:00
local 4f54afe221 Merge commit 'c651346' into local/upcopies 2026-11-24 23:51:11 -06:00
local b64d65845f wip: submissions send their own bytes 2026-11-24 23:51:11 -06:00
localandClaude Opus 5.5 1f5ea84955 Merge victory replay --pixel: which commands change a pixel, in every target
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:04 -06:00
localandClaude Opus 5.5 0703d16748 Merge How much of a texture is mapped is read from the runtime's own record
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:02 -06:00
localandClaude Opus 5.5 8e124f4b76 Merge A refresh of a copy on the card sends the dwords title memory changed,
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:01 -06:00
localandClaude Opus 5.5 2d2f9477fc Merge Merge local/next (e6f492d) into local/tests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:01 -06:00
localandClaude Opus 5.5 b4b13e4f32 victory replay --pixel: which commands change a pixel, in every target
After each command that can change a texture, the texel under a point of
the picture is copied out; commands that changed one are named with their
pipeline and the values before and after. The listing names textures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:50:34 -06:00
localandClaude Opus 5.5 61cbfe3ea0 A refresh of a copy on the card sends the dwords title memory changed, and no others (VICTORY_SEND_CHANGED, on)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:48:35 -06:00
localandClaude Opus 5.5 8ae4ae6077 Words of the title's image logged each second (VICTORY_IMAGE_WATCH; off)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:47:25 -06:00
localandClaude Opus 5.5 4833ae6ea2 Merge local/next (e6f492d) into local/tests
Blocks the kernel writes, or the runtime is unmapping, are no known holes
and not published; foreign blocks are never held; freed memory forgets its
known holes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:47:04 -06:00
localandClaude Opus 5.5 34a278c990 How much of a texture is mapped is read from the runtime's own record of its views
The pass that uploads textures picked by index asked the host for every
64 KiB of every texture it looked at, and twice for each block that was not
there (12,000 slots wait for their memory during a load, each looked at
again and again): 146 us for a texture of 22 MB, 721 us with 1 MB of it
there. The views of physical pages are known: 1.4 and 0.1 us. Memory that
is in no view is asked of the host as before. VICTORY_MAPPED_BY_VIEWS=0:
always. Measurement: cargo test --release -p victory-gpu --lib look_costs
-- --ignored --nocapture

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:46:35 -06:00
localandClaude Opus 5.5 cb5384fc9c Merge local/shaders2: upstream translator and state fixes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:44:32 -06:00
localandClaude Opus 5.5 fd3865fec4 DirectStorage reads files on a handle per worker; its page lookups do not wait for the title's mapping calls
- All 24 workers read each file through one handle, whose reads the host
  does one after the other: 48 KiB at random from levels.rpf gave 185 MB/s
  where a handle per worker gives 990 (5 GB/s against 14 from the cache).
  VICTORY_DSTORAGE_IO=one|handles|overlapped|direct (handles).
- xmem: the title's pages by number, and where it sees them, each have a
  lock of their own, apart from the one its mapping calls hold while the
  host maps, commits and unmaps. Looking pages up, filling one and telling
  of it, 24 threads beside one that maps: 2.7 million requests a second
  for 0.57, 145,000 maps a second for 60,000. A view is noted before the
  GPU side is told of it, so that a write between the two is not missed.
- Title memory is not touched with these locks held.

Benchmarks: read_bench (VICTORY_BENCH_FILE), map_bench, both ignored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:40:43 -06:00
localandClaude Opus 5.5 de135da286 Merge local/copies: holes known by their bits, landed blocks taken
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:35:15 -06:00
localandClaude Opus 5.5 68c36284d8 Typed buffer loads of 16-bit channels pack two per register; skipped devices say why (upstream c430b1d, 100de0e)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:25:32 -06:00
localandClaude Opus 5.5 fa97cdb3fe Upstream graphics state fixes: rectangle attributes, sampler bounds, A8 copies, depth footprints
Ports of 6f36cdf (normalized attributes of rectangle lists), 97c8783
(A8_UNORM is not of the R8 typeless family), b956320 (copy footprints of
depth-stencil textures), c1c3281 (the descriptor ring's wrap), e6fe8ec and
e34cb53 (CreateSamplerX bounds), 691236d (appended elements are aligned).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:25:15 -06:00
localandClaude Opus 5.5 6acade55fe Anisotropic samplers with point mips keep them where the card has them (upstream e45bacd, 23fc8a5, 7dfa86f)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:24:56 -06:00
localandClaude Opus 5.5 a780306f4c Upstream instruction fixes: 64-bit literals, exact normalized ends, flat offsets, rare forms
Ports of 7d04943 (a signed 64-bit operand sign-extends its literal),
645391b (a normalized buffer format's ends load as exactly 1.0 and -1.0),
40f30be (FLAT offsets ignore bit 11), 3d71ad1, 344704e, 5d6889e, 78c1267,
c3a04e2, e3fe5bf and the tests 259ba31, 8610ffb, 41b2472, 45ed8e3, 8d67fa5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:24:50 -06:00
local 0b3af7939c Merge branch 'local/next' into local/copies 2026-11-24 23:24:47 -06:00
localandClaude Opus 5.5 25f78a079c Mesh primitive exports: corner indices are nine bits, the edge flags dropped (upstream c0228d9)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:24:23 -06:00
localandClaude Opus 5.5 0d70c26014 Immediate sampler slots are kept apart by comparison mode (upstream 2286e03)
One constant used by a comparison and an ordinary sample became a
comparison sampler for both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:24:05 -06:00
local 5ff9f4e56a Merge commit '74045e4' into local/upcopies 2026-11-24 23:22:55 -06:00
localandClaude Opus 5.5 e7e70680cb Holes of view memory known by their bits; landed blocks taken; askings of views left out
VICTORY_KNOWN_HOLES (on): a placeholder's holes are known until the runtime
tells of a mapping or an allocation there; other holes are asked about with
the guards' lock not held. VICTORY_LAND_TAKEN (on): a copy a landing went
through is noted as up to date with it. The split tells more of the askings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:12:04 -06:00
localandClaude Opus 5.5 7321eeb96f Merge local/upcopies: checks of what goes up to card copies, picked writes (both off)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:11:04 -06:00
localandClaude Opus 5.5 8a475da9cf Kernel reads, remapped views, freed memory and lost writes of title memory
- What the kernel is writing (file reads) is not guarded by a refresh before
  the call is done (`kernel_writing`): the read would have failed.
- A title thread that uses a page while the runtime remaps another page of
  the same view waits for that in the fault handler; it faulted on a page
  the title never gave up.
- Blocks being unmapped are not guarded again, memory the title frees leaves
  no notes of its blocks (its VirtualFree is taken over), and other memory at
  an address once guarded or absent keeps its protection.
- The second part of a submission's one asking has a number of its own.
- What shaders wrote waits for a change of mapping instead of being lost;
  what could not be written is counted and said; zeros into title memory
  that went are no fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:10:44 -06:00
localandClaude Opus 5.5 424013a59c Writes through views picked from the heap come back (VICTORY_PICKED_WRITES)
Off by default. A shader that stores through a view it picks by an index (37
compute programs of the title, 82a2ad6d07417d36 one of them) writes buffers
nobody declared. With a submission that has one, the buffers found written
that way are declared and landed as any; of the other buffers the heap shows
unordered views of 32 MB a frame are compared on the card, in turn, and one
that changed undeclared is found. Found late is not landed late.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:09:03 -06:00
localandClaude Opus 5.5 72d856ec7a Merge local/streaming: requests start at the title's submit
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:54:06 -06:00
localandClaude Opus 5.5 ba1fee3ce6 A DirectStorage queue starts its requests at the title's submit, not at half its capacity
The title maps the pages of a batch, and fills in their page lists, in its
own submit (image +0xe88f0): first the batch's mapping list (+0xf2c470,
which writes the page lists at +0x55aa6a0), then the status entry, then
our Submit. A list is a piece of one table, a number per 64 KiB of address
range, that is only ever overwritten. Our queue submitted itself at half
its capacity (2,079 of 4,159), which the title's batches (up to 4,095)
pass three or four times a load: those requests ran up to 0.6 s before
the lists were filled in, on page 0 (waited for) or on the page numbers an
earlier mapping had left (known, so written: somebody else's memory).

- A queue submits itself only when it is full of commands nobody submitted.
  VICTORY_DSTORAGE_HALF=1: at half, as before.
- A list that changes during the write has its new pages written too.
- "page list was not filled in yet" is said (as a warning) only of lists
  that were not: nearly all of its lines were waits for the page table's
  lock.
- A read of a file the host refuses is logged and tried again, its
  destination opened again before.
- VICTORY_DSTORAGE_TRACE=1 (a line per batch, and per request something is
  wrong with), 2 (every request).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:53:34 -06:00
localandClaude Opus 5.5 b0b0a4ff52 Merge local/copies (wide textures, joined writes)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:52:24 -06:00
localandClaude Opus 5.5 2c066abd1a Merge local/next (a79e248) into local/copies; a test of the bits against remapping
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:44:12 -06:00
localandClaude Opus 5.5 9f22d574bc Merge local/next (a79e248) into local/tests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:38:14 -06:00
localandClaude Opus 5.5 63d27fb04f Title bytes under overlapping shader writes once; textures on several threads; cheaper walks of a submission's steps
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:37:55 -06:00
localandClaude Opus 5.5 da48364960 Merge local/shaders
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:36:14 -06:00
localandClaude Opus 5.5 0a32a773ea Merge local/copies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:36:14 -06:00
localandClaude Opus 5.5 c11b92e9ac Merge local/next d4772b3
The check of fetched pieces (VICTORY_FETCH_CHECK) with the landing pool:
pieces are gathered and ordered as there; with the check whole pieces come
down and are hashed by the job that lands them. Off, the fetch is the
landing's own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:36:00 -06:00
localandClaude Opus 5.5 5a734aef0a Buffers loaded past the cache are coherent; record counts of buffers picked from the heap
A raw UAV buffer the program loads with GLC is globally coherent on the
host (the upscaler's waits for other groups, the ped blend shapes): a
load in a loop that only waits would be made once otherwise. Ten shaders
change by it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:35:28 -06:00
localandClaude Opus 5.5 12b078ee3a Views guarded while they are mapped stay writable; tests take turns on WARP
The runtime maps a view and then tells the write watch. A refresh on another
thread could guard the new blocks in between, and the telling then forgot
them and left them read-only: the title's next write to one was an access
violation nobody takes. Told of a new view, the watch now gives the write
access back; before an unmapping it only forgets, as before.

The test binary's random crashes were d3d10warp.dll's own, with two tests on
the software adapter at once: they take turns now. The watch's tests forget
their guards before their memory is freed (another test's memory could get
the address and inherit them), and three more are no longer tied to other
tests' memory, the adapter's other work or a busy PC's timing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:34:28 -06:00
localandClaude Opus 5.5 c6e74e52ff Merge e1702e2 (landing on threads, card steps 2) into local/copies
What is landed beside the guards is an entry of the journal, after the
bytes are in: the blocks stay guarded, clean and known by their bits.
VICTORY_LAND_WINDOW goes, VICTORY_LAND_BESIDE does its work; the runtime
tells of a section it lets go, and our view of it goes too. A test of
landings, title writes and light refreshes at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:32:14 -06:00
localandClaude Opus 5.5 c7cf0c6aa9 Merge local/gpucost
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:21:05 -06:00