Skip to content

perf(shader): don't wait on GPU-pending branch words that only select read-only buffers - #7891

Open
eljackjoestar-cmd wants to merge 1 commit into
boykopovar:mainfrom
eljackjoestar-cmd:perf/srt-pending-read-only-conditions
Open

eljackjoestar-cmd wants to merge 1 commit into
boykopovar:mainfrom
eljackjoestar-cmd:perf/srt-pending-read-only-conditions

Conversation

@eljackjoestar-cmd

@eljackjoestar-cmd eljackjoestar-cmd commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

A resource capture walks the control flow of a shader's resource plan and evaluates each branch condition with reads that wait for pending GPU writes (SrtRuntime::pendingWrite). When a condition reads a word that a queued dispatch still writes, the capture waits for the GPU, although the branch only selects which descriptors are bound.

  • A condition whose successors reach the same resource blocks (ConditionSelectsResources) is no longer evaluated; the walk takes both successors, which bind the same resources.
  • A condition read that would wait for a GPU write is refused and both successors are bound when the blocks reached from some but not all successors hold no images and no written or atomic buffers, and the plan has no BDA writes (ConditionGuardsImagesOrWrites). An extra read-only buffer binding does not change what the shader reads.
  • Every other condition still waits. A walk that fails without waiting is redone with waiting, after rolling back the read trace and user-data use it recorded (EvaluateRuntimeSourcesImpl).

SrtTape and the generic evaluator apply the same rule. A first version took both sides of every condition over a pending word. On PPSA28099 it made the water flicker with red, green and white flares (bursts in a run with a frame dump every third flip). A version that kept the condition exact only when the guarded blocks write showed no flare frame in a run with the same dumps. This version is stricter: it also keeps the condition exact for every image.

New checks in verifyGuardedDescriptorSources (agc_shader_memory):

  • an image behind a branch on a GPU-pending word is not bound before the word is read;
  • the T# behind the taken branch is still read;
  • a read-only V# behind a branch on a GPU-pending word is bound without waiting;
  • without the pending probe, the V# behind a skipped branch is not read.

Tested

Windows 11 Pro 26300, Ryzen 7 7800X3D, NVIDIA GeForce RTX 5070 (driver 617.14), WinLibs GCC 15.2 UCRT, Release.

Focused tests. Run on main 6762694 and on this branch, same machine, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R <pattern> -V.

  • 63/63 pass on both.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.
  • Both logs hold the same two validation errors, from agc_driver_indirect_arguments_pending_producer: VUID-vkCmdWaitEvents-srcStageMask-01158 and VUID-vkSetEvent-event-09543. This change adds none.
The 63 focused tests (same set on main and the change)

agc_command_batch_fence_failure, agc_compute_descriptor_layout_flags, agc_copy_input_kept_bytes, agc_dcc_key_sharing, agc_depth_copy_kept_bytes, agc_descriptor_cache, agc_descriptor_pool_reset_failure, agc_display_buffer_dcc, agc_driver_address_space_teardown, agc_driver_alpha_to_coverage_state, agc_driver_buffer_descriptor_runtime, agc_driver_covered_centroid_state, agc_driver_dcc_key_presync, agc_driver_dcc_keys_first_write, agc_driver_fill_cover_keys, agc_driver_gpu_indirect_arguments_misaligned_writer_ahead, agc_driver_gpu_indirect_arguments_written_ahead, agc_driver_graphics, agc_driver_guarded_null_pointer, agc_driver_indirect_arguments_pending_producer, agc_driver_indirect_arguments_written_ahead, agc_driver_indirect_patched_stage, agc_driver_memory_value_fill, agc_driver_mesh, agc_driver_mesh_draw_relocation, agc_driver_mesh_index_cache, agc_driver_mesh_provoking_layer, agc_driver_mesh_provoking_vertex, agc_driver_msaa_dcc_state, agc_driver_rect_list_indirect, agc_driver_sample_location_grid_fallback, agc_driver_sparse_indirect_indices, agc_driver_sparse_indirect_indices_unreadable, agc_driver_staged_clear_sampled_read, agc_driver_undithered_alpha_to_coverage_state, agc_driver_unused_viewport_depth, agc_heap_mirror_run_unwatch, agc_heap_mirror_run_unwatch_no_space_cache, agc_heap_mirror_unwatch, agc_heap_mirror_unwatch_no_space_cache, agc_pipeline_journal, agc_pipeline_library_clear_waits_for_build, agc_pipeline_store_lazy_buffer_pool, agc_shader_bindless, agc_shader_entry_lane_proof_budget, agc_shader_frontend_pair, agc_shader_frontend_pair_off, agc_shader_layout_pair, agc_shader_layout_pair_off, agc_shader_memory, agc_shader_quad_mask_no_demote, agc_shader_selected_records_direct_image_limit, agc_shader_selected_records_direct_pair_limit, agc_shader_selected_records_image_limit, agc_shader_selected_records_pair_limit, agc_shader_srt_read_patching, agc_shader_table_snapshot_reuse, agc_shader_type_zero_image_materialization, agc_sparse_buffer_holes, agc_sparse_heap_mirror_unwatch, agc_sparse_heap_mirror_unwatch_no_space_cache, agc_write_tracking, agc_write_watch_coverage

Performance. PPSA28099 start screen ("Press any button to continue"), 3840x2160.

