perf(agc): track pending and borrowed texture units in 64-bit words #10886

Merged
meh7an merged 3 commits from upstream-pr/10886 into main 2026-11-01 03:52:47 +00:00
meh7an commented 2026-10-25 07:28:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-10-25T07:28:57Z.


What

StorageTexture::markLayersPending runs on the draw thread for every draw that writes a storage image or color target, and it marks the written units pending. layerPending and borrowedUnits are std::vector<bool>, and every call walks them unit by unit over the written range:

  • the scan for unsaved units;
  • setting each unit pending;
  • the walk over borrowed units.

It does all of this even when every unit of the range is pending already, which is the usual case for a target drawn many times in a frame. On Sonic Origins Plus's Sonic 2 menu page, a sampled profile of the draw committer (APS5_SAMPLE_COMMITTER, 80 s) puts markLayersPending at 6.2 % of its samples, almost all in its own code. The draw committer is about 94 % busy there, and the queue worker waits on it.

This PR:

  • Words instead of bits. It adds UnitFlags, which keeps one bit per unit in 64-bit words and has range queries (AnyIn, AllIn), range fill (SetRange), Any, Count and Bools, plus operator[] and the assign/size/empty/clear the existing code uses. layerPending and borrowedUnits use it.
  • Skip work that changes nothing. markLayersPending:
    • skips the unsaved scan and the fill when every unit in the range is pending already (AllIn);
    • skips the borrowed walk, and the weak_ptr::lock before it, when no unit in the range is borrowed (AnyIn).
  • Word operations elsewhere.
    • anyLayerPending, clearByKeysFill and forgetBorrowed use Any, Count and SetRange instead of std::any_of, std::count, std::none_of and per-unit loops.
    • The write-back hysteresis copies the flags with Bools().

Nothing changes in behaviour:

  • When every unit of the range is pending, the old scan found no unsaved unit (an unsaved unit is one that is not pending) and the fill set nothing new.
  • The borrowed walk only ever acted on borrowed units.

Test. agc_driver_graphics gains unitFlagsTests. It covers ranges across a word boundary, a single unit cleared inside a range, a whole word cleared between full ones, empty ranges, and assign(n, true) leaving no bits past n.

Overlap. tools/pr_overlap.py lists #7514, #9685, #9879, #10026 and #10656. The proposed order is that they go first, and this PR rebases onto each as it merges:

  • #9685, #9879 and #10656 (one stack) add work in markLayersPending for units that become pending. It stays inside the AllIn guard, which only skips a call in which no unit changes state.
  • #10026 reworks the unsaved scan, which only concerns units that are not pending yet, so the same guard holds.
  • #7514 changes the line that declares borrowedUnits.

UnitFlags keeps operator[], so their other uses of the two members compile unchanged.

Of the PRs the check could not compare (they conflict with main), #6202, #6960, #7048 and #7604 also touch markLayersPending or these members. What they add likewise concerns units that are not pending yet, or runs only while no unit is pending (#6960).

Tested

Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K, on main cf528e78c6.

Sonic Origins Plus (PPSA05324), Sonic 2 page of the main menu, main's defaults. Two clean builds: main cf528e78c6 and this PR 9d17136b66. One warm-up boot (both builds share the shader cache version), then two interleaved traced rounds (APS5_TRACE_SECONDS=200:15):

frame p50 (ms) p90 (ms) Graphics.Draw (draw thread, ms/frame) Driver.Packet (worker, ms/frame) title FPS (median of six)
main 81.2 / 80.1 108.5 / 89.4 66.9 / 63.6 85.0 / 80.5 12.58 / 12.99
this PR 79.9 / 77.1 102.6 / 86.8 60.9 / 57.2 81.4 / 77.1 13.36 / 13.70
  • The draw thread's Graphics.Draw drops by 9 % and 10 %, and its draw_and_resource_release by 11 % and 12 % (56.2 / 52.5 -> 49.9 / 46.3 ms).
  • The worker's Driver.Packet drops by 4 %: it waits less on a full draw queue.
  • The title's own FPS reading rises by 6 % in both rounds, and the frame p50 drops by 1.6 % and 3.7 %.

