Commit Graph

5 Commits

Author SHA1 Message Date
09f8cb66bf runtime: Round 9 WS2 — read+back cache/coalescing, single-lock title_frames, TitleTextureCells gap-bridging, 8 MiB pool & 3D linear mips
- Separate title_texel_writes from title_map_changes_ (retry t.memory only when pending/filled_from/!fills) and coalesce title_texel_writes::note() up to 16,384 spans before overflow
- Enable cache_success=guard + sync_map() for t.mapped while keeping cache_failure=guard&&!mapped
- Single-lock zero-shared_ptr title_frames::run_end & backed_batch hooks + Stage-2 TextureVqCache
- TitleTextureCells::arm_batch(): range_clean_since() at all 3 sites, kMaxBridgeGap=8 pin-guarded bridging, c->armed_map_gen, batched sync_tile_peers()
- Raise TitleImagePool::largest_slot to 8 MiB (16 MiB page cap), pool non-RT/non-DS deferred textures, best-fit TitleImageUpload::take_slot(), 16 MiB job.tiled retention, linear 3D mips>1, readable/back/arm/cpu_fallback_by[6] telemetry

AI-assisted: Antigravity (Gemini 4 Neon).
2026-11-28 04:42:02 -05:00
fbeb3d9080 runtime: Round 8 WS2 — eliminate false texture re-uploads, zero-syscall arm_batch, parallel mirror hash & 512-job GPU detile batches
- Zero ResourceDesc padding words [1,2,3,13], compare non-format words + compatible formats in title_texture_matches(), preserve layout-equal slot-133 textures & mirror_hash_valid on unmap
- Guard refresh_title_texture() touch() against unreadable pending_stream textures while preserving deferred backing & publish_streamed_texture
- Zero-syscall already-armed Cell::restore[] check + table-page backed skip + PAGE_READONLY region cache in TitleTextureCells::arm_batch(); sync_tile_peers() skip in examine_batch()
- Snapshot geometry_writes serial before refresh_page_mirror() to skip redundant page_mirror_check_batch() dirtying on both CPU and GPU views; parallelize Pass 3 range_sum() >= 8 MiB
- Decouple GPU-mirror batching (512 jobs / 128 MiB) from CPU 64-slot limit, single-call vkAllocateDescriptorSets per sub-batch, kMaxScratchSlots=64, 4-part examine_ns telemetry

AI-assisted: Antigravity (Gemini 4 Neon).
2026-11-28 03:31:06 -05:00
49da651a9b runtime: slot-70 deferral, lazy TitleImageUpload waits, per-fence vis_seq, unlocked run_barriers, and cached arm_batch
Eliminates single-texture slot-70 storms, multi-queue TitleImageUpload lock/submit stalls, gratuitous coalescer invalidations, and Present pump_mutex_ blocks:
- d3d12_vulkan_device.cpp: defers slot-70 make_title_texture()/refresh_title_texture() to batched refresh_title_textures() (with texture_watch.touch); skips re-dirtying hot pages when mirror_just_synced; ports changes_since()-tracked known_protect cache into TitleTextureCells::arm_batch().
- d3d12_title_image_upload.h / vulkan_title_detile.h / vulkan_backend.h / vulkan_indirect_clamp.h: caches PFN_vk* procs, raises kMaxBatchCmds=64 / kMaxScratchSlots=32, waits on oldest_in_flight_scratch_value(), batches vkUpdateDescriptorSets, replaces empty consumer submits with lazy note_title_upload_locked waits in submit_multi(), unlocks submit_mutex_ during upload recording, decouples prepare_indirect_clamp from tracker_mutex_, caches ReplayFunctions, and times tracker_lock waits.
- queue_holds.h / vulkan_backend.h / vulkan_present.h / d3d12_com.cpp: tracks per-(fence,value) vis_seq in QueueHolds (stopping GPU-signal & list-values false invalidations), fixes BeforeExecuteCoalescer cv.wait loop + adds 5-step leader timing, decouples QueueHolds::run_barriers() from pump_mutex_ via barrier_mutex_, and expands VulkanPresenter::frames_ to 4.

AI-assisted: Antigravity (Gemini 4 Neon).
2026-11-28 02:14:47 -05:00
072327cfad runtime: tighten TitleMirror/GeometryViews lifetime guards and PR hygiene
Guard GeometryViews retirement with command_list_epochs, defer TitleMirror
freed-home ticket stamping until flush + note_mirror_bind under submit_mutex_
(including TitleImageUpload submits), fix queue lock ordering and lock-free
wait_submitted, remove dead helpers and process labels, and scrub game shader
identifiers from docs/design.md.

AI-assisted: Antigravity (Gemini 4 Neon).
2026-11-27 21:13:23 -05:00
adbf518879 d3d12: Stage 3a fast CPU texture refresh + Stage 3b GPU detile from TitleMirror 2026-11-27 17:53:43 -05:00