main cannot run this title: at 6762694 it stops at boot with indirect register sentinel semantics are not implemented (Execution/src/Pm4.cpp:47). The captures below use the base the title runs on: main a62c724 with #6094 and #6160 (both merged since), #6146, #6366 and #7644, commit b3d5d03d6.

  • The changes were built as uncommitted trees on that commit, so every summary line names b3d5d03d6d13. The base lines have "dirty":false and the change lines "dirty":true.
  • Each run lasts 180 s from launch with APS5_TRACE_SUMMARY_EVERY=10, APS5_LAZY_SHADER_PREPARE=1 and APS5_NO_PAD_INPUT=1, a warm shader cache, and no other APS5_TRACE_* or APS5_PROFILE_* switch. Only interval summary lines were written; there is no trace file to attach.
  • FPS is presents over 90-155 s (the steady part of the screen). Frame p50 is the median of the intervals' p50.
Run Build FPS Frame p50 GPU busy / present
ctl-1 base 2.76 325.9 ms 259.2 ms
ctl-2 base 2.78 323.5 ms 254.9 ms
srt-1 base + first version of this change (both sides of every pending condition) 2.89 328.4 ms 248.6 ms
srt-2 same 2.80 321.8 ms 258.3 ms
strict-1 base + this change + the mesh indirect PR + the DCC extent PR 2.98 314.4 ms 250.5 ms

This version was not captured on its own: strict-1 also holds the non-indexed mesh indirect change and the DCC key extent fix (separate PRs). Its build chose this rule through a temporary switch, APS5_DEBUG_STRICT_UNION=1 in its lines, which is not part of this PR. The first version gained 2.7 % on average over the base; strict-1 gained 7.6 %.

tools/trace_digest.py, base (ctl-2)

17 intervals, 0.0 to 179.1 s, 416 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-13 24 54.0 253.2 6962.3 6962.3 39.0 67 % Driver.Packet 597.0
2 13-24 10 1186.0 1798.9 1798.9 1798.9 414.9 100 % Driver.Packet 2061.6
3 24-35 16 584.8 1249.6 1328.4 1328.4 346.8 100 % Driver.Packet 1277.5
4 35-46 21 455.1 740.0 1097.1 1097.1 316.3 100 % Driver.Packet 933.8
5 46-56 17 516.7 698.7 1317.8 1317.8 397.0 100 % Driver.Packet 1064.1
6 56-66 18 555.0 738.1 1004.2 1004.2 389.3 100 % Driver.Packet 1057.2
7 66-77 20 478.6 665.1 735.3 735.3 354.6 100 % Driver.Packet 934.5
8 77-87 24 415.8 551.4 918.5 918.5 310.3 100 % Driver.Packet 762.0
9 87-97 30 327.0 405.7 442.4 442.4 243.8 99 % Driver.Packet 601.8
10 97-107 31 323.5 378.1 394.0 394.0 239.9 99 % Driver.Packet 593.0
11 107-118 30 332.7 396.1 410.6 410.6 249.6 99 % Driver.Packet 612.1
12 118-128 31 320.4 378.1 406.7 406.7 233.7 99 % Driver.Packet 594.8
13 128-138 22 322.1 714.8 2029.6 2029.6 239.7 100 % Driver.Packet 854.9
14 138-149 29 324.3 403.0 953.0 953.0 311.5 99 % Driver.Packet 630.4
15 149-159 32 321.5 329.3 338.9 338.9 246.7 99 % Driver.Packet 572.8
16 159-169 30 327.7 382.7 419.4 419.4 233.3 99 % Driver.Packet 594.8
17 169-179 31 325.7 331.5 377.5 377.5 240.0 99 % Driver.Packet 581.3
p99 ms  @::_:_______-_._.  0-6962.3
gpu ms  _@%#@%%#+++++#+++  0-414.9
tools/trace_digest.py, first version (srt-2)

17 intervals, 0.0 to 175.9 s, 408 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13 (dirty)

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-13 24 50.7 240.7 6969.3 6969.3 35.6 68 % Driver.Packet 588.7
2 13-23 10 1168.8 1737.0 1737.0 1737.0 407.3 100 % Driver.Packet 2008.8
3 23-33 15 477.6 1215.2 1325.9 1325.9 310.1 100 % Driver.Packet 1239.0
4 33-43 19 454.1 740.0 1049.6 1049.6 355.2 100 % Driver.Packet 955.8
5 43-53 18 522.4 678.1 1100.6 1100.6 363.6 100 % Driver.Packet 1007.6
6 53-63 15 579.8 946.6 1612.9 1612.9 428.0 100 % Driver.Packet 1225.7
7 63-74 19 561.5 654.6 704.0 704.0 358.8 100 % Driver.Packet 964.1
8 74-84 23 443.7 546.4 565.9 565.9 288.5 100 % Driver.Packet 780.1
9 84-94 28 328.7 388.0 909.5 909.5 279.4 99 % Driver.Packet 655.5
10 94-104 31 318.9 359.6 439.6 439.6 239.4 99 % Driver.Packet 586.3
11 104-114 30 327.7 388.0 409.4 409.4 239.8 99 % Driver.Packet 601.9
12 114-125 31 321.8 355.5 395.1 395.1 248.6 99 % Driver.Packet 587.7
13 125-135 29 318.4 384.0 1329.9 1329.9 230.5 99 % Driver.Packet 648.5
14 135-145 22 324.3 724.3 2012.6 2012.6 333.4 100 % Driver.Packet 820.9
15 145-155 32 321.6 329.0 332.3 332.3 239.0 99 % Driver.Packet 569.6
16 155-166 31 324.1 359.4 380.3 380.3 240.7 99 % Driver.Packet 582.5
17 166-176 31 325.5 354.3 387.9 387.9 239.4 99 % Driver.Packet 585.4
p99 ms  @::__:______:-.._  0-6969.3
gpu ms  _@##%@%**++++#+++  0-428.0
tools/trace_digest.py, this change + mesh indirect + DCC extent (strict-1)