Tests

  • ctest (2288 tests) on main plus this PR: everything passes except agc_host_import_cut_lifetime ("the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch") and agc_driver_depth_plane_partial_store ("repeated lookups of the first layer of an unchanged array proved no refresh"), which fail the same way on plain main cf528e78c6 on this machine.
  • ctest --test-dir build -R "storage|alias|write_back|writeback|texture|image_write|pending|borrow|depth_plane|graphics" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: 85/86 on main and 85/86 on this PR (the same agc_driver_depth_plane_partial_store failure in both). Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.

The summaries of all four rounds follow, then the full digests of round 2. All four traces are attached:

unit-flags-s2-round1.zip
unit-flags-s2-round2.zip

round build summary
1 main cf528e78c6 seconds 200:15 from present 3497: 172 presents, frame p50 81.2 / p90 108.5 / p99 117.9 / max 124.7 ms, GPU busy 67.9 ms per present
1 this PR 9d17136b66 seconds 200:15 from present 3576: 180 presents, frame p50 79.9 / p90 102.6 / p99 110.4 / max 111.4 ms, GPU busy 67.4 ms per present
2 main cf528e78c6 seconds 200:15 from present 3575: 181 presents, frame p50 80.1 / p90 89.4 / p99 111.8 / max 116.3 ms, GPU busy 67.8 ms per present
2 this PR 9d17136b66 seconds 200:15 from present 3669: 189 presents, frame p50 77.1 / p90 86.8 / p99 107.2 / max 108.8 ms, GPU busy 68.6 ms per present

Round 2, main cf528e78c6

seconds 200:15 from present 3575: 181 presents, frame p50 80.1 / p90 89.4 / p99 111.8 / max 116.3 ms, GPU busy 67.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit cf528e78c6, dropped: yes

