8a3d975940b3817c8722c4a792cfdb2d3b5cf87f
598
Commits
-
GPU: textures' staging space is carved from large upload buffers
What was wrong: each texture brought up took a staging buffer of its own size class from a pool, and the pool's free buffers rarely fit a new shot's sizes: making upload buffers was 10 % of the submitting thread in a new shot (run evict5), one committed resource per texture. What changed: staging space up to 32 MiB is carved, front to back, from 32 MiB upload buffers, 512-byte aligned as texture copies need; the copies read their footprints at that offset. The chunks are rewound at each submission (the last one has run, as for the pool) and 16 are kept. Larger textures keep a buffer of their own from the pool. Evidence: test `draw::tests::textures_uploaded_together_each_read_their_own_bytes` (two textures brought up in one submission, the second at an offset in the same chunk, each read back with its own bytes) and the upload tests; the crate's tests twice with 8 threads (a timing test of frame waits, `frame::tests::waits_end_on_ticks_and_count_frames`, failed once while a title run loaded the machine, and passed in the other run). Measured together with the upload barrier batch (next commits' run shots2, 240 s of the intro cutscene, quiet): world frame median 964 ms (mean 1,038) against 1,169 ms with only the parallel creation (run shots1) and 1,206 ms before (run evict6); preparing 497 ms against 706; texture refreshes 264 ms for 135 MB a frame against 745 ms for 154 MB. The two were not measured apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 12:27:23 +01:00 -
Shader: rectangles complete opposite their right angle, wherever it is
A console rectangle list gives three corners per rectangle and the hardware adds the fourth opposite the right angle. The geometry shader that completes them on the host (and the CPU expansion used without it) took the right angle to be at v1, as the blits give it (top left, bottom left, bottom right). The tiled lighting's vertex shader (VS_TiledLighting, 3 vertices per tile: corner c = vertex % 3 at x + bit 1, y + bit 0) gives top left, bottom left, top right, the right angle at v0, so every lighting tile drew its upper-left half and the lower-right half of the tile above: tiles whose neighbour below was in another list lost their lower-right half and lit the one above, the right-triangle wedges along silhouettes and kerbs of runs shards22 (frames 1603, 1615, 1627; their depth is clean there). Now the right angle is the corner opposite the longest side (`emit::right_angle`, ties and NaN keep v1), the fourth corner is va + vb - vc and the second triangle (va, vb, v3), turning as the first for any three points; the CPU expansion takes the same rule from the first float element of two or more components. Tests: emit::rect::rule_tests::right_angles_are_found_in_any_order; emit::rect::tests::rectangles_get_their_fourth_corner draws the three orders (and three points on a line, which draw nothing) on hardware and WARP, and fails with the old rule; primitive::tests:: rectangles_complete_opposite_their_right_angle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 11:04:03 +01:00 -
GPU: what a submission that missed title memory withheld leaves the copies at once
What lists using title memory write while the frame withholds stays in the host copies until the frame's end: through the page table, through root views (byte for byte) and through marked views. When a list of the submission read or wrote memory with no copy, those results are garbage computed from zeros (BVH builder nodes: +-inf bounds, 0xffffffff, rising u16 pairs), and later submissions of the same frame read them from the copies: in run shards20 the meshlet culling read such bytes in its per-batch meshlet buffers (stale copies with no title-side event after their take; 95.59 % of the batches walked equal to title memory). Now what such a submission withheld counts as changed in every buffer copy holding it right after it completes (`drop_withheld`, which takes the place of `drop_at_frame_end`), so the next submission's refresh takes it from title memory again. What submissions that missed nothing withheld keeps the frame-end retake. Run shards21 (
29210929+ the page-table part alone + branch-only diagnostics, same listing as shards20): one list per world frame wrote through the page table, every one missed and was retaken at once (34-19,446 pages); stale copies written through the page table are gone, 98.12 % of 13,509 batches walked equal title memory. Every sampled stale batch left was last written through a declared, unmarked view with no retake after it (the builder's root UAVs, which the page-table path leaves to the byte-for-byte path), hence the root and marked views here too. Test: memory::tests::a_submission_that_missed_leaves_the_copies_at_once (a write through the page table beside a miss; fails before the change: the next submission reads the write instead of title memory's bytes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 10:44:44 +01:00 -
GPU: textures are brought up outside the heaps' locks, several at a time
What was wrong: at each submission the textures to bring up were read from title memory, detiled into staging buffers and copied one after the other on the submitting thread, while the heaps' view registry stayed locked: in a new shot that was about a third of the submitting thread (reading memory 19 %, making staging buffers 10 %, detiling 6 %, run evict5), frames grew 6-10 ms per MB uploaded, and title threads setting views waited on the lock throughout. What changed: what to bring up is collected under the heaps' locks, then refreshed without them on up to four threads (a quarter of the CPUs), those whose trackers are clean skipped, then recorded. Staging buffers come in powers of two (at least 64 KiB), so a buffer serves other sizes, and are made without the pool's lock. The tracker still decides the bytes: its pages are taken (and guarded) before they are read, so a title write during the read or detile marks them again and the next refresh brings them up (`watch::tests::writes_mark_every_tracker_of_their_page`). Evidence: tests `host::tests::heap_textures_brought_up_together_each_get_their_upload` (six textures refreshed side by side, each uploaded once, none again when unchanged) and the upload tests; the crate's tests three times with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: what a view needs is made before its slot's lock is taken
What was wrong: making a heap slot's view held the heap's slot lock throughout, including making the texture it views (on first use) or the host copy of the buffer memory it views: title threads binding views for draws and writing views waited on that lock (119 of 307 samples of title threads in our code, run evict5). What changed: a slot whose view is unchanged is answered under the lock as before. One to make again releases the lock, makes what the view needs without it, takes it again and, if the slot still holds the record it prepared for, makes the view (cheap now); if the title wrote another record there meanwhile, that record is made instead. Evidence: tests `descriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait` (a thread binds a view while another slot's texture is made, bounded wait) and `a_slot_rewritten_while_its_view_is_prepared_views_the_new_record` (the title writes another record into the slot during the prepare; the slot views the new record's texture); the crate's tests three times with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: a texture's refresh asks its tracker's clean bit before taking its pages
What was wrong: textures the heaps view are refreshed at every submission where the title used them lately: 123,000 refreshes a frame (run evict3), each taking its tracker's lock to find, almost always, nothing changed. What changed: a refresh of a tracked texture first reads the tracker's dense clean bit, which needs no lock, and stops there if it is clean. Evidence: the upload tests (`draw::tests::a_texture_is_uploaded_once_per_submission_and_only_when_written`, `a_texture_owning_its_pages_is_uploaded_on_any_write`, `a_write_into_one_mip_uploads_that_mip_alone`); the crate's tests twice with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: a slot the title rewrites keeps no per-texture list of slots
What was wrong: every slot the title rewrote updated a map from each host texture to the slots viewing it (for giving textures up), searching the texture's whole list to take the slot out. A texture viewed in thousands of slots made each rewrite cost ~25 us; the title rewrites ~62,000 slots a frame (it copies per-draw descriptor tables into its heap), so heap syncs took 0.6-2.9 s a frame and held the heaps' lock that title threads writing views wait on (run evict3: 62,208 stale slots a frame at 25.7 us each, 16 us rising to 34 us as the lists grew). What changed: no map; giving textures up walks the heap's slots once per pass that gives any up. Evidence: tests `descriptor::host::tests::a_slot_viewing_a_texture_given_up_is_made_again_when_read` and the eviction tests; the crate's tests twice with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: textures for heap slots shaders read are made outside the heaps' lock
What was wrong: after each submission, the views of heap slots shaders read for the first time (read marks) were made under `SHADER_HEAPS`, which every title thread writing a view takes: making a placed texture (its resource and host texture) took up to milliseconds each, and title threads waited 1-6 s a frame to write views (runs evict2, noevict1; main 0.2-0.3 s). What changed: the slots are looked up under the lock, the placed textures they view are made without it (they are never released, so they outlive it), and the lock is taken again only to make the views. Evidence: test `descriptor::host::tests::views_written_while_read_slots_get_their_textures_do_not_wait` (another thread writes a view while a read slot's texture is being made and finishes within a bounded wait); the crate's tests twice with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: textures the heaps view are brought up to date only when shaders read them lately
What was wrong: at every submission (about 30 a frame), every texture any heap slot of a heap-indexing list viewed was brought up to date: its staging refreshed and, where its pages had changed, detiled and uploaded, read or not. With placed textures made when read (4-8k textures, 5-8 GB viewed by the heaps) that re-uploaded about 4 GB in 30-46 world frames and took 0.3-3.7 s a frame (runs evict2, noevict1; main 5-25 ms). What changed: a heap-viewed texture is brought up only if the title used it in this presented frame or the last (made then, named by one of its lists, or read through the heap as the eviction pass's stamps found). Textures lists read through tables keep their own rule (the list names them). Uploads of heap-viewed textures are counted with the others. shortcut: a texture read again after a gap is brought up after the submission that read it, which can see bytes one refresh old. Evidence: test `host::tests::heap_textures_unread_lately_are_not_brought_up` (a viewed texture whose pages changed is not uploaded while not read lately; stamped as read, it is); the crate's tests twice with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
GPU: host textures fed from title memory are given up when unused, and past the card's budget
What was wrong: a host texture, once made, lived as long as its title texture; placed textures (made when shaders read them) for the whole run. The title views far more textures than one frame reads (8.4-8.9 GB of placed textures left null in run textures1), so making them as they are read only grows video memory until the card pages or the process runs out of commit (30.8-32.2 GB with the read marks alone). What changed: a title texture's host texture can be given up and made again on its next use (the owner is a resettable slot; host copies are returned owned). Host textures fed from title memory (no render target, depth or unordered access, nothing written by host copies) carry use stamps: a list of the title's naming them (tables, copies; our own upload lists do not stamp), and, at each pass, every read mark set since the last pass on a heap slot viewing them (the marks are then cleared; a slot's read is reported as new only once, so stamping on the first read alone gave up textures read every frame: run evict1 gave up and made again hundreds a frame). Once per presented frame, before a submission, those unused for 120 s and 300 presented frames are given up (shorter idle times gave up textures read again within a minute, runs evict2 to evict4), and past 90 % of the card's budget the least recently used others until 85 %. Giving one up first gives every heap slot viewing it a null view of its kind (retired until the running submission has run; the record stays noted, so heap syncs pass it by and a draw's or shader's read makes it again), then the title textures let go of it; lists recorded before hold it until they are reset, so no GPU work reads it freed. The next use makes it again from title memory (a fresh upload). Uploads of heap-viewed textures skip those not made. GPU-written textures are never given up; they go with their title texture. The cap on placed texture bytes is gone (the budget bounds video memory instead). Measured, 240 s of the intro cutscene each. With giving up (run evict2) against without (noevict1, the same tree with the pass off): card memory flat at 7.6-9.5 GB against 6.4 GB rising to 10.4 GB (86 % of the budget) at the end; host textures 6.1-7.8 GB against 5.2 GB rising to 8.6 GB; process commit 26.2 GB against 27.7 GB on average (29.7 GB and rising at the end). With the rest of its stack (run evict6) against main (perf13): median world frame 1,206 ms against 475 ms; frames uploading under 50 MB of textures 559 ms (+18 %, run evict4); a new shot's uploads cost 3-4 ms of frame per MB. Evidence: tests `host::tests::textures_read_every_frame_stay_and_title_lists_stamp_theirs`, `host::tests::heap_reads_since_the_last_pass_name_their_textures`, `draw::tests::a_texture_given_up_is_made_again_with_its_bytes_and_recorded_lists_keep_it`, `descriptor::host::tests::a_slot_viewing_a_texture_given_up_is_made_again_when_read`, `resource::tests::only_textures_fed_from_title_memory_are_given_up` and `resource::tests::idle_textures_go_and_past_the_budget_the_least_recently_used`; the crate's tests three times with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:25:12 +01:00 -
Shader: the read-mark test's doc comment is no list
Clippy (doc_lazy_continuation) took the wrapped "1." for a list item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:29 +01:00 -
GPU: read marks are taken from both written-page bitmaps
What was wrong: shaders that use title memory got a bitmap of their own (the withholding rule), but `take_reads` still read one bitmap through `bitmap()`, which no longer exists: the stack did not compile, and reading only one bitmap would lose the reads those shaders mark. What changed: `take_reads` ORs the read-mark words of both bitmaps and clears a forgotten slot's mark in both. Evidence: test `host::tests::read_marks_of_both_bitmaps_are_taken` (a read marked in each bitmap is taken, each once; a forgotten slot's mark is cleared and its next read taken again). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:29 +01:00 -
Shader: read marks only for texture views taken from the heap itself
Every image instruction reading a texture view from the resource heap loaded the read-marks bitmap word (system memory) after it, tables included. A view read through a table cannot be a slot left null: the host makes table slots for the draw. Marks are now emitted only where the program takes the descriptor from the heap itself. Test: `heap_direct_texture_reads_mark_their_heap_index` (a table read marks nothing, a heap-direct read sets exactly its slot's bit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:29 +01:00 -
GPU, Shader: placed textures made when shaders read their heap slots
Views of textures the title placed itself (device 0x230, no resource object; its streamed textures) were left null until a draw read them through a table: making all of them never fits the card (run textures1: 12-16k such slots at ~12.5k addresses, 8.4-8.9 GB of console bytes), and shaders index the heap themselves, so materials sampling through the heap read black. Translations made with `emit::Options::view_marks` now also mark reads: every image instruction reading a texture shader view from the heap sets bit `VIEW_READS` + the view's heap index in the views' marks bitmap (after the written pages), where still clear (a load first, an atomic OR only then). After each submission the host takes the newly set marks and makes the views of those slots that were left null, so the next submission reads the texture; a slot made null again is forgotten so its next read marks it again. Placed textures stop being made past 3 GiB of console bytes (`shortcut:`, no eviction yet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:29 +01:00 -
Shaders: a test of register arrays indexed in waterfall loops
`tiled_lighting:CS_PrescalarizeLightLoop` builds its per-tile light masks in v3-v14 with `v_movrels`/`v_movreld` whose M0 each lane takes from its own group index (clamped 0-11 by `v_med3_u32`) in waterfall loops over the lanes. The new GPU test runs that shape twice (the second pass reads what the first wrote) and checks every element of every lane, on hardware and WARP. It passes: the lowering of the shape is right; what the program writes in the title depends on its inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
Shaders: lanes skipping a compare's region read 0 of its lane mask
A lane mask made by a compare inside a region some lanes skip, joined after it with whatever the register held on the skip edge (the compiler reuses the register: a float, a descriptor word), stopped programs on "a lane-mask join of an untracked mask". The console wave runs one path: where some lane ran the region, the skipping lanes read their bit of the compare, 0 (a compare writes 0 for inactive lanes); the compiler merges no value for them, so where the whole wave skips they hold none either. A lane-mask phi at a per-lane join now takes false along an edge bringing data when some edge brings a mask and no lane taking the data edge is in any of those masks (proved on the lane conditions, `Bools::meet`). Masks that do hold such lanes (a saved EXEC) stay refused: the console would give those lanes 1. Test: `a_compare_mask_joined_with_data_on_the_skip_edge_is_0_there` (the shape on hardware and WARP; the saved-EXEC variant refused). Shader list against bcebd1ce: 0 newly failing; newly emitted `rtdirectionalshadows:CS_RTShadowTrace32TemporalHQ_OneOver4RPP` and `_OneOver2RPP_TiledFarOnly`, `shadowmask:CS_TraceShadowRays_FullAdaptive`. The other 13 `RTShadowTrace*HQ` stay refused: their register is reused on paths that reach a real mask read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
Shaders: a scalar VALU result takes no EXEC guard
`indirect_light_probes:CS_IrradianceCache_Shade_823aad37` (the GI irradiance cache, in the intro cutscene 2 dispatches a frame and 2 indirect ones) stopped on "a lane-mask join of an untracked mask". The lowering evaluated every VALU instruction's guard before its operation, also for `v_readlane_b32` and `v_readfirstlane_b32`, whose scalar result is written whatever EXEC holds and never used the guard. At 0x14bf0 the program restores spilled masks with `v_readlane` under an EXEC taken from s[6:7], a join of a restored mask and, on the edge where every lane skips the region, the constant 0; the next instruction sets EXEC again. Building that EXEC as a lane condition was the only demand for the join. `valu` now takes the guard only for vector destinations (compares, which write lane masks, are lowered before it as before). Test: `a_scalar_result_needs_no_exec` (that shape; refused without the change). Shader list against 10d24b19: 0 newly failing; IrradianceCache_Shade emits and makes a pipeline (4 s, 0.3 GB; the validator refuses it as other compute programs with implicit-LOD samples). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
Shaders: an image descriptor read only for its size takes it from the host
`PS_PuddleDetect` (35 programs; in the intro cutscene ~14 draws a frame, half of them indirect) loads a bindless texture's descriptor whole and reads only its width, height and base level from dwords 1-3, never sampling it, so no use tells the view's kind and the program stopped on "a descriptor read only as data". The host's view addresses (`t1` of the memory space) grow from 8 to 16 bytes a slot: a console descriptor's dwords 0-3 as far as the host knows them. Buffer views keep their title address in dwords 0-1; texture views (shader, unordered and placed ones) get the image descriptor's size fields: width - 1 and height - 1 of the resource's level 0 (dword 1 bits 30-31, dword 2 bits 0-13 and 14-29), an identity swizzle, the view's first and last level (dword 3 bits 12-15, 16-19) and the image type (bits 28-31). The shader answers dwords 1-3 from the table only for an 8-dword load at a whole descriptor (the compiler loads image descriptors whole); shorter loads keep dwords 2 and on refused, so buffer record counts and formats are not guessed. Address, format and tiling bits of a texture's words read 0 (`shortcut:`). Tests: `a_texture_view_gives_its_image_descriptor_size_fields` (the encoding); the title-memory GPU test reads an image descriptor's size words through the table. Shader list: all 35 `PS_PuddleDetect` emit and validate; the cutscene's two variants make pipelines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
Shaders: an address half set on every taken edge into its join is known
An address's high half proven to be 0 (a table or heap address) had to be that constant itself or an `s_addc` of it. `indirect_light_probes: CS_Alpha_Schedule` sets its table pointer's high half (s25 = 0) inside the region that only a skip no lane takes bypasses (compute: every lane runs from the start, so the pre-`s_wqm` lanes are all of them); the skip edge would bring a stale input SGPR, and the join stopped tracking: "an address into a descriptor heap with an untracked high half". A phi whose args on the edges some lane takes (`edge_taken`, the test the previous change uses for descriptors) all have one origin holds that value in every lane that reads it; the address's high half check now looks through such a phi. Only the proof changes: the address lowered is the traced one. Test: `an_address_half_set_where_only_lanes_that_never_run_skip_is_known` (refused without the change). CS_Alpha_Schedule translates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
GPU: a texture re-detiles only the subresources whose pages changed
What was wrong: a tracked texture whose memory changed anywhere was read whole, detiled whole and copied whole into its host texture. Streamed textures change mip by mip, so each arriving mip re-read every other one: up to 430 MB of texture reads a frame in run integ2. What changed: each subresource knows the bytes of the texture's memory it lies in (its first and last texel's offsets in the layout, rounded out to the layout's blocks). A refresh reads only the subresources that the changed ranges touch, keeps those whose bytes changed (per-subresource hashes; none when a whole changed page lies in the subresource's span, as for the whole texture before), detiles and copies only those. The untracked path, which hashes the whole memory, still uploads every subresource. Evidence: test `draw::tests::a_write_into_one_mip_uploads_that_mip_alone` (a 512x512 two-mip texture: both mips at first, then mip 1 alone after a write into it, mip 0 keeping its texels) and the other draw tests on WARP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
GPU: texture staging buffers come from a small shared pool, not one per texture
What was wrong: each uploaded texture kept an upload buffer of its own size for life, in system memory: 0.2 GB on main (run textures5), 2.6-2.8 GB once placed textures are made when shaders read them (run integ2). Making a buffer for every upload instead (066fbbeb, run textures8) released them, but the menu movie, which rewrites 12.7 MB of textures every frame, then paid ~5 ms a frame for fresh buffers: texture preparation 12.7-13.8 ms in textures8 against 8.0-8.4 in textures7. What changed: every upload is recorded at submission by the submission's own list (
23a4b62b), and `Host::execute` waits for each submission, so a staging buffer is free again from the next submission on. Detiles take a buffer of the same size from a pool shared by all textures, or make one; the buffers one submission used go back to the pool before the next one's uploads, and the pool keeps at most 64 MiB of free buffers (oldest dropped). The staging state keeps only the layout, the change tracking and the last hash. The memory line no longer gives "texture staging". Evidence: textures8 (one buffer per upload) ended at 7,871 MB of system memory and 24,771 MB of commit against textures7's 8,254 and 25,130 (206 MB of staging gone), no out-of-memory and no removal in 200 s. Test `draw::tests::a_texture_owning_its_pages_is_uploaded_on_any_write` now also checks that a reused buffer carries the new bytes (WARP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 10:24:28 +01:00 -
HLE: writes into physical pages are reported where the pages show when the write ends
DirectStorage writes streamed data into physical pages through views of its own and then tells the title views showing those pages, so that the GPU side's host copies of them take the new bytes. The list of addresses was looked up when the write started. A page window's decode (zlib or BCPack) takes milliseconds, and the title maps streamed pages into its GPU heap meanwhile (CopyPageMappingsBatchX): the remap marks the copies there, a refresh can take the page before the bytes land (zeros, or part of them), and the report at the end named only the old addresses, so the copy at the new one stayed stale with a clean tracker for good. The addresses are now looked up when the write ends (PageWindow::drop, after the copy in write_physical). An address mapped during the write is reported; one that stopped showing the page during the write is not, and needs not be: the unmap itself marked the copies there, and they read the address's new contents at their next refresh. A mapping made after the report is marked by its own remap. Test page_windows_report_where_the_pages_show_when_done: a page shown at A is mapped at B and unmapped from A while a window writes it; the drop reports B only (and write_physical the same). On the previous code it reports A. Found with the meshlet culling's copies: in title runs 5-8 % of culled batches read meshlet buffers whose host copies (4 MiB windows over the GPU heap's mapped pages) held zeros where title memory held the buffer, with the tracker clean: whole batches culled, run-dependent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 10:07:13 +01:00 -
GPU: a retake marks host buffer copies alone, not textures' staging
What was wrong: a retake (what a frame withheld leaves the host copies) marked the memory changed in every tracker holding it: host buffer copies, but also textures' staging and descriptor heaps, whose contents come from title memory, which did not change, and which shaders' writes never reach. Placed textures over withheld ranges (every world frame withholds 280-9,300 pages) were detiled and uploaded again each frame: 97 MB a frame, 19 % of all texture uploads (run evict3, by each page's last reason). What changed: trackers of host buffer copies are made by `watch::track_copy`, and a retake marks only those. Evidence: test `watch::tests::a_retake_marks_buffer_copies_alone` (a copy's and a texture's tracker over one range: the retake marks the copy's alone, a later title write marks both); the retake test now uses copies' trackers. The crate's tests twice with 8 threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 09:50:22 +01:00 -
GPU: a retake marks the copies without opening their guards
At every presented frame the copies of title memory a withholding frame's shaders wrote take it again (`retake_dropped`). `retake` did that through `changed`, which also gives write access back to every guarded 64 KiB page of the range, one VirtualProtect each, under the guard lock that title threads' guard faults wait on. Title memory did not change, so opening the guards bought nothing: the next take only re-guarded them, and title writes meanwhile went through unseen by the guard (marked anyway by the retake). Run perf15 (stack samples every second over the intro, main
38994e53): 15.4 % of the submitting thread's samples were in retake -> changed_here, waiting in the kernel, the largest item after the GPU wait (30.8 %) and the refresh copies (23.1 %). Now a retake marks the pages changed in every tracker holding them and in the trackers of their other mappings, and leaves the guards in place: the next refresh copies the pages from title memory, `take` finds them guarded already, and a later title write still faults and marks them. The test fails with the old body (the page comes back read-write). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 09:37:58 +01:00 -
GPU: the statistics line no longer walks the process heaps
The video-memory line of diagnostics builds gave the committed bytes of every process heap through HeapSummary, once per stats window. That walks the multi-gigabyte process heap under its lock: in run perf15 (stack samples every second over the intro) it was 7.7 % of the submitting thread's samples, about half a second each time, and a title audio thread was waiting in our counting allocator's alloc_zeroed for the same share meanwhile. Every measured run had one such stall per window, in the frame time of the window it fell in. The line keeps the Rust heap's bytes, which the allocator counts for free. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 09:06:45 +01:00 -
GPU: what a frame withholds leaves the host copies at the frame's end
The withholding rule keeps what lists using title memory wrote out of title memory while frames miss, but not out of the host copies: the GPU keeps reading it there, and since the title never rewrites that memory the copies kept it for good. In a later frame without misses, whose writes go back, a BVH builder program reading such stale results (its record arrays hold its destination addresses) wrote where they pointed: run textures9 died 15 s into the world on a title object holding f16 +-inf pairs, a box16 node's empty bounds, written by the root-UAV byte ranges of a frame four frames after the last miss (title+0x4b6b75). Now everything a frame withholds (the page table's marked pages, root-UAV byte ranges, write marks of shaders using title memory) is noted (`memory::drop_at_frame_end`), and at the frame's end the memory counts as changed in every host copy holding it, aliases too (`watch::retake`), so each takes title memory's bytes at its next refresh, through its tracker. Results computed from memory with no copy live through their own frame only. What the tracers lose: within a frame they still read what the builder wrote; from the next frame on they read the title's memory where the builder's results were withheld, an unbuilt BVH instead of one built from zeros. Both miss everything. Test: `shadow::tests::what_a_frame_withholds_leaves_the_copies_at_its_end` (frame N withholds a record written into a title buffer's copy and an inner buffer's copy; frame N+1 reads title memory's bytes in both; fails without the change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 08:30:27 +01:00 -
GPU: upload tests count their own texture's uploads
What was wrong: the upload tests read a process-wide count of texture uploads, so another test's uploads between their `before` and their submission landed in it: `a_texture_is_uploaded_once_per_submission_and_only_when_written` failed in a parallel run of the crate's tests and passed alone. What changed: each texture's staging state counts its own uploads; the tests read those of their texture (`texture::uploads`, tests only). The process-wide counter had no other reader and is gone. Evidence: the crate's tests three times in a row with 8 threads, 157 passed each time; clippy clean on both feature sets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 08:25:56 +01:00 -
GPU: dropping a tracker keeps guards another mapping's tracker relies on
A take guards a tracked page and every other mapping of the same physical page (the runtime links them when it maps them), so that a write through the title's pool view marks the copy of its tiled heap. But when a tracker went away, every page no tracker held any more got write access back, including a page guarded for a tracker of another mapping: after an exact or buffer copy over the pool view was dropped, the title's writes there went unseen by the loose window over the tiled heap, which stayed clean with stale bytes (shards' sweep: 9,520 such pages, ~620 MB, all guarded at the window's own address; for 2,789 a newer copy held the fresh bytes). Now a page stays guarded while a linked mapping of it is held; the next write there faults once, marks that tracker and opens it. The new test fails without the change (the write through the other view goes unseen). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 08:12:33 +01:00 -
GPU: while lists using title memory miss, none of their writes go back
What a list using title memory wrote stayed out of title memory only when that list itself read or wrote memory with no host copy. Lists after it compute from its results in the host copies, the BVH builder's write addresses among them (its record arrays), so their writes went back: with every builder program running (the bind fix after this one), drops1 died 97 s into the world on a title pointer holding +inf/-inf, an empty AABB's floats (title+0x35a4245, then title+0x10823c). Now any miss of such a list marks its frame (`memory::note_missed`), and from then through the next presented frame (`memory::withholding`: the next frame's lists read this one's results before its own first miss) no list using title memory sends anything back, by any path: the page table's marked pages, root-UAV byte ranges, and write marks, which shaders using title memory now set in a bitmap of their own (`shadow::view_writes(true)`). Their results stay in the host copies for the GPU. With misses in every world frame this gives the title's CPU the same view as before the builder ran; it lifts itself when the misses stop. Tests: `memory::tests::a_miss_holds_back_its_frame_and_the_next`, `shadow::tests::marks_of_shaders_using_title_memory_are_held_back`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 08:02:46 +01:00 -
victory: the exe's bytes are dropped once the image is mapped
What was wrong: `run` kept the exe as read (114 MB) and its patched copy (another 114 MB) alive until the title exited, though nothing reads them after the loader writes the patched copy and maps it: ~228 MB of the Rust heap for the whole run (large-allocation stacks of run textures8). What changed: the read bytes are a temporary of `prepare`, and the prepared image is dropped right after `load`. The mapped image, its path (`GetModuleFileName`), title DLLs and crash reports come from the loaded image and the files, not from these buffers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:56:02 +01:00 -
GPU: a frame wait begun after its tick passed ends at once
A frame-event wait (the title's flip wait before each present) always slept until the next tick after now, even when the frame had run long past the tick it was waiting for: in the intro cutscene, where frames take 0.5 s against a 33 ms interval, that added 0-33 ms to every frame (4 % of the submitting thread's samples, run perf3). A wait now takes the latest tick passed when that is after the last tick its kind took (still one wait per tick per kind), as an event signalled at each tick and left signalled until a wait takes it would; the next wait waits for the next tick as before, so a title that keeps up is paced as before. That a late wait returns at once on the console is an assumption: nothing at hand says what a wait begun after its event does. Diagnostics: per stats window, frame waits and those that ended at once, and presents whose flip tick was the previous present's (should stay 0). Test: after two missed ticks a flip wait ends at once on the latest one, the next on the tick after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:48:23 +01:00 -
GPU: pages with nothing mapped are zeroed in host copies without failing copies
When a copy's refresh met a page with nothing mapped (tiled memory the title unmapped, placeholders), the kernel read failed and the copy was redone by 64 KiB and then 4 KiB pieces, each failing again: 10-22 MB of unmapped memory a frame took 7-30 ms (run perf4). The tracker already learns which pages are unmapped when it fails to guard them; `take_split` now returns those runs apart, and the refresh zeroes them in the copy as the piecewise copy did, with no kernel read. Test: of a reservation with one page committed, the committed page is to copy and the other to zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:48:23 +01:00 -
GPU: a texture written in pages of its own is uploaded without hashing it
What was wrong: since
23a4b62bevery upload of a tracked texture hashed the texture's bytes (BLAKE3) to skip uploads whose bytes did not change. That pays for small textures sharing 64 KiB pages with other data the title writes, but not for textures the title rewrites every frame: the menu movie's Bink planes (3840x2160 Y plane plus chroma, 12.7 MB a frame) took 12.7-13.8 ms a frame of texture preparation in run textures8 (12.0-12.9 in integ3), against 3.7-5.2 ms before23a4b62b(mk3, perf5). What changed: when a changed page lies wholly inside the texture (it holds nothing but texture bytes), the write itself says the texture changed: no hash, and the stored hash is forgotten. Textures whose changed pages are shared still compare their bytes. Evidence: tests `draw::tests::a_texture_owning_its_pages_is_uploaded_on_any_write` (new) and `a_texture_is_uploaded_once_per_submission_and_only_when_written` (now also: the same bytes in a shared page are not uploaded) on WARP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 07:13:39 +01:00 -
Shader: 16-bit typed buffer accesses pass bits through integer views
On GFX10 a typed buffer access converts by the buffer format of its descriptor, and `_d16` only packs the 16-bit results: through a UINT or SINT view, `buffer_load_format_d16_*` and `buffer_store_format_d16_*` move the 16-bit integers as they are. The lowering always converted them as halves (f32 to f16 on loads, f16 to f32 on stores) through a float-typed handle, so through an integer view a store wrote a float's bit pattern into the 16-bit element and a load turned the integer's bits into a denormal and then to 0. Grand Theft Auto VI's compute graph (the 65 compute_graph_ops programs: the face network's matrix products, activations, reductions, copies; the only users of these accesses in the title's world set) keeps its halves in R16G16B16A16_UINT and R16_UINT views. Its output was bit soup that changed from frame to frame (shards6: 0x0011 0x0001 0x0015 0x006D 0x80EC ... at frame 1658, 0xD8A8 0xA388 0x2F30 0x0472 ... at 1670 in the same place), the blendshape extract turned that into the head's translations, and the main character's head came out as a flat slab or not at all. The view's format kind now rides in the view-stride table, beside the stride: bit 31 an integer format, bit 30 a signed one (VIEW_INTEGER, VIEW_SIGNED; stride readers mask them off). The host sets them for typed buffer views of UINT and SINT formats. A d16 typed load through such a view keeps each channel's low 16 bits; a d16 typed store zero- or sign-extends the 16-bit integer. Float, normalized, raw and structured views keep the conversion they had. The integer path still uses the float-typed handle and relies on the driver passing a mismatched component type's bits through (shortcut comment; checked on the RX 6700 XT and WARP by the new tests). RESULTS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
GPU: a listed frame's trace shows the title's barrier calls
Diagnostics only. The trace of a listed frame named every command but not the barriers between them, so whether the title orders two dependent dispatches could not be read from it. Each barrier call now notes itself in its list: the enhanced form as its groups' (kind, count) pairs (0 global, 1 texture, 2 buffer), the legacy form as its barriers' kinds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
Shaders: inputs a counted v_movreld loop overwrites first need no value
`PS_DownSampleBloomFilter(Karis)_557ae3d7` (the bloom downsample, 3 draws a frame in the intro cutscene) fills a register array v0.. with `v_movreld` in a uniform loop counted from a constant start to an `eq` bound. v0/v1 hold the raw barycentrics on entry, which have no host form ("barycentrics read directly"), so the loop header's phi refused the program although no lane ever reads those values: the loop's first passes overwrite them. PR #457's proof, ported onto the current lowering: the loop-carried register's only use is the unguarded `v_movreld` at index M0, M0 a copy of a scalar phi starting at a constant and stepping by 1 to an `s_cmp_eq` bound that exits through the one exit block; the register's slot lies in [start, bound), so the move writes it before anything can read it, and the entry edge's value is undefined. Every other shape keeps the refusal (the PR's 15-case test: wrong start, skipped slot, decrement, wrap, unknown start, short loop, clobbered SCC, early or divergent exit, masked write, old value as source, reads before the write or on the back edge). Shader list against f6cd0144: 0 newly failing; `PS_DownSampleBloomFilter Karis_557ae3d7` and `PS_DownSampleBloomFilter_557ae3d7` emit, validate and make pipelines (1-2 s, under 0.1 GB). Ported from PR #457 (efcd753a, 08b681c2, Jeremy Goldberg): the fill-phis arm now takes the edge's liveness from `live_edges`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
Shaders: descriptors joined by nested control flow stay refused for now
Takes back PR #1012's recursive heap index (an edge into a descriptor's join that is itself a join). Across the title's shader list it lets one program through, `indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays` (issued every cutscene frame), and that program's host pipeline does not fit the machine: the DXIL validates in 4 s, but the AMD driver's compile passed 6 GB after 64 s under a watchdog (unwatched it reached 26.7 GB commit and starved a title run, drops2). Its DXIL has 22,382 branches, 2,609 heap handles and 2,478 size queries (151k lines), against 3,857 branches for the next largest newly emitted program, which compiles in 24 s and 0.8 GB. The refusal is "a descriptor chosen by control flow" again, as on `main`; edges no lane takes still join no heap index (previous commit). The change can come back once pipelines this costly stay off the title's pipeline worker (`shortcut:` at the arm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
Shaders: a lane mask joined with data at a uniform join is its number
The title's wave-uniform BVH walks (`shadowmask:CS_TraceShadowRays_ Checkerboard`, `deferred_tiled:CS_LaserLightShadowRaytracing`, the four `rtdirectionalshadows:CS_RTDistantShadow*_Tiled`) keep the lanes of the node being visited in an SGPR: a lane mask on entry, a number popped from an LDS stack (`v_readfirstlane_b32`) on the loop's back edges, read both as a number (`v_and_b32` with the lane's bit, `s_cmp`) and as a mask. The join was refused: "a register joining a lane mask and data, read as data" (40 programs), then "a lane-mask join of an untracked mask". At a join where every branch in is uniform (SCC), every lane comes along the edge the console's wave took, so the register holds that edge's value. In compute (console lanes) a mask's number on its edge is its ballot there (`mask_dword`), exact; read as a mask, a number gives each lane its own bit (`lane_bit`, as `Atom::Opaque` does). A per-lane branch into the join (an EXEC skip, a per-lane loop exit: where lanes would take edges the wave did not; the console compiler's if/else always enters its join that way) keeps the refusal. Tests: `a_mask_joined_with_data_needs_a_uniform_join` (the per-lane loop still refused, the uniform one lowers); `synthetic_tests::a_mask_joined_with_data_at_a_uniform_loop_is_its_number` (a mask shifted through a VGPR around a uniform loop, read as a number and as each lane's bit; values checked on the GPU, hardware and WARP; fails without each half of the change). Shader list against `main`: 0 newly failing, 29 newly emit; all 40 "a register joining a lane mask and data" programs pass it (16 stop at a later mask join). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
Shaders: a descriptor no lane brings along an edge needs no source there
A uniform descriptor joined at a block was traced along every predecessor edge, so an edge no lane takes stopped it with the registers it would bring: `indirect_light_probes:CS_Alpha_Schedule` and `alphaResolve:CS_AlphTransmissionPrefilterMip` load a texture under the lanes that ran before `s_wqm` and skip the load when there are none; in compute every lane runs from the start, so nothing takes the skip, but the skip edge's stale input SGPRs made "a descriptor neither loaded nor built". `resource.rs` now gives such an edge (structurisation's lane conditions: the edge's reach and branch condition cannot hold) a taken edge's source, and lowering joins a 0 heap index there (`never_taken`, the same test), so nothing is computed on an edge no lane runs. Test: `a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source` (the `s_wqm` / `s_and_saveexec` / skipped load / sample shape; refused without the change). Shader list against `main`: 0 newly failing; `CS_AlphTransmissionPrefilterMip` and `shadowmask:CS_TraceShadowRays_ScreenSpaceOnlyCheckerboard` emit, `CS_Alpha_Schedule` stops later ("an address into a descriptor heap with an untracked high half": the address's high half is set inside the same skipped region). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
Shaders: descriptors joined by nested control flow
A descriptor every lane shares, chosen by an if/else nested in another, reaches the outer join with an edge that is itself a join. Such an edge was refused with "a descriptor chosen by control flow": each edge had to be a heap load. The heap index is now computed recursively: a load's index, or a phi at the join of what each predecessor computes at its end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

ThiagoandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
GPU: a drop counted by its reason names the pipeline's shaders
The per-frame drop ranking (diagnostics) counted draws and dispatches that have a host pipeline but cannot be bound by reason alone, so a reason's hundreds of drops a frame could not be traced to the programs behind them without a traced list. The key now ends with the pipeline's shaders, as the "no host pipeline" keys already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 07:02:14 +01:00 -
GPU: a texture is uploaded once per submission, and only when its bytes changed
Every list that read a title-written texture through a table recorded the copy of its staging buffer into the host texture, changed or not: run perf7 counted 3,195 texture copy commands in one frame for 149 textures (a 64x64x32 R16 array 24 times, a 512x512 BC7 18 times), 17 ms of GPU time, the largest single GPU item. A list now only defers the texture (staging and host texture). At submission the textures of all its lists are brought up to date once, and those whose memory changed are copied by the submission's own upload list (the one heap-indexed textures already had), which runs first. For memory the change journal follows, a flagged page uploads the texture only if the texture's own bytes changed (a 64 KiB page holds other data too). As for heap-indexed textures, a title copy into texture memory recorded in the same submission shows from the next one on. Test: two lists of one submission upload a texture once, the next submission not at all, and again once the title writes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 06:34:36 +01:00 -
GPU: large heap allocations name their caller; list upload memory in the memory line (diagnostics)
The counting allocator logs the stack of the first allocation of each power-of-two size class from 32 MiB (who holds our 1.8 GB of large blocks, run textures6), and the video-memory line counts the live list upload blocks (list 0x4a0) and their bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 06:22:45 +01:00 -
GPU: a heap's merged view ranges are kept current, not rebuilt whole after each change
Each list running heap-indexing shaders asks for the ranges every view of the heap reaches, merged per host copy; they were rebuilt from all ~9,000 copies whenever one range came or went, which the title's view writes do between most lists: the heap step still took 13-27 ms a frame in run perf4 although it now passes clean copies by. The merged range of a copy is now updated where its ranges are counted, only for that copy, and the step walks the current set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:59:42 +01:00 -
GPU: diagnostics: title threads' wait for the heaps' lock; host copies in video memory
* copystat: time title threads spend waiting for the shader-visible heaps' lock when they write a view (held by each submission's heap sync). * `VICTORY_COPIES_IN_VIDEO_MEMORY=1`: shared buffers, host copies of title memory among them, in a GPU upload heap (video memory the CPU maps) where the host has one, to measure how much of the GPU's time is shaders reading copies across the bus. CPU reads of the copies get slow (snapshots, copy-backs): for that measurement only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:58:58 +01:00 -
GPU: copies of single views share large buffers
A view the title places off its buffer copy's elements gets a host copy of its own bytes (`shadow::exact`), and each was a committed buffer of its own: a kernel call to make it (and one to free it) on the title's recording threads and on the submitting thread during heap syncs, 240-820 a frame in the cutscene, and 64 KiB of memory each for ~2 KB of data (~5,000 live). A stack sample of a `drops` run caught the submitting thread in that kernel call inside the heap sync, which holds the heaps' lock, while three title threads waited for that lock to write views. Such copies now take runs of shared 16 MiB buffers (first fit; a run starts at a multiple of the view's element and of 256 bytes, so the view's first element stays exact; a copy larger than a buffer gets one of its size); a run goes back, joined to its free neighbours, when its copy goes. A host copy knows where it starts in its buffer (`offset` adds it; its mapping and host address point at the run), so the views made over it are unchanged. Copies are now keyed by element size too. Test: runs are aligned to their elements, disjoint, and joined again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:58:58 +01:00 -
GPU: diagnostics: copies redone piece by piece are timed; GPU timing keys keep the pipeline
* copystat: time spent in copies that met an unmapped page and were redone by 64 KiB and 4 KiB pieces (10-22 MB of unmapped memory a frame in run perf3, thousands of failing kernel reads, not counted before). * `VICTORY_GPU_TIMING`'s per-pipeline table dropped every word starting with a digit, so pipeline hashes starting with one vanished from its keys; the key is now the command's kind and the pipeline's name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:29:04 +01:00 -
GPU: change trackers keep their "written since taken" flag in one dense bitmap
The flag from
19533398let a submission skip host copies the title had not written, but reading it still touched each copy (copy, tracker, flag: a cache miss or more each) and the heap step cloned its ~9,000 merged ranges first: the heap and page-table steps still took 25-41 and 16-26 ms a frame (run perf3) to find the few written copies among ~14,000. Each tracker now owns a bit in a static bitmap (set and cleared under its lock as before, read without one; given back when the tracker goes). The heap's merged ranges and the page table's copy list keep each copy's bit beside it, and both steps read the bits, walk their lists in place and pass only written copies to the batch. Test: a new tracker starts dirty, a taken one reads clean, a tracker with no bit is never clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarvisandClaude Opus 5.5
2026-11-25 05:29:04 +01:00 -
GPU: a heap sync looks at a page's slots under one lock and makes only the changed ones
Each submission's heap sync (descriptors the title copies into its heaps as bytes) mirrored every slot of every heap page written since the last sync: ~700,000 slots a frame in the intro cutscene (run perf3), two lock takings and a view clone each, 76 ms a frame after the placed-texture fix (113 ms before it, run perf2). `HostHeap::sync_slots` reads a page's records, asks the view registry once whether each names a current view, compares them with what the slots hold under one lock, and calls `mirror` only for slots whose record differs from what the slot holds: the decisions `mirror` makes for the others are to do nothing, so the result is the same. Test: a record copied as bytes and a record cleared are made at the next sync, the others passed by. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:28:45 +01:00 -
GPU: change tracking guards only the runtime's memory, region by region
`watch::track` decided from a range's first page whether the whole range was the runtime's GPU memory. Memory outside title buffers gets a host copy of its 4 MiB-aligned window (`shadow::loose`); a window whose first page was free memory was tracked whole, and taking it guarded (made read-only) every committed page in it, other allocations' too. In the crate's tests a constant view of a heap block did that to the process heap: threads faulted inside RtlFreeHeap/RtlAllocateHeap while holding the heap lock and waited in the guard handler for the guard lock, whose holder (a take in another test's submission) waited for the heap lock. The suite hung about one run in two on a branch that added such a test (stacks of two hung runs; the reading of who held which lock is inferred from them). The decision is now made for every region the range covers: write-watched pool memory, or with views anything but plain committed memory and images, as before for the first page. A 64 KiB page touching any other memory is not tracked: never guarded, and copied whole at each use, as a copy of memory with no tracker always was (such a copy is never clean). One write-watch query still answers the common case (the range in one pool) without `VirtualQuery`, which costs milliseconds in the runtime's big pools; the region walk runs once, when a copy is made. In boot-to-world runs no memory was copied whole (perf2, perf3, mk3: 0.0 MB in every window), so this is about robustness. Tests: a window from free memory over a plain allocation into a pool guards the pool only; a title buffer over a pool and a plain allocation copies the plain part at each use, its bytes and their later change, and leaves it writable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

MarvisandClaude Opus 5.5
2026-11-25 05:28:41 +01:00