16 intervals, 0.0 to 177.5 s, 375 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13 (dirty)

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-24 25 53.6 1154.5 14284.1 14284.1 38.0 80 % Driver.Packet 1201.7
2 24-34 8 1476.9 1796.8 1796.8 1796.8 489.5 100 % Driver.Packet 2431.1
3 34-45 14 736.0 1370.7 1426.6 1426.6 320.3 100 % Driver.Packet 1375.1
4 45-55 16 607.2 1149.7 1248.2 1248.2 402.6 100 % Driver.Packet 1155.3
5 55-65 18 500.6 686.5 1141.0 1141.0 385.3 100 % Driver.Packet 1007.8
6 65-75 15 659.2 1158.3 1581.8 1581.8 394.3 100 % Driver.Packet 1239.9
7 75-86 20 533.9 648.4 696.5 696.5 372.7 100 % Driver.Packet 940.1
8 86-96 22 460.1 557.3 591.6 591.6 312.6 100 % Driver.Packet 824.3
9 96-106 28 314.4 531.9 889.9 889.9 282.6 100 % Driver.Packet 653.7
10 106-116 29 355.0 414.8 446.7 446.7 244.7 99 % Driver.Packet 633.2
11 116-127 32 308.9 362.5 388.8 388.8 239.7 99 % Driver.Packet 575.2
12 127-137 31 321.5 364.1 402.1 402.1 244.0 99 % Driver.Packet 585.3
13 137-147 33 310.0 321.1 387.8 387.8 241.4 99 % Driver.Packet 560.6
14 147-157 19 309.1 1372.4 2221.6 2221.6 352.8 100 % Driver.Packet 979.5
15 157-167 33 309.2 315.9 325.1 325.1 243.1 99 % Driver.Packet 554.7
16 167-177 32 312.1 346.8 354.7 354.7 251.2 99 % Driver.Packet 566.0
p99 ms  @_____.._...._..  0-14284.1
gpu ms  _@*####*+====*=+  0-489.5

The raw aps5-summary.jsonl lines of the 90-155 s window for every run above are in the two comments below.

Overlap. tools/pr_overlap.py --branch finds no open PR that changes the same lines. It lists PRs that conflict with main and share files. On the SRT walker these are #1341, #5609, #6539, #6947 and #7642; none of them changes how branch conditions are evaluated.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5070, driver 617.14, Windows 11 Pro 26300 (focused tests with the validation layer, and PPSA28099). Linux not run.
  • AI-assisted: yes

… read-only buffers

A resource capture evaluated every branch condition of the SRT walk with
reads that wait for pending GPU writes, so a condition on a word that a
queued dispatch still writes stalled the capture until the GPU caught up.

A condition whose successors reach the same resource blocks is no longer
evaluated. A condition read that would wait for a GPU write is refused,
and both successors are bound, when the blocks it chooses between hold no
images and no written or atomic buffers and the plan has no BDA writes;
every other condition still waits. A walk that fails without waiting is
redone with waiting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@eljackjoestar-cmd

Copy link
Copy Markdown
Contributor Author

Raw aps5-summary.jsonl lines of the 90-155 s window, base (ctl-1, ctl-2):

ctl-1

{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":172,"ms":10361.143},"interval_start_s":95.344,"interval_end_s":105.705,"presents":31,"frame_ms":{"p50":321.377,"p90":377.753,"p99":417.499,"max":417.499},"gpu_busy_ms_per_present":240.577,"worker_busy_pct":{"queue worker 0x0":99.456,"queue worker 0x20":78.966},"top_phases_ms_per_frame":{"Driver.Packet":594.583,"Driver.Packet.dispatch":201.652,"Driver.Packet.draw":173.472,"Driver.Draw":173.054,"Driver.Dispatch":163.540,"Driver.Draw.shader_compile_and_link":124.529,"Shader.DrawStage":120.727,"Shader.DrawStage.capture_resources":108.819},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":203,"ms":10222.429},"interval_start_s":105.705,"interval_end_s":115.927,"presents":30,"frame_ms":{"p50":325.887,"p90":385.130,"p99":398.786,"max":398.786},"gpu_busy_ms_per_present":240.480,"worker_busy_pct":{"queue worker 0x0":99.470,"queue worker 0x20":79.158},"top_phases_ms_per_frame":{"Driver.Packet":606.855,"Driver.Packet.dispatch":208.142,"Driver.Packet.draw":173.812,"Driver.Draw":173.388,"Driver.Dispatch":169.287,"Driver.Draw.shader_compile_and_link":126.003,"Shader.DrawStage":122.138,"Shader.DrawStage.capture_resources":110.286},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":233,"ms":10227.634},"interval_start_s":115.927,"interval_end_s":126.155,"presents":30,"frame_ms":{"p50":329.135,"p90":381.714,"p99":418.047,"max":418.047},"gpu_busy_ms_per_present":241.731,"worker_busy_pct":{"queue worker 0x0":99.467,"queue worker 0x20":78.815},"top_phases_ms_per_frame":{"Driver.Packet":606.272,"Driver.Packet.dispatch":205.180,"Driver.Packet.draw":174.326,"Driver.Draw":173.907,"Driver.Dispatch":165.952,"Driver.Draw.shader_compile_and_link":128.474,"Shader.DrawStage":124.647,"Shader.DrawStage.capture_resources":112.762},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":263,"ms":10521.716},"interval_start_s":126.155,"interval_end_s":136.677,"presents":29,"frame_ms":{"p50":321.053,"p90":390.833,"p99":1312.090,"max":1312.090},"gpu_busy_ms_per_present":239.329,"worker_busy_pct":{"queue worker 0x0":99.505,"queue worker 0x20":80.993},"top_phases_ms_per_frame":{"Driver.Packet":652.533,"Driver.Packet.dispatch":203.259,"Driver.Packet.draw":195.889,"Driver.Draw":195.474,"Driver.Dispatch":165.396,"Driver.Draw.shader_compile_and_link":130.672,"Driver.Packet.memory_wait":129.442,"Shader.DrawStage":126.833},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":292,"ms":10117.709},"interval_start_s":136.677,"interval_end_s":146.794,"presents":22,"frame_ms":{"p50":327.450,"p90":718.560,"p99":2059.218,"max":2059.218},"gpu_busy_ms_per_present":333.901,"worker_busy_pct":{"queue worker 0x0":99.610,"queue worker 0x20":81.963},"top_phases_ms_per_frame":{"Driver.Packet":833.245,"Driver.Packet.dispatch":281.412,"Driver.Dispatch":241.928,"Driver.Packet.draw":241.584,"Driver.Draw":241.155,"Driver.Draw.shader_compile_and_link":173.424,"Shader.DrawStage":169.531,"Driver.Packet.memory_wait":165.169},"trace_dropped":false,"trace":""}

