mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #2085] d3d12: one guarded copy per run of adjacent written geometry tiles (RT-GEOMETRY-READBACK-RUN-MERGE) #2093
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2093
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2085
Author: @BubsMcgee
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:geometry-adjacent-runs📝 Commits (2)
1942656d3d12: one guarded copy per run of adjacent written geometry tiles (RT-GEOMETRY-READBACK-RUN-MERGE)82169e0d3d12: clear geometry readback lists at refresh start and cap runs at 1 MiB📊 Changes
2 files changed (+68 additions, -3 deletions)
View changed files
📝
runtime/shims/d3d12_geometry_views.h(+47 -2)📝
runtime/test/geometry_views_test.cpp(+21 -1)📄 Description
A
GeometryViewsrefresh copies only the 64 KiB tiles the title wrote (the page diffing already there), but it reads each written tile with its own readability probe and guarded copy. When the title writes a run of tiles across tile boundaries, that is one probe and one copy per 64 KiB for data that is contiguous in title memory.This groups the written tiles (already in address order) into maximal runs whose addresses differ by one tile, and reads a run a ready view needs as one guarded copy. The per-tile pass then reuses those bytes through
read_tile(). A run that cannot be read whole (an uncommitted page inside it) falls back to the per-tile reads, so the zeroing behaviour is unchanged. Whole-view refreshes (LEONIDA_GEOMETRY_WHOLE_VIEWS=1) read nothing here, as before.Same behaviour as DexNom/VIctory's
copy_fetch_runs(crates/victory-gpu/src/host.rs, GPL-3.0-or-later, commit570a941), re-implemented for this header; no identifiers or code copied.docs/related_projects.mdalready credits the VIctory readback work.Files
runtime/shims/d3d12_geometry_views.h:read_run()/run_needed()and the run grouping inrefresh().runtime/test/geometry_views_test.cpp: case 5, two address-adjacent written tiles of one view are one 128 KiB copy (case 4's non-adjacent tiles stay two 64 KiB copies).Tests
geometry_views_test: 14/14 checks pass (synthetic, fake Vulkan device, no game data or GPU).gta6rt_d3d12_combuilds (MSVC 19.44, Windows 11 26300; RTX 3080 Ti on 616.64 present but not needed by the test).Claimed as
RT-GEOMETRY-READBACK-RUN-MERGEin the coordination issue. Independent of #1678, which touches onlyd3d12_title_buffer_windows.h. No game data. AI-assisted (opencode). Depends on: none.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.