{"commit":"cf528e78c6c8","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3575,"ms":15003.882},"presents":181,"frame_ms":{"p50":80.083,"p90":89.389,"p99":111.82,"max":116.311},"gpu_busy_ms_per_present":67.786,"worker_busy_pct":{"queue worker 0x0":97.259},"top_phases_ms_per_frame":{"Driver.Packet":80.549,"Graphics.Draw":63.591,"Driver.Packet.draw":61.921,"Driver.Draw":60.832,"Graphics.Draw.draw_and_resource_release":52.55,"Driver.Draw.shader_compile_and_link":39.938,"Shader.DrawStage":29.083,"Driver.Present":27.198},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.037,"events_lost":402407,"totals_full":false},"draw committer":{"events_full_after_s":13.051,"events_lost":39087,"totals_full":false}},"trace":"aps5-trace-cf528e78c6c8-23536.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3695: 116.3 ms at 9962 ms: Graphics.Draw (draw committer) 79.0, batch (gpu) 66.1, Graphics.Draw.draw_and_resource_release (draw committer) 57.1, VideoOut.Flip (presenter) 25.7
  • present 3702: 111.8 ms at 10561 ms: Graphics.Draw (draw committer) 72.0, batch (gpu) 68.3, Graphics.Draw.draw_and_resource_release (draw committer) 55.5, VideoOut.Flip (presenter) 27.8
  • present 3591: 111.6 ms at 1335 ms: Driver.Packet (queue worker 0x0) 73.3, batch (gpu) 72.2, Graphics.Draw (draw committer) 67.0, Driver.Packet.draw (queue worker 0x0) 63.2
  • present 3601: 111.0 ms at 2176 ms: Driver.Packet (queue worker 0x0) 72.3, batch (gpu) 70.7, Graphics.Draw (draw committer) 66.1, Driver.Packet.draw (queue worker 0x0) 61.4
  • present 3651: 110.3 ms at 6367 ms: batch (gpu) 67.9, Graphics.Draw (draw committer) 65.9, Graphics.Draw.draw_and_resource_release (draw committer) 60.3, VideoOut.Flip (presenter) 27.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.7 (1 %) 0.0 (0 %) 82.2 0.6 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveGraphicsAbi 0.3
queue worker 0x0 17.5 (21 %) 0.0 (0 %) 65.4 76.5 Driver.Packet 17.5, Driver.EndSubmission 0.0
draw committer 33.3 (40 %) 0.4 (1 %) 49.1 51.9 Graphics.Draw 31.8, Recorder.Submit 1.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
presenter 0.6 (1 %) 26.7 (32 %) 55.6 0.0 VideoOut.Flip 27.1, Driver.Present 0.2
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 67.7 (82 %) 0.0 (0 %) 15.2 0.0 batch 67.7

Largest slices (ms per frame, inclusive, all threads): batch 67.7, Graphics.Draw 31.8, Driver.Present 27.2, VideoOut.Flip 27.1, VideoOut.Flip.present 27.0, Driver.Present.render_fence_wait 26.7, Vulkan.Retire 26.7, Vulkan.Retire.wait 26.6, Graphics.Draw.draw_and_resource_release 26.4, Driver.Packet 17.5

Longest waits

  • Driver.Present.render_fence_wait (presenter) 32.8 ms at 1 ms, present 3575
  • Driver.Present.render_fence_wait (presenter) 30.7 ms at 1336 ms, present 3591
  • Driver.Present.render_fence_wait (presenter) 30.5 ms at 1170 ms, present 3589
  • Driver.Present.render_fence_wait (presenter) 30.1 ms at 2773 ms, present 3608
  • Driver.Present.render_fence_wait (presenter) 30.1 ms at 1062 ms, present 3588
  • Driver.Present.render_fence_wait (presenter) 30.0 ms at 2696 ms, present 3607
  • Driver.Present.render_fence_wait (presenter) 29.8 ms at 2615 ms, present 3606
  • Driver.Present.render_fence_wait (presenter) 29.7 ms at 14731 ms, present 3753
  • Driver.Present.render_fence_wait (presenter) 29.6 ms at 7195 ms, present 3661
  • Driver.Present.render_fence_wait (presenter) 29.5 ms at 2451 ms, present 3604

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 342: 13.6 ms at 396 ms, present 3579: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.5, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Resources.Prepare (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.1
  • batch 12435: 13.3 ms at 14485 ms, present 3749: GPU no ranges; recorded by no CPU slices
  • batch 3338: 13.3 ms at 3953 ms, present 3621: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.2, Driver.Packet.dispatch (queue worker 0x0) 0.5, Driver.Dispatch (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4
  • batch 6472: 13.2 ms at 7592 ms, present 3665: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 1.0, Resources.Prepare (draw committer) 0.1, Resources.Complete (draw committer) 0.1
  • batch 3909: 13.2 ms at 4622 ms, present 3629: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.2, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Vulkan.Dispatch (queue worker 0x0) 0.4

Round 2, this PR 9d17136b66

seconds 200:15 from present 3669: 189 presents, frame p50 77.1 / p90 86.8 / p99 107.2 / max 108.8 ms, GPU busy 68.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 9d17136b6624, dropped: yes

{"commit":"9d17136b6624","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3669,"ms":15007.707},"presents":189,"frame_ms":{"p50":77.083,"p90":86.817,"p99":107.168,"max":108.789},"gpu_busy_ms_per_present":68.649,"worker_busy_pct":{"queue worker 0x0":97.198},"top_phases_ms_per_frame":{"Driver.Packet":77.132,"Driver.Packet.draw":59.593,"Driver.Draw":58.493,"Graphics.Draw":57.207,"Graphics.Draw.draw_and_resource_release":46.295,"Driver.Draw.shader_compile_and_link":39.753,"Shader.DrawStage":29.555,"VideoOut.Flip":28.314},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.836,"events_lost":406333,"totals_full":false},"draw committer":{"events_full_after_s":12.572,"events_lost":50211,"totals_full":false}},"trace":"aps5-trace-9d17136b6624-13272.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3720: 108.8 ms at 4005 ms: batch (gpu) 69.3, Driver.Packet (queue worker 0x0) 67.8, Graphics.Draw (draw committer) 59.1, Driver.Packet.draw (queue worker 0x0) 58.9
  • present 3810: 107.2 ms at 11179 ms: batch (gpu) 71.0, Graphics.Draw (draw committer) 60.9, Graphics.Draw.draw_and_resource_release (draw committer) 56.0, VideoOut.Flip (presenter) 31.1
  • present 3670: 105.3 ms at 76 ms: batch (gpu) 68.4, Driver.Packet (queue worker 0x0) 64.3, Graphics.Draw (draw committer) 56.8, Driver.Packet.draw (queue worker 0x0) 55.4
  • present 3730: 104.8 ms at 4799 ms: Driver.Packet (queue worker 0x0) 70.2, batch (gpu) 66.0, Driver.Packet.draw (queue worker 0x0) 61.1, Driver.Draw (queue worker 0x0) 60.3
  • present 3766: 104.6 ms at 7663 ms: batch (gpu) 69.0, Graphics.Draw (draw committer) 57.6, Graphics.Draw.draw_and_resource_release (draw committer) 52.8, VideoOut.Flip (presenter) 28.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.7 (1 %) 0.0 (0 %) 78.7 0.6 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveGraphicsAbi 0.3
queue worker 0x0 15.2 (19 %) 0.0 (0 %) 64.2 75.9 Driver.Packet 15.2, Driver.Completion 0.0
draw committer 27.2 (34 %) 0.4 (1 %) 51.8 48.8 Graphics.Draw 25.7, Recorder.Submit 1.0
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.7 (1 %) 27.8 (35 %) 50.9 0.0 VideoOut.Flip 28.3, Driver.Present 0.2
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 79.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 68.6 (86 %) 0.0 (0 %) 10.8 0.0 batch 68.6

Largest slices (ms per frame, inclusive, all threads): batch 68.6, VideoOut.Flip 28.3, Driver.Present 28.3, VideoOut.Flip.present 28.1, Driver.Present.render_fence_wait 27.7, Vulkan.Retire 27.7, Vulkan.Retire.wait 27.7, Graphics.Draw 25.7, Graphics.Draw.draw_and_resource_release 20.6, Driver.Packet 15.2

Longest waits

  • Driver.Present.render_fence_wait (presenter) 32.8 ms at 8798 ms, present 3780
  • Driver.Present.render_fence_wait (presenter) 31.4 ms at 11104 ms, present 3809
  • Driver.Present.render_fence_wait (presenter) 31.3 ms at 1 ms, present 3669
  • Driver.Present.render_fence_wait (presenter) 31.0 ms at 8645 ms, present 3778
  • Driver.Present.render_fence_wait (presenter) 31.0 ms at 13626 ms, present 3841
  • Driver.Present.render_fence_wait (presenter) 30.9 ms at 8719 ms, present 3779
  • Driver.Present.render_fence_wait (presenter) 30.8 ms at 13702 ms, present 3842
  • Driver.Present.render_fence_wait (presenter) 30.8 ms at 10950 ms, present 3807
  • Driver.Present.render_fence_wait (presenter) 30.8 ms at 12369 ms, present 3825
  • Driver.Present.render_fence_wait (presenter) 30.6 ms at 13779 ms, present 3843

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 12334: 13.6 ms at 13777 ms, present 3842: GPU no ranges; recorded by no CPU slices
  • batch 1267: 13.5 ms at 1425 ms, present 3686: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.9, Driver.Packet.dispatch (queue worker 0x0) 0.5, Driver.Dispatch (queue worker 0x0) 0.5, Vulkan.Dispatch (queue worker 0x0) 0.3
  • batch 10632: 13.4 ms at 11904 ms, present 3818: GPU no ranges; recorded by no CPU slices
  • batch 12620: 13.3 ms at 14103 ms, present 3846: GPU no ranges; recorded by no CPU slices
  • batch 11057: 13.3 ms at 12368 ms, present 3824: GPU no ranges; recorded by no CPU slices

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #7514, #9685, #9879, #10026, #10656 (proposed order, see Overlap)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 Pro 10.0.26300
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5002755941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10886). Originally posted by [meh7an](https://github.com/meh7an) on 2026-10-25T07:28:57Z. --- ### What `StorageTexture::markLayersPending` runs on the draw thread for every draw that writes a storage image or color target, and it marks the written units pending. `layerPending` and `borrowedUnits` are `std::vector<bool>`, and every call walks them unit by unit over the written range: - the scan for unsaved units; - setting each unit pending; - the walk over borrowed units. It does all of this even when every unit of the range is pending already, which is the usual case for a target drawn many times in a frame. On Sonic Origins Plus's Sonic 2 menu page, a sampled profile of the draw committer (`APS5_SAMPLE_COMMITTER`, 80 s) puts `markLayersPending` at 6.2 % of its samples, almost all in its own code. The draw committer is about 94 % busy there, and the queue worker waits on it. This PR: - **Words instead of bits.** It adds `UnitFlags`, which keeps one bit per unit in 64-bit words and has range queries (`AnyIn`, `AllIn`), range fill (`SetRange`), `Any`, `Count` and `Bools`, plus `operator[]` and the `assign`/`size`/`empty`/`clear` the existing code uses. `layerPending` and `borrowedUnits` use it. - **Skip work that changes nothing.** `markLayersPending`: - skips the unsaved scan and the fill when every unit in the range is pending already (`AllIn`); - skips the borrowed walk, and the `weak_ptr::lock` before it, when no unit in the range is borrowed (`AnyIn`). - **Word operations elsewhere.** - `anyLayerPending`, `clearByKeysFill` and `forgetBorrowed` use `Any`, `Count` and `SetRange` instead of `std::any_of`, `std::count`, `std::none_of` and per-unit loops. - The write-back hysteresis copies the flags with `Bools()`. Nothing changes in behaviour: - When every unit of the range is pending, the old scan found no unsaved unit (an unsaved unit is one that is not pending) and the fill set nothing new. - The borrowed walk only ever acted on borrowed units. **Test.** `agc_driver_graphics` gains `unitFlagsTests`. It covers ranges across a word boundary, a single unit cleared inside a range, a whole word cleared between full ones, empty ranges, and `assign(n, true)` leaving no bits past `n`. **Overlap.** `tools/pr_overlap.py` lists #7514, #9685, #9879, #10026 and #10656. The proposed order is that they go first, and this PR rebases onto each as it merges: - #9685, #9879 and #10656 (one stack) add work in `markLayersPending` for units that become pending. It stays inside the `AllIn` guard, which only skips a call in which no unit changes state. - #10026 reworks the unsaved scan, which only concerns units that are not pending yet, so the same guard holds. - #7514 changes the line that declares `borrowedUnits`. `UnitFlags` keeps `operator[]`, so their other uses of the two members compile unchanged. Of the PRs the check could not compare (they conflict with `main`), #6202, #6960, #7048 and #7604 also touch `markLayersPending` or these members. What they add likewise concerns units that are not pending yet, or runs only while no unit is pending (#6960). ### Tested Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K, on `main` cf528e78c6. Sonic Origins Plus (PPSA05324), Sonic 2 page of the main menu, `main`'s defaults. Two clean builds: `main` cf528e78c6 and this PR 9d17136b66. One warm-up boot (both builds share the shader cache version), then two interleaved traced rounds (`APS5_TRACE_SECONDS=200:15`): | | frame p50 (ms) | p90 (ms) | `Graphics.Draw` (draw thread, ms/frame) | `Driver.Packet` (worker, ms/frame) | title FPS (median of six) | |---|---|---|---|---|---| | `main` | 81.2 / 80.1 | 108.5 / 89.4 | 66.9 / 63.6 | 85.0 / 80.5 | 12.58 / 12.99 | | this PR | 79.9 / 77.1 | 102.6 / 86.8 | 60.9 / 57.2 | 81.4 / 77.1 | 13.36 / 13.70 | - The draw thread's `Graphics.Draw` drops by 9 % and 10 %, and its `draw_and_resource_release` by 11 % and 12 % (56.2 / 52.5 -> 49.9 / 46.3 ms). - The worker's `Driver.Packet` drops by 4 %: it waits less on a full draw queue. - The title's own FPS reading rises by 6 % in both rounds, and the frame p50 drops by 1.6 % and 3.7 %. **Tests** - `ctest` (2288 tests) on `main` plus this PR: everything passes except `agc_host_import_cut_lifetime` ("the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch") and `agc_driver_depth_plane_partial_store` ("repeated lookups of the first layer of an unchanged array proved no refresh"), which fail the same way on plain `main` cf528e78c6 on this machine. - `ctest --test-dir build -R "storage|alias|write_back|writeback|texture|image_write|pending|borrow|depth_plane|graphics" -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: 85/86 on `main` and 85/86 on this PR (the same `agc_driver_depth_plane_partial_store` failure in both). Neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. The summaries of all four rounds follow, then the full digests of round 2. All four traces are attached: [unit-flags-s2-round1.zip](https://github.com/user-attachments/files/33920918/unit-flags-s2-round1.zip) [unit-flags-s2-round2.zip](https://github.com/user-attachments/files/33920925/unit-flags-s2-round2.zip) | round | build | summary | |---|---|---| | 1 | `main` cf528e78c6 | **seconds 200:15** from present 3497: 172 presents, frame p50 81.2 / p90 108.5 / p99 117.9 / max 124.7 ms, GPU busy 67.9 ms per present | | 1 | this PR 9d17136b66 | **seconds 200:15** from present 3576: 180 presents, frame p50 79.9 / p90 102.6 / p99 110.4 / max 111.4 ms, GPU busy 67.4 ms per present | | 2 | `main` cf528e78c6 | **seconds 200:15** from present 3575: 181 presents, frame p50 80.1 / p90 89.4 / p99 111.8 / max 116.3 ms, GPU busy 67.8 ms per present | | 2 | this PR 9d17136b66 | **seconds 200:15** from present 3669: 189 presents, frame p50 77.1 / p90 86.8 / p99 107.2 / max 108.8 ms, GPU busy 68.6 ms per present | **Round 2, `main` cf528e78c6** **seconds 200:15** from present 3575: 181 presents, frame p50 80.1 / p90 89.4 / p99 111.8 / max 116.3 ms, GPU busy 67.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit cf528e78c6c8, dropped: yes ```json {"commit":"cf528e78c6c8","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3575,"ms":15003.882},"presents":181,"frame_ms":{"p50":80.083,"p90":89.389,"p99":111.82,"max":116.311},"gpu_busy_ms_per_present":67.786,"worker_busy_pct":{"queue worker 0x0":97.259},"top_phases_ms_per_frame":{"Driver.Packet":80.549,"Graphics.Draw":63.591,"Driver.Packet.draw":61.921,"Driver.Draw":60.832,"Graphics.Draw.draw_and_resource_release":52.55,"Driver.Draw.shader_compile_and_link":39.938,"Shader.DrawStage":29.083,"Driver.Present":27.198},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.037,"events_lost":402407,"totals_full":false},"draw committer":{"events_full_after_s":13.051,"events_lost":39087,"totals_full":false}},"trace":"aps5-trace-cf528e78c6c8-23536.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3695: 116.3 ms at 9962 ms: Graphics.Draw (draw committer) 79.0, batch (gpu) 66.1, Graphics.Draw.draw_and_resource_release (draw committer) 57.1, VideoOut.Flip (presenter) 25.7 - present 3702: 111.8 ms at 10561 ms: Graphics.Draw (draw committer) 72.0, batch (gpu) 68.3, Graphics.Draw.draw_and_resource_release (draw committer) 55.5, VideoOut.Flip (presenter) 27.8 - present 3591: 111.6 ms at 1335 ms: Driver.Packet (queue worker 0x0) 73.3, batch (gpu) 72.2, Graphics.Draw (draw committer) 67.0, Driver.Packet.draw (queue worker 0x0) 63.2 - present 3601: 111.0 ms at 2176 ms: Driver.Packet (queue worker 0x0) 72.3, batch (gpu) 70.7, Graphics.Draw (draw committer) 66.1, Driver.Packet.draw (queue worker 0x0) 61.4 - present 3651: 110.3 ms at 6367 ms: batch (gpu) 67.9, Graphics.Draw (draw committer) 65.9, Graphics.Draw.draw_and_resource_release (draw committer) 60.3, VideoOut.Flip (presenter) 27.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.7 (1 %) | 0.0 (0 %) | 82.2 | 0.6 | Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveGraphicsAbi 0.3 | | queue worker 0x0 | 17.5 (21 %) | 0.0 (0 %) | 65.4 | 76.5 | Driver.Packet 17.5, Driver.EndSubmission 0.0 | | draw committer | 33.3 (40 %) | 0.4 (1 %) | 49.1 | 51.9 | Graphics.Draw 31.8, Recorder.Submit 1.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1 | | presenter | 0.6 (1 %) | 26.7 (32 %) | 55.6 | 0.0 | VideoOut.Flip 27.1, Driver.Present 0.2 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.7 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | gpu | 67.7 (82 %) | 0.0 (0 %) | 15.2 | 0.0 | batch 67.7 | **Largest slices** (ms per frame, inclusive, all threads): batch 67.7, Graphics.Draw 31.8, Driver.Present 27.2, VideoOut.Flip 27.1, VideoOut.Flip.present 27.0, Driver.Present.render_fence_wait 26.7, Vulkan.Retire 26.7, Vulkan.Retire.wait 26.6, Graphics.Draw.draw_and_resource_release 26.4, Driver.Packet 17.5 **Longest waits** - Driver.Present.render_fence_wait (presenter) 32.8 ms at 1 ms, present 3575 - Driver.Present.render_fence_wait (presenter) 30.7 ms at 1336 ms, present 3591 - Driver.Present.render_fence_wait (presenter) 30.5 ms at 1170 ms, present 3589 - Driver.Present.render_fence_wait (presenter) 30.1 ms at 2773 ms, present 3608 - Driver.Present.render_fence_wait (presenter) 30.1 ms at 1062 ms, present 3588 - Driver.Present.render_fence_wait (presenter) 30.0 ms at 2696 ms, present 3607 - Driver.Present.render_fence_wait (presenter) 29.8 ms at 2615 ms, present 3606 - Driver.Present.render_fence_wait (presenter) 29.7 ms at 14731 ms, present 3753 - Driver.Present.render_fence_wait (presenter) 29.6 ms at 7195 ms, present 3661 - Driver.Present.render_fence_wait (presenter) 29.5 ms at 2451 ms, present 3604 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 342: 13.6 ms at 396 ms, present 3579: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.5, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Resources.Prepare (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.1 - batch 12435: 13.3 ms at 14485 ms, present 3749: GPU no ranges; recorded by no CPU slices - batch 3338: 13.3 ms at 3953 ms, present 3621: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.2, Driver.Packet.dispatch (queue worker 0x0) 0.5, Driver.Dispatch (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4 - batch 6472: 13.2 ms at 7592 ms, present 3665: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 1.0, Resources.Prepare (draw committer) 0.1, Resources.Complete (draw committer) 0.1 - batch 3909: 13.2 ms at 4622 ms, present 3629: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.2, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Vulkan.Dispatch (queue worker 0x0) 0.4 **Round 2, this PR 9d17136b66** **seconds 200:15** from present 3669: 189 presents, frame p50 77.1 / p90 86.8 / p99 107.2 / max 108.8 ms, GPU busy 68.6 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 9d17136b6624, dropped: yes ```json {"commit":"9d17136b6624","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3669,"ms":15007.707},"presents":189,"frame_ms":{"p50":77.083,"p90":86.817,"p99":107.168,"max":108.789},"gpu_busy_ms_per_present":68.649,"worker_busy_pct":{"queue worker 0x0":97.198},"top_phases_ms_per_frame":{"Driver.Packet":77.132,"Driver.Packet.draw":59.593,"Driver.Draw":58.493,"Graphics.Draw":57.207,"Graphics.Draw.draw_and_resource_release":46.295,"Driver.Draw.shader_compile_and_link":39.753,"Shader.DrawStage":29.555,"VideoOut.Flip":28.314},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.836,"events_lost":406333,"totals_full":false},"draw committer":{"events_full_after_s":12.572,"events_lost":50211,"totals_full":false}},"trace":"aps5-trace-9d17136b6624-13272.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3720: 108.8 ms at 4005 ms: batch (gpu) 69.3, Driver.Packet (queue worker 0x0) 67.8, Graphics.Draw (draw committer) 59.1, Driver.Packet.draw (queue worker 0x0) 58.9 - present 3810: 107.2 ms at 11179 ms: batch (gpu) 71.0, Graphics.Draw (draw committer) 60.9, Graphics.Draw.draw_and_resource_release (draw committer) 56.0, VideoOut.Flip (presenter) 31.1 - present 3670: 105.3 ms at 76 ms: batch (gpu) 68.4, Driver.Packet (queue worker 0x0) 64.3, Graphics.Draw (draw committer) 56.8, Driver.Packet.draw (queue worker 0x0) 55.4 - present 3730: 104.8 ms at 4799 ms: Driver.Packet (queue worker 0x0) 70.2, batch (gpu) 66.0, Driver.Packet.draw (queue worker 0x0) 61.1, Driver.Draw (queue worker 0x0) 60.3 - present 3766: 104.6 ms at 7663 ms: batch (gpu) 69.0, Graphics.Draw (draw committer) 57.6, Graphics.Draw.draw_and_resource_release (draw committer) 52.8, VideoOut.Flip (presenter) 28.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.7 (1 %) | 0.0 (0 %) | 78.7 | 0.6 | Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveGraphicsAbi 0.3 | | queue worker 0x0 | 15.2 (19 %) | 0.0 (0 %) | 64.2 | 75.9 | Driver.Packet 15.2, Driver.Completion 0.0 | | draw committer | 27.2 (34 %) | 0.4 (1 %) | 51.8 | 48.8 | Graphics.Draw 25.7, Recorder.Submit 1.0 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | presenter | 0.7 (1 %) | 27.8 (35 %) | 50.9 | 0.0 | VideoOut.Flip 28.3, Driver.Present 0.2 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 79.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | gpu | 68.6 (86 %) | 0.0 (0 %) | 10.8 | 0.0 | batch 68.6 | **Largest slices** (ms per frame, inclusive, all threads): batch 68.6, VideoOut.Flip 28.3, Driver.Present 28.3, VideoOut.Flip.present 28.1, Driver.Present.render_fence_wait 27.7, Vulkan.Retire 27.7, Vulkan.Retire.wait 27.7, Graphics.Draw 25.7, Graphics.Draw.draw_and_resource_release 20.6, Driver.Packet 15.2 **Longest waits** - Driver.Present.render_fence_wait (presenter) 32.8 ms at 8798 ms, present 3780 - Driver.Present.render_fence_wait (presenter) 31.4 ms at 11104 ms, present 3809 - Driver.Present.render_fence_wait (presenter) 31.3 ms at 1 ms, present 3669 - Driver.Present.render_fence_wait (presenter) 31.0 ms at 8645 ms, present 3778 - Driver.Present.render_fence_wait (presenter) 31.0 ms at 13626 ms, present 3841 - Driver.Present.render_fence_wait (presenter) 30.9 ms at 8719 ms, present 3779 - Driver.Present.render_fence_wait (presenter) 30.8 ms at 13702 ms, present 3842 - Driver.Present.render_fence_wait (presenter) 30.8 ms at 10950 ms, present 3807 - Driver.Present.render_fence_wait (presenter) 30.8 ms at 12369 ms, present 3825 - Driver.Present.render_fence_wait (presenter) 30.6 ms at 13779 ms, present 3843 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 12334: 13.6 ms at 13777 ms, present 3842: GPU no ranges; recorded by no CPU slices - batch 1267: 13.5 ms at 1425 ms, present 3686: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.9, Driver.Packet.dispatch (queue worker 0x0) 0.5, Driver.Dispatch (queue worker 0x0) 0.5, Vulkan.Dispatch (queue worker 0x0) 0.3 - batch 10632: 13.4 ms at 11904 ms, present 3818: GPU no ranges; recorded by no CPU slices - batch 12620: 13.3 ms at 14103 ms, present 3846: GPU no ranges; recorded by no CPU slices - batch 11057: 13.3 ms at 12368 ms, present 3824: GPU no ranges; recorded by no CPU slices ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #7514, #9685, #9879, #10026, #10656 (proposed order, see Overlap) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 Pro 10.0.26300 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 08:23:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T08:23:41Z.

Review: APPROVED


The bitset helper’s range masks handle word boundaries and preserve the logical size; the markLayersPending fast path skips only an already-pending range, while borrowed-unit handling remains independently range-scoped. The new unit tests cover boundaries, empty ranges, and tail bits. The author reports broad current-main/PR comparison and GPU validation runs; hosted product jobs are skipped by repository policy, and I could not independently run the AGC suite in this environment. No blocking defect found in the diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642240191 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10886#pullrequestreview-5642240191). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T08:23:41Z. **Review:** APPROVED --- The bitset helper’s range masks handle word boundaries and preserve the logical size; the `markLayersPending` fast path skips only an already-pending range, while borrowed-unit handling remains independently range-scoped. The new unit tests cover boundaries, empty ranges, and tail bits. The author reports broad current-main/PR comparison and GPU validation runs; hosted product jobs are skipped by repository policy, and I could not independently run the AGC suite in this environment. No blocking defect found in the diff.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10886
No description provided.