ctl-2

{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":180,"ms":10304.757},"interval_start_s":97.151,"interval_end_s":107.456,"presents":31,"frame_ms":{"p50":323.520,"p90":378.092,"p99":394.011,"max":394.011},"gpu_busy_ms_per_present":239.873,"worker_busy_pct":{"queue worker 0x0":99.442,"queue worker 0x20":79.429},"top_phases_ms_per_frame":{"Driver.Packet":593.029,"Driver.Packet.dispatch":200.304,"Driver.Packet.draw":175.543,"Driver.Draw":175.115,"Driver.Dispatch":162.771,"Driver.Draw.shader_compile_and_link":129.831,"Shader.DrawStage":126.023,"Shader.DrawStage.capture_resources":114.033},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":211,"ms":10296.895},"interval_start_s":107.456,"interval_end_s":117.753,"presents":30,"frame_ms":{"p50":332.659,"p90":396.147,"p99":410.646,"max":410.646},"gpu_busy_ms_per_present":249.559,"worker_busy_pct":{"queue worker 0x0":99.445,"queue worker 0x20":79.392},"top_phases_ms_per_frame":{"Driver.Packet":612.120,"Driver.Packet.dispatch":208.945,"Driver.Packet.draw":177.392,"Driver.Draw":176.964,"Driver.Dispatch":169.228,"Driver.Draw.shader_compile_and_link":127.897,"Shader.DrawStage":124.051,"Shader.DrawStage.capture_resources":112.126},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":241,"ms":10301.473},"interval_start_s":117.753,"interval_end_s":128.054,"presents":31,"frame_ms":{"p50":320.415,"p90":378.110,"p99":406.711,"max":406.711},"gpu_busy_ms_per_present":233.692,"worker_busy_pct":{"queue worker 0x0":99.433,"queue worker 0x20":80.008},"top_phases_ms_per_frame":{"Driver.Packet":594.797,"Driver.Packet.dispatch":203.123,"Driver.Packet.draw":172.987,"Driver.Draw":172.572,"Driver.Dispatch":165.716,"Driver.Draw.shader_compile_and_link":123.544,"Shader.DrawStage":119.765,"Shader.DrawStage.capture_resources":107.905},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":272,"ms":10271.213},"interval_start_s":128.054,"interval_end_s":138.326,"presents":22,"frame_ms":{"p50":322.137,"p90":714.764,"p99":2029.634,"max":2029.634},"gpu_busy_ms_per_present":239.744,"worker_busy_pct":{"queue worker 0x0":99.599,"queue worker 0x20":84.160},"top_phases_ms_per_frame":{"Driver.Packet":854.931,"Driver.Packet.dispatch":256.277,"Driver.Packet.draw":252.029,"Driver.Draw":251.606,"Driver.Dispatch":215.891,"Driver.Packet.memory_wait":185.896,"Driver.Draw.shader_compile_and_link":155.459,"Shader.DrawStage":151.578},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":294,"ms":10227.457},"interval_start_s":138.326,"interval_end_s":148.553,"presents":29,"frame_ms":{"p50":324.315,"p90":402.991,"p99":952.994,"max":952.994},"gpu_busy_ms_per_present":311.509,"worker_busy_pct":{"queue worker 0x0":99.498,"queue worker 0x20":80.261},"top_phases_ms_per_frame":{"Driver.Packet":630.443,"Driver.Packet.dispatch":227.232,"Driver.Packet.draw":193.128,"Driver.Draw":192.717,"Driver.Dispatch":190.916,"Driver.Draw.shader_compile_and_link":143.039,"Shader.DrawStage":139.266,"Shader.DrawStage.capture_resources":127.341},"trace_dropped":false,"trace":""}

@eljackjoestar-cmd

Copy link
Copy Markdown
Contributor Author

