Repository navigation
reprend #2085: d3d12: one guarded copy per run of adjacent written geometry tiles (RT-GEOMETRY-READBACK-RUN-MERGE) - #2733
Conversation
…T-GEOMETRY-READBACK-RUN-MERGE) A GeometryViews refresh reads each written 64 KiB tile with its own readability probe and guarded copy, even when the title wrote a run of adjacent tiles across tile boundaries. Group the written tiles (already in address order) into maximal runs whose addresses differ by one tile and read each 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 falls back to the per-tile read, so an uncommitted page still zeroes only what it did before. Same behaviour as DexNom/VIctory's copy_fetch_runs (crates/victory-gpu/src/host.rs, GPL-3.0-or-later, commit 570a941), re-implemented for this header; no identifiers or code copied. Tested: geometry_views_test 14/14, including the new case (two adjacent written tiles are one 128 KiB copy); gta6rt_d3d12_com builds. Synthetic only, no game files or GPU. AI-assisted.
… 1 MiB Each refresh now clears written_ and written_vas_ together at the start, so an exception from a read or a guarded copy cannot leave addresses the next refresh indexes past written_. Adjacent-tile runs are capped at 1 MiB (16 tiles), so a long contiguous write cannot force one large scratch resize.
geometry_views: main's written_vas_-only refresh kept; run_needed() looks each tile up again in tiles_ and skips dead views (no Tile* pointers, as qhukz13 asked). Test: main's tests 5-16 plus the PR's two as 17-18. Co-authored-by: BubsMcgee <203599835+BubsMcgee@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current main after ProjectLeonida#2566. New conflict on top of the earlier carry merge: runtime/test/geometry_views_test.cpp, header list: main added case 17 (the command-list-epoch guard); the PR's two cases, numbered 17-18 in the earlier carry merge, become 18-19 (header and the comments at the cases). Co-authored-by: BubsMcgee <203599835+BubsMcgee@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent check on Windows (not the author), at
Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, NVIDIA RTX 4070 Ti SUPER (driver 621.01). No regressions seen. Based on AI-assisted: yes (opencode). |
|
Verified by MoonEyes (another owner than OreoFR) on head Unit test only: no run of the title (this is the Vulkan path). AI-assisted (Claude Code). |
|
Merging. Head AI-assisted (Claude Code). |
Carries #2085 by @BubsMcgee, because it conflicts with
mainafter #2566 and the reminder to mergemain(#2085 (comment)) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.Item:
RT-GEOMETRY-READBACK-RUN-MERGE-CARRY(claimed in #2570 (comment); original itemRT-GEOMETRY-READBACK-RUN-MERGE).What this branch is
82169e0e0, unchanged (no rebase, author commits kept).main(from the carry preparation of 29/11) that resolves the conflict, then a merge of currentmainf9f3ec4c6, which had a new conflict (below). Both merge commits carryCo-authored-bythe author.What conflicted and how it was resolved
runtime/shims/d3d12_geometry_views.h:main'srefresh()(overwritten_vas_only) kept;run_needed()looks each tile up intiles_and skips dead views (no moreTile*pointers, as qhukz13 asked in the review).f9f3ec4c6:runtime/test/geometry_views_test.cpp, header list:mainadded case 17 (the command-list-epoch guard); the PR's two cases become 18-19 (header and the comments at the cases).d3d12_geometry_views.hmerged without conflict overmain's epoch-guard change; CI's build andgeometry_viewsrun are the check of that.#2569 (RT-LEAK-SWEEP) lists a textual overlap with #2085 in the same two files.
Tests
mainf9f3ec4c6merged), Windows 11, Python 3.12, no GPU used: C++ only: left to this PR's CI (no local C++ build in this run).geometry_viewspasses,ctest501; red (main's header): 2 FAIL (the 128 KiB copy and the 1 MiB cap).python -I scripts/check_no_game_data.pyon every file this PR changes: clean.ctest, the full translator suite).Depends on: none.
Needs an independent verifier before merge (red/green on another machine), as for any carry.
AI-assisted (Claude Code, oreofr-agent).
🤖 Generated with Claude Code