Raw aps5-summary.jsonl lines of the 90-155 s window, first version of this change (srt-1, srt-2) and this change + mesh indirect + DCC extent (strict-1):

srt-1

{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":145,"ms":10190.925},"interval_start_s":94.572,"interval_end_s":104.762,"presents":28,"frame_ms":{"p50":331.029,"p90":427.443,"p99":915.542,"max":915.542},"gpu_busy_ms_per_present":279.911,"worker_busy_pct":{"queue worker 0x0":99.489,"queue worker 0x20":79.342},"top_phases_ms_per_frame":{"Driver.Packet":648.789,"Driver.Packet.dispatch":225.436,"Driver.Packet.draw":195.559,"Driver.Draw":195.140,"Driver.Dispatch":187.869,"Driver.Draw.draw_and_resource_release":148.510,"Recorder.WaitSerial":115.308,"Driver.Packet.memory_wait":108.080},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":173,"ms":10135.865},"interval_start_s":104.762,"interval_end_s":114.898,"presents":30,"frame_ms":{"p50":328.361,"p90":379.078,"p99":385.785,"max":385.785},"gpu_busy_ms_per_present":240.638,"worker_busy_pct":{"queue worker 0x0":99.449,"queue worker 0x20":78.580},"top_phases_ms_per_frame":{"Driver.Packet":599.671,"Driver.Packet.dispatch":201.527,"Driver.Packet.draw":173.686,"Driver.Draw":173.279,"Driver.Dispatch":163.627,"Driver.Draw.draw_and_resource_release":130.795,"Driver.Packet.memory_wait":107.364,"Recorder.WaitSerial":101.821},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":203,"ms":10073.073},"interval_start_s":114.898,"interval_end_s":124.971,"presents":30,"frame_ms":{"p50":329.570,"p90":379.270,"p99":388.514,"max":388.514},"gpu_busy_ms_per_present":241.064,"worker_busy_pct":{"queue worker 0x0":99.459,"queue worker 0x20":78.756},"top_phases_ms_per_frame":{"Driver.Packet":596.499,"Driver.Packet.dispatch":200.323,"Driver.Packet.draw":171.425,"Driver.Draw":171.018,"Driver.Dispatch":162.174,"Driver.Draw.draw_and_resource_release":126.485,"Driver.Packet.memory_wait":106.098,"Recorder.WaitSerial":106.091},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":233,"ms":10270.615},"interval_start_s":124.971,"interval_end_s":135.242,"presents":31,"frame_ms":{"p50":320.744,"p90":368.223,"p99":417.692,"max":417.692},"gpu_busy_ms_per_present":241.936,"worker_busy_pct":{"queue worker 0x0":99.438,"queue worker 0x20":79.419},"top_phases_ms_per_frame":{"Driver.Packet":590.616,"Driver.Packet.dispatch":198.488,"Driver.Packet.draw":170.074,"Driver.Draw":169.674,"Driver.Dispatch":160.578,"Driver.Draw.draw_and_resource_release":126.928,"Driver.Packet.memory_wait":104.393,"Recorder.WaitSerial":103.821},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":264,"ms":10573.722},"interval_start_s":135.242,"interval_end_s":145.816,"presents":29,"frame_ms":{"p50":313.791,"p90":329.513,"p99":1299.619,"max":1299.619},"gpu_busy_ms_per_present":239.370,"worker_busy_pct":{"queue worker 0x0":99.494,"queue worker 0x20":81.788},"top_phases_ms_per_frame":{"Driver.Packet":659.044,"Driver.Packet.dispatch":202.894,"Driver.Packet.draw":200.192,"Driver.Draw":199.793,"Driver.Dispatch":165.954,"Driver.Packet.memory_wait":130.915,"Driver.Draw.draw_and_resource_release":127.754,"Recorder.WaitSerial":102.662},"trace_dropped":false,"trace":""}

srt-2

{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":171,"ms":10165.210},"interval_start_s":94.075,"interval_end_s":104.240,"presents":31,"frame_ms":{"p50":318.890,"p90":359.604,"p99":439.638,"max":439.638},"gpu_busy_ms_per_present":239.438,"worker_busy_pct":{"queue worker 0x0":99.446,"queue worker 0x20":79.816},"top_phases_ms_per_frame":{"Driver.Packet":586.334,"Driver.Packet.dispatch":197.897,"Driver.Packet.draw":173.588,"Driver.Draw":173.184,"Driver.Dispatch":160.715,"Driver.Draw.draw_and_resource_release":129.954,"Driver.Packet.memory_wait":105.052,"Recorder.WaitSerial":97.598},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":202,"ms":10176.665},"interval_start_s":104.240,"interval_end_s":114.417,"presents":30,"frame_ms":{"p50":327.739,"p90":388.024,"p99":409.439,"max":409.439},"gpu_busy_ms_per_present":239.772,"worker_busy_pct":{"queue worker 0x0":99.453,"queue worker 0x20":78.567},"top_phases_ms_per_frame":{"Driver.Packet":601.913,"Driver.Packet.dispatch":207.989,"Driver.Packet.draw":170.738,"Driver.Draw":170.337,"Driver.Dispatch":169.226,"Driver.Draw.draw_and_resource_release":125.373,"Driver.Packet.memory_wait":106.640,"Recorder.WaitSerial":95.334},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":232,"ms":10232.896},"interval_start_s":114.417,"interval_end_s":124.650,"presents":31,"frame_ms":{"p50":321.831,"p90":355.476,"p99":395.104,"max":395.104},"gpu_busy_ms_per_present":248.553,"worker_busy_pct":{"queue worker 0x0":99.443,"queue worker 0x20":79.054},"top_phases_ms_per_frame":{"Driver.Packet":587.718,"Driver.Packet.dispatch":199.681,"Driver.Packet.draw":171.480,"Driver.Draw":171.080,"Driver.Dispatch":160.592,"Driver.Draw.draw_and_resource_release":127.911,"Driver.Packet.memory_wait":104.881,"Recorder.WaitSerial":99.073},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":263,"ms":10465.700},"interval_start_s":124.650,"interval_end_s":135.115,"presents":29,"frame_ms":{"p50":318.415,"p90":383.992,"p99":1329.885,"max":1329.885},"gpu_busy_ms_per_present":230.544,"worker_busy_pct":{"queue worker 0x0":99.499,"queue worker 0x20":80.697},"top_phases_ms_per_frame":{"Driver.Packet":648.488,"Driver.Packet.dispatch":207.307,"Driver.Packet.draw":195.159,"Driver.Draw":194.757,"Driver.Dispatch":169.022,"Driver.Draw.draw_and_resource_release":130.228,"Driver.Packet.memory_wait":122.267,"Recorder.WaitSerial":100.333},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":292,"ms":10058.120},"interval_start_s":135.115,"interval_end_s":145.174,"presents":22,"frame_ms":{"p50":324.341,"p90":724.263,"p99":2012.645,"max":2012.645},"gpu_busy_ms_per_present":333.386,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":82.115},"top_phases_ms_per_frame":{"Driver.Packet":820.853,"Driver.Packet.dispatch":282.150,"Driver.Dispatch":243.492,"Driver.Packet.draw":237.983,"Driver.Draw":237.580,"Driver.Draw.draw_and_resource_release":177.445,"Driver.Packet.memory_wait":155.284,"Recorder.WaitSerial":150.152},"trace_dropped":false,"trace":""}

strict-1

{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":138,"ms":10168.364},"interval_start_s":95.700,"interval_end_s":105.869,"presents":28,"frame_ms":{"p50":314.385,"p90":531.852,"p99":889.925,"max":889.925},"gpu_busy_ms_per_present":282.619,"worker_busy_pct":{"queue worker 0x0":99.510,"queue worker 0x20":80.999},"top_phases_ms_per_frame":{"Driver.Packet":653.684,"Driver.Packet.dispatch":320.590,"Driver.Dispatch":282.542,"Driver.Packet.memory_wait":138.786,"Recorder.WaitSerial":133.462,"Driver.Dispatch.capture_resources":96.314,"Driver.Packet.prepare_memory":81.217,"Driver.Packet.draw":76.950},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":166,"ms":10360.276},"interval_start_s":105.869,"interval_end_s":116.229,"presents":29,"frame_ms":{"p50":354.961,"p90":414.786,"p99":446.653,"max":446.653},"gpu_busy_ms_per_present":244.688,"worker_busy_pct":{"queue worker 0x0":99.491,"queue worker 0x20":78.256},"top_phases_ms_per_frame":{"Driver.Packet":633.182,"Driver.Packet.dispatch":263.422,"Driver.Dispatch":221.989,"Driver.Packet.memory_wait":151.666,"Recorder.WaitSerial":98.567,"Driver.Packet.draw":87.196,"Driver.Draw":86.741,"Driver.Packet.prepare_memory":82.891},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":195,"ms":10298.391},"interval_start_s":116.229,"interval_end_s":126.527,"presents":32,"frame_ms":{"p50":308.945,"p90":362.497,"p99":388.823,"max":388.823},"gpu_busy_ms_per_present":239.654,"worker_busy_pct":{"queue worker 0x0":99.424,"queue worker 0x20":79.771},"top_phases_ms_per_frame":{"Driver.Packet":575.232,"Driver.Packet.dispatch":250.067,"Driver.Dispatch":211.099,"Driver.Packet.memory_wait":137.633,"Recorder.WaitSerial":101.649,"Driver.Packet.prepare_memory":76.863,"Driver.Packet.draw":74.425,"Driver.Draw":73.995},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":227,"ms":10145.255},"interval_start_s":126.527,"interval_end_s":136.673,"presents":31,"frame_ms":{"p50":321.471,"p90":364.150,"p99":402.068,"max":402.068},"gpu_busy_ms_per_present":244.034,"worker_busy_pct":{"queue worker 0x0":99.413,"queue worker 0x20":79.970},"top_phases_ms_per_frame":{"Driver.Packet":585.330,"Driver.Packet.dispatch":247.951,"Driver.Dispatch":209.197,"Driver.Packet.memory_wait":139.166,"Recorder.WaitSerial":95.827,"Driver.Packet.prepare_memory":82.399,"Driver.Packet.draw":78.830,"Driver.Draw":78.388},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":258,"ms":10287.147},"interval_start_s":136.673,"interval_end_s":146.960,"presents":33,"frame_ms":{"p50":309.995,"p90":321.067,"p99":387.835,"max":387.835},"gpu_busy_ms_per_present":241.428,"worker_busy_pct":{"queue worker 0x0":99.413,"queue worker 0x20":80.894},"top_phases_ms_per_frame":{"Driver.Packet":560.604,"Driver.Packet.dispatch":246.356,"Driver.Dispatch":209.189,"Driver.Packet.memory_wait":132.672,"Recorder.WaitSerial":101.179,"Driver.Packet.prepare_memory":76.595,"Driver.Packet.draw":73.611,"Driver.Dispatch.capture_resources":73.262},"trace_dropped":false,"trace":""}

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 5609 core/shader/recompiler/Optimization/include/Optimization/SrtWalker/SrtEvaluator.hpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6290 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6539 core/shader/recompiler/Optimization/include/Optimization/SrtWalker/SrtEvaluator.hpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6683 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6801 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6947 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/include/Optimization/SrtWalker.hpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/include/Optimization/SrtWalker.hpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 7816 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 7888 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 8004 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 8077 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp

@github-actions github-actions Bot added shader core/shader agc libSceAgc* labels Oct 19, 2026

@CnRJay CnRJay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is sound (a branch that only selects which read-only buffer to bind needn't wait for the GPU), the strictness after the water-flare incident is the right call, and the four new checks cover the rule's edges. Three gaps.

  • The performance claim is not measured for this PR. The one capture with this rule (strict-1, 2.98 fps against 2.76 and 2.78 for the base) also carries the non-indexed mesh indirect PR and the DCC extent PR, and its rule is chosen through a temporary APS5_DEBUG_STRICT_UNION switch that isn't in the PR. The first version "gained 2.7%" and was rejected, so the +7.6% belongs to the mix. Please capture base against base plus this PR alone, interleaved, same scene; at 2.8 fps on a start screen the window needs to be much longer than 90-155 s to resolve a few percent. GPU busy per present barely moves (254-259 ms to 250 ms), so the saving is CPU wait; say which phase shrinks (Driver.Packet.memory_wait?) with the numbers.
  • Binding both successors binds buffers that the taken branch would not have. A branch that selects between two V#s often guards the other one's validity (a descriptor that is only filled in when the branch is taken, a zero or stale record otherwise). Capturing it reads those words and imports or maps a range from them. What happens when the untaken V# is empty, misaligned or points at unmapped memory: does the build throw, bind a null range, or import something large? A test where the untaken side's V# is garbage, and the draw still renders from the taken side, is the case that matters.
  • The flare class is the hazard here, and it was found by eye in frame dumps. The new tests check what is bound, not what is drawn. Add a test that reproduces the flare in miniature: a dispatch writes the word, a draw's branch reads it, the image behind the branch must be the one the exact evaluation picks. It should fail for the first version of this change.

Smaller: EvaluateRuntimeSourcesImpl redoes a walk that failed without waiting, "after rolling back the read trace and user-data use it recorded". A rollback bug leaves a stale trace on the second walk and the draw-cache key wrong. Say which test fails when the rollback is removed.

@adriadam10 adriadam10 self-assigned this Oct 19, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the diff and ShaderMemory::pending (the probe has no side effects, so refusing a read costs nothing). The rule is coherent and the stricter version after the flare is the right shape. What is missing:

  • Performance is not isolated. strict-1 also carries the mesh indirect and DCC extent PRs and the temporary APS5_DEBUG_STRICT_UNION switch. The perf label asks for base vs this PR alone on the same scene; at ~2.8 fps the window must be much longer than 90-155 s, runs interleaved. GPU busy barely moves, so say which CPU phase shrinks (e.g. memory wait) with numbers.
  • ConditionSelectsResources has no test. None of the four new checks reaches the "both successors reach the same frontier, condition not evaluated" path (SrtDescriptorEvaluation.cpp line 109, SrtTape.cpp line 56). Add a plan where that holds and a condition read that would otherwise be wrong or pending, and check that both the generic evaluator and SrtTape skip it.
  • Rollback in EvaluateRuntimeSourcesImpl (lines 356-373) is untested. Add a case where the refusing walk fails and the waiting redo must give the same result, trace and userDataUse as a plain waiting walk; it should fail if the resize calls are removed.
  • Untaken-side V# that is garbage. Binding both successors reads descriptors the taken branch would not. Test a read-only V# behind the untaken branch that is zero, misaligned or points to unmapped memory while the pending word selects the other side: the capture must not throw or import a large range, and the taken side must still be read.
  • The flare class is only checked by what is bound, not what is drawn. A small test where a dispatch writes the selecting word and the draw's branch picks the image must show the exact evaluation's image; it should fail for the first version of this change.

Linux/lavapipe was not run by the author; the full Build covers it.

@Amoenus

Amoenus commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Independent Windows validation of the equivalent-resource-frontier test requested by @adriadam10. The test-only addition is 68b7138, on a clean composition of this PR's 0f2d297f head with main 525e299f (b88cbeea). Attribution and the original PR history are retained.

The new synthetic diamond plan has a runtime-evaluable scalar-address condition and two successors reaching the same descriptor. Its memory reader refuses reads, and cases configure the pending-probe callback to report false or true. Both the generic evaluator and tape must capture the descriptor without reading or probing the condition, or recording it in the read trace/user-data use. A separate tape-only invocation allows its failure to be checked independently.

  • With identical fixture sources over unchanged main production code (control f9c6303): 6/6 expected failures, at an irrelevant condition was read or probed (three repetitions each of the generic-leading and tape-only cases).
  • With the PR composition plus test addition: 6/6 pass, then 6/6 pass again after restoring it. CTest uses a 30-second limit.
  • Common NVIDIA checks on both production variants: agc_driver_mesh, agc_driver_guarded_null_pointer, agc_driver_draw_cache_reuse, three repetitions each: 9/9 pass per side. Required Vulkan, shader cache disabled, loaded Khronos validation layer, actual RTX 5080 / driver 610.62 / Windows 11 Enterprise 26200. Both sides have zero validation errors/VUIDs and the same nine shader-output-not-consumed warnings in draw-cache reuse.

Conventions pass. Cppcheck and clang-tidy completed with no diagnostics on the new test lines; the translation unit still has inherited findings, including the borrowed Regions() spans already tracked by #7754/#7759. This frontier case does not call Regions().

This supplies a focused test for the equivalent-frontier rule. The performance, rollback, invalid untaken V#, and dispatch/draw image-selection review requests remain open. GPU coverage here is NVIDIA only; Linux/AMD and title behavior were not validated by this comparison. AI-assisted: yes.

@CPritch

CPritch commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Ran this on GTA V (PPSA04263 01.010.002), Linux 7.2.8-zen1-2-zen, NVIDIA GeForce RTX 5060 Laptop GPU, NVIDIA 615.71.09, Graphics Mode Performance, the Story prologue after Resume Story, with no input.
main eaa5c92 against main eaa5c92 + #7891 at 0f2d297, same machine and session, two runs each in the order A B A B, window frames 3500:700, caches warm, APS5_TRACE_EVENTS=4194304 (BUILD.md's remedy for full trace buffers), no other APS5_TRACE_* or APS5_PROFILE_* switch, log not redirected. The harness navigates the menus from frame dumps in boot and load to present 3300 (APS5_DUMP_FRAMES=110, every 30 presents), which stop before the window.

Frame p50: main 80.5, 81.2 ms, with #7891 81.4, 81.4 ms (+0.6 ms, +0.7 %). GPU busy per present: 64.6 and 64.3 ms.
p90: main 90.2, 89.4 ms, with #7891 93.8, 94.4 ms; p99: main 107.5, 113.1 ms, with #7891 134.2, 146.7 ms. Queue 0's Driver.Draw went up by 2.6 and 3.2 ms per frame (tools/performance_compare.py).
Not tested: other scenes, Fidelity mode, other GPUs.
Written with AI assistance (Claude Code); measured on the machine above.

Summary lines (main, then the PR):
{"commit":"eaa5c9238687","dirty":false,"env":{"APS5_DUMP_FRAMES":"110","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"3500:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 3500:700","first_present":3500,"ms":57363.452},"presents":700,"frame_ms":{"p50":80.501,"p90":90.214,"p99":107.534,"max":138.909},"gpu_busy_ms_per_present":64.175,"worker_busy_pct":{"queue worker 0x0":3680.742},"top_phases_ms_per_frame":{"Driver.EndSubmission":2951.239,"Driver.Packet":62.787,"Graphics.Draw":60.008,"Graphics.Draw.draw_and_resource_release":56.422,"Driver.Packet.draw":49.69,"Driver.Draw":49.474,"VideoOut.Flip":25.695,"Driver.Present":25.68},"trace_dropped":false,"trace":"aps5-trace-eaa5c9238687-1343642.json.gz"}
{"commit":"6e54a939396a","dirty":false,"env":{"APS5_DUMP_FRAMES":"110","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"3500:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 3500:700","first_present":3500,"ms":58798.206},"presents":700,"frame_ms":{"p50":81.412,"p90":93.759,"p99":134.227,"max":163.259},"gpu_busy_ms_per_present":64.142,"worker_busy_pct":{"queue worker 0x0":3697.151},"top_phases_ms_per_frame":{"Driver.EndSubmission":3037.375,"Driver.Packet":65.775,"Graphics.Draw":61.13,"Graphics.Draw.draw_and_resource_release":57.173,"Driver.Packet.draw":52.316,"Driver.Draw":52.081,"VideoOut.Flip":25.122,"Driver.Present":25.107},"trace_dropped":false,"trace":"aps5-trace-6e54a939396a-1351612.json.gz"}

@Amoenus

Amoenus commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

There is a new integration consideration with #8295 / #8272, separate from my earlier equivalent-frontier validation at this PR's 0f2d297f53be23a0d880fc4532508ac752d3d966 head.

#8295 adds ResourceBlock.flatSlots so a known branch can exclude a direct-root scalar load from capture. At this head, ResourceFrontier stops only for a condition, descriptor sources or images; BlockNeedsExactCondition also ignores flat slots. A block containing only such a scalar load can therefore be treated as empty. If the successor frontiers then compare equal, both evaluators skip the condition and visit both successors, activating the unreachable flat load again.

Please account for flat-slot uses in the frontier and exact-condition decisions when combining these changes. The direct-root regression, now included in #8295 at d739a4167ced06b1eece610cfe47e0f33edfffd8, provides a starting case: mapped/taken and mapped/skipped outputs succeed, invalid/taken is refused, and the same invalid/skipped pointer must not be read. Cover both generic and tape evaluation, including a pending condition.

This is a public-source review of the interaction between two unmerged changes, not a reported runtime failure of this PR alone or a completed combined-branch test. My earlier validation keeps its original pins. AI-assisted: yes.

@DavidAmsellem

Copy link
Copy Markdown
Contributor

First Linux run of this PR, on AMD with RADV. Head 0f2d297f5 merged onto main 6bef96df7 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at fd6916d8d: 1712/1713 with this PR, against 1712/1713 on main. The one failure is the same on both, so this PR adds none: agc_driver_guest_memory_lifetime (#7784).

Comparing the JUnit output with main: this PR adds no ctest entry, and none is skipped or removed.

This checks correctness only; I did not measure performance.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* perf numbers missing perf pull request without a before and after summary line perf Performance change shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants