Repository navigation
perf(agc): suppress redundant graphics pipeline and dynamic state commands - #16752
Conversation
…mands Each recorder batch owns a CommandState that remembers the graphics pipeline bound in its command buffer and the effective value of every dynamic state the draw path sets. Pipeline::Begin, Continue, the back-face and second-channel binds, and the stencil replay reference skip a bind or setter the command buffer already holds. The state is unknown after vkBeginCommandBuffer, after a pipeline bind for every state the pipeline fixes statically, and around RecordSampleOrder and Recorder::RecordUncounted, which record graphics commands the tracker does not see. APS5_NO_STATE_SUPPRESSION restores unconditional recording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw.cpp's APS5_DRAW_TRANSITIONS recorded fallback now hands the recorder's graphics state to the sample order, pipeline begin, stencil replay, back-face and second-channel calls, as the lean path does. Tests drive the tracker through real objects. A real Recorder reopened over a reused command buffer handle re-emits the pipeline bind and every setter, two interleaved recorders never suppress each other, and a tracked draw after RecordUncounted (also when it throws) or RecordSampleOrder re-emits all of them. Pipeline::Continue swaps from the fast-linked to the optimized handle within one tracker and suppresses afterwards, and a D16 stencil target stored as D24 caches and emits the converted depth bias for front and back faces, with and without graphics pipeline libraries. Recorded per-face draws set the viewport and scissor once, the synchronous path twice, and the optimized readback, stencil replay and per-face depth bias tests also run with APS5_NO_STATE_SUPPRESSION. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CommandState now records the tracked binds and dynamic state on its own command buffer, so no caller can pass an untracked or mismatched buffer. Pipeline, stencil replay, sample order and pass-end callbacks take the recorder's CommandState; raw recording goes through CommandState::Untracked, which forgets tracked state around it. APS5_NO_STATE_SUPPRESSION keeps tracking off through a mask instead of a null tracker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The depth reorder now records its graphics pipeline bind, viewport, scissor, stencil write mask and stencil reference through CommandState, with one shared dynamic state list for pipeline creation and the slot mask. RecordSampleOrder no longer forgets the tracked state, so the draw after a pass records only what differs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RecordUncounted hands its callback the batch's CommandState instead of a raw command buffer behind Untracked, which is removed. The first sample copy records its graphics pipeline bind through the tracker, so the draw after an uncounted pass records only what differs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CommandState suppresses redundant graphics pipeline binds and dynamic state, so any such command recorded outside it leaves the tracker stale and silently drops a needed command. Context::Function, Context::Resolved and the device setup lookup now take a consteval FunctionName that rejects a graphics bind, a tracked dynamic state command, vkCmdBindShadersEXT or vkCmdExecuteCommands by name. The device table's tracked entries become write-only TrackedFunction members that only CommandState and the new Context::BindComputePipeline read. Compute binds go through BindComputePipeline; presentation, the overlay and tests that record their own command buffers use an untracked local CommandState. Recorded commands are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DynamicSlots rejects a dynamic state the tracker does not follow, and a second render pass of a batch records nothing for an identical draw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FunctionName keeps its name private, CommandState cannot be copied, the draw fallback builds a tracker only for unrecorded draws, and the unused recording generation is gone. Tests check the recorded per-face pixels and a failed submit reopened on a recycled command buffer handle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
Ran
AI-assisted: yes. |
…tate Main's presentation upscaler resolved vkCmdBindPipeline, vkCmdSetViewport and vkCmdSetScissor by name, which the tracked command-state functions of this change reject at compile time. Record them through a CommandState that does not suppress, so every command is still emitted as before.
Keep both debt entries. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conflicts: - Graphics/include/Context.hpp, Graphics/src/Resources.cpp: main (boykopovar#16572) added cmdSetColorWriteMask next to the viewport and scissor entries we made tracked; kept our TrackedFunction members and lookups, and added main's entry as a plain function pointer, since the colour write mask is set outside CommandState (its test swaps the pointer). - Graphics/include/Pipeline.hpp, Graphics/src/Pipeline.cpp: main added a masked state argument to Begin, Continue, ContinueBackFaces and ContinueSecondChannel and setColorWriteMasks after each bind; our side moved those functions to CommandState. They now take CommandState& with main's masked argument, and call setColorWriteMasks(recording.Commands(), ...) at main's points, after the CommandState bind. - Graphics/src/Pipeline.cpp constructor: our DynamicSlots runs before main appends VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, so the tracker follows only the states it knows; the mask is set after every bind, so a skipped rebind keeps it right. - Graphics/src/Draw.cpp: main passes the masked state to each pipeline call; kept main's arguments with our CommandState recording. - tests/Recorder.cpp, tests/cmake/agc_driver_recorder_tests.cmake: main added agc_snapshot_read_into_staging where we added the graphics state tests; kept both, and both are in the WIN32 PATH list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One textual conflict in agc_driver_graphics_tests.cmake: both sides added tests after agc_sparse_buffer_holes (agc_command_state here, agc_copy_input_failure_lifetime on main); both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dynamic color write masks (vkCmdSetColorWriteMaskEXT, set per draw since the color write masks moved into dynamic state) were set through context.Resolved after every pipeline bind and continue, outside CommandState, so a run of draws with the same masks set them again on every draw, and the pipeline's dynamic slots left them out. CommandState now has a ColorWriteMask slot. SetColorWriteMasks keeps the count and the masks it last set: a set whose masks are a prefix of the known ones (the same attachments, or fewer with the same masks) records nothing; a changed mask or a wider set records the command. A pipeline that declares VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT keeps the slot across its binds (the slot is computed after the mask joins the dynamic states); one with static masks forgets it. Pipeline::setColorWriteMasks goes through the command state, and vkCmdSetColorWriteMaskEXT joins the tracked commands: the device function is a TrackedFunction, and naming it in Context::Function or Resolved outside CommandState does not compile (checked by adding such a call: TrackedCommandOutsideCommandState in a constant expression). Tests: agc_command_state checks the slot mapping (the library's dynamic states and the mask slot together cover every slot) and a sequence of mask sets by attachment count, after binds of pipelines with dynamic and static masks, after invalidation and without suppression. ColorWriteMaskDynamic expects no set for a continued draw with the same masks unless APS5_NO_STATE_SUPPRESSION=1, and resolves the native function itself since the table entry is tracked; two new runs cover it without suppression and with the masks in the pipeline (APS5_NO_DYNAMIC_COLOR_WRITE_MASK=1). A mutant that ignores the mask values (compares the counts only) fails agc_command_state and ColorWriteMaskDynamic. The command state, graphics state recorder (both modes), color write mask (three runs), draw cache, relocation, recapture, alpha to coverage and village tests pass (23 of 23; four alpha to coverage variants skip on lavapipe). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges main 2b964d8, which brings the command state (boykopovar#16752) and boykopovar#17739. Conflicts resolved as in the command-state and encoder merge 43bf5c8: a batch keeps its BatchCommands, encoder recording and folded samples next to the command state, the recorder's function lookup takes a FunctionName and the caller's source location, and the tests keep both the encoder segment tests and the first-sample copy tracking test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t opens Recorder::SplitForRun replaces the batch's command buffer, but the CommandState introduced by boykopovar#16752 kept tracking the ended one, so the next draw suppressed state it never recorded into the new buffer and crashed at the first title draw. Begin the state on the new command buffer. Found and fixed by Celegans12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Every recorded graphics draw binds its pipeline and records every dynamic state command it uses, even when its command buffer already holds that pipeline and those values. In the GTA V (PPSA04263) standing scene measured below,
mainissues 18.6 dynamic state commands and 0.98 graphics pipeline binds per draw.Each recorder batch now owns a
CommandState(Recorder::GraphicsState()) that remembers the graphics pipeline bound in its command buffer and the value of each of the 19 dynamic state slots the draw path sets (viewport, scissor, depth bias, depth bounds, cull mode, front face, depth test, write and compare, depth bounds test, stencil test, and per face the stencil op, compare mask, write mask and reference). A bind or setter whose value the command buffer already holds is skipped.Pipeline::Begin,Continue, the back-face and second-channel binds, the stencil replay reference, the sample order depth reorder and the first-sample copy inRecorder::RecordUncountedrecord through the batch'sCommandState, so the draw after one of those passes records only what differs.vkBeginCommandBuffer, and a pipeline bind forgets every slot the new pipeline fixes statically. The state belongs to the batch, so a recycled command buffer handle and a batch reopened after a failed submit start with nothing known.Context::Function,Context::Resolvedand the device setup lookup take a constevalFunctionNamethat rejects a graphics pipeline bind, a tracked dynamic state command,vkCmdBindShadersEXTorvkCmdExecuteCommandsat compile time. The device table holds those entry points as write-onlyTrackedFunctionmembers that onlyCommandStateand the newContext::BindComputePipelineread. Presentation, the performance overlay and tests, which record their own command buffers, use a local untrackedCommandState.CommandStatecannot be copied or moved.docs/dev/debt/libSceAgcDriver.md: a rawdeviceProclookup cast to the function type, and a secondCommandStatebegun on a recorder batch's command buffer.APS5_NO_STATE_SUPPRESSIONrecords every bind and setter, as before (docs/dev/ENVIRONMENT.md).Overlap, checked on 2026-11-07 against
main46552cb461withtools/pr_overlap.pyand by hand: the tool reports 13 open pull requests that change lines this branch changes and 98 more that conflict withmainand share files with it (78 of the 111 have a commit since 2026-10-24; I read the hunks of 29 of them). None implements the same thing. #9503, #10351, #11551, #12840 and #12944 change the same functions (SampleOrders::Depth,recordPreparedDraw,recordStencilReplay,pushDrawConstants,VulkanDevice::recordDispatch), so whichever lands second needs a manual rebase; the others share only test, debt orENVIRONMENT.mdlines in other hunks. #10049, #12863, #15670, #15845 and #16286 are disjoint. Rechecked against4977f64052: the tool now confirms #9503, #9712, #9897, #10141, #10351, #12944, #14032, #15570, #16373 and #16572. #16572 (set color write masks per draw through dynamic state) adds a dynamic state that this change's tracker must own: with this change, recordingvkCmdSetColorWriteMaskEXToutside the tracker does not compile. If #16572 lands first, a rebase of this branch onto it that tracks the masks like the other dynamic states is ready (fork branchdraft/src/refresh/r1-on-16572); it suppresses an identical mask set and records a changed or wider one, with a unit test that a mutant ignoring mask values turns red.Open pull requests that record a graphics pipeline bind or a tracked dynamic state command must go through
CommandState(orContext::BindComputePipelinefor a compute bind) once both are inmain, because a direct call throughContext::FunctionorContext::Resolvedno longer compiles; none is a prerequisite, soDepends onis none:SampleOrders::Depth): its pipeline bind goes throughCommandState::BindPipelineonRecorder::GraphicsState().recordPreparedDraw): stencil state goes throughCommandState::SetStencilOp,SetStencilCompareMask,SetStencilWriteMaskandSetStencilReference.depthBounds(recordStencilReplay,pushDrawConstants): its fallback setsSetDepthBoundsTestEnableandSetDepthBoundsthroughCommandState.PresentationPass::draw,FirstSampleCopy::Record,GpuColorTransfer::dispatchand theTextureDetilerdispatches), feat(agc): scale the presentation with FSR 1 under ANYPS5_UPSCALE=fsr #10043 (pipeline bind, viewport and scissor in the newPresentationUpscaler.cpp), fix(agc): write back BDA stores into writable heap mirrors #12840 (VulkanDevice::recordDispatchand a store-page gather inRecorder.cpp) and perf(agc): bind the changed copy-back's buffers through push descriptors #15792 (Recorder::RecordChangedCopy) add such calls; their text merges, but each call has to move toCommandStateorContext::BindComputePipeline.Tested
Head
1781488bcbonmain4977f64052.Refreshed onto
main4977f64052. Head1781488bcb;git range-diffagainstb0fe73c6ddshows the same code patches in all 8 commits; only the debt entry of commits 3 to 6 and 8 changed context, becausemainadded two entries above it. Local RTX 3080 gate on both, same environment as below (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation), built one after the other in one build tree, with the focused AGC set of all five pull requests of this series (242 tests on this head, 232 onmain): both 100 % passed, noVUID-line in either log or in replay subprocess logs, and neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS. Fork CI on the rebased head against4977f64052: run 42375092958: Linux 46 of 53 passed, 7 skipped; Windows 45 of 55 passed, 9 skipped, andagc_driver_recorderfailed, as it does onmain. The skips include the newagc_driver_pipeline_optimized_readback_color32_unsuppressedand_color64_unsuppressed, skipped on lavapipe like their existing forms; the RTX 3080 gate runs and passes them. NoVUID-line on either side, conventions check passed. The measurements and full runs below were on the previous base46552cb461; the code they measured is unchanged.Vulkan validation. RTX 3080,
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ctest --test-dir build -R 'agc|write_tracking|guest|indirect_draw|draw_finisher|depth_bias|draw_pipeline' -Vonb0fe73c6dd(3209 tests) and onmain46552cb461(3199 tests). Every test failing in either full run was then rerun alone on both builds, one build at a time with nothing else on the GPU, usingctest -Rwith the union of the 16 names and the same environment: on both, 15 of 16 passed and onlyagc_driver_direct_write_completionfailed, which fails onmaintoo (#15547); the other failures of the full runs were timeouts and0xc0000409exits under load from concurrent gates and did not reproduce alone. Both full logs hold the same 18VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605lines and no otherVUID-; neither containswas not found but was requested by env var VK_INSTANCE_LAYERS. The change adds no validation error.Fork CI (GitHub runners, Mesa lavapipe with the Khronos validation layer, head against
main): run 42329061255, rebased there onto46552cb461. Linux and Windows each ran 39 tests: 31 passed, 0 failed, 8 skipped, noVUID-line on either side, conventions check passed. The eight skips are the same onmainexcept for the two new_unsuppressedcolor readback variants, and all have the same lavapipe reasons: the masked pixel shader needs at least 32 subgroup lanes (the fourcolor32/color64readback tests and their two new variants), and the device has no 2x color and depth targets (two sample order tests); the RTX 3080 gate above runs them.Tests.
agc_command_statedrives the tracker through real objects: a pipeline bind, every tracked dynamic state, a D16 stencil target stored as D24 that caches and emits the converted depth bias for both faces with and without graphics pipeline libraries,Pipeline::Continueswapping from the fast-linked to the optimized handle within one tracker and suppressing afterwards,DynamicSlotsrejecting a dynamic state the tracker does not follow, and a second render pass of a batch that records nothing for an identical draw.agc_graphics_state_recorder(and_unsuppressed): a realRecorderreopened over a reused command buffer handle, and a batch reopened on a recycled handle after a failed submit, record the pipeline bind and every setter again; two interleaved recorders never suppress each other; a draw afterRecordUncounted, also when it throws, or afterRecordSampleOrderrecords only what differs.agc_driver_depth_bias_per_facechecks the recorded per-face pixels; recorded per-face draws set the viewport and scissor once and the synchronous path twice. The optimized readback, stencil replay and per-face depth bias tests also run withAPS5_NO_STATE_SUPPRESSION(_unsuppressed) and the per-face test withAPS5_DRAW_TRANSITIONS(_transitions).bf99218c1b, same tests): a diagnostic build that carries the previous batch's tracker state into the batch opened after an injected failed submit turnsagc_graphics_state_recorderred at "the first draw after a failed submit on a recycled command buffer handle" (the draw is suppressed instead of recording all 16 commands); without the mutant it passes. The compile-time check is its own negative control: recordingvkCmdSetViewportthroughContext::Functiondoes not compile.agc_command_statefirst failed 8 of 40 runs because the sample-location mock ignoredblockOptimizedLink; after that test fix it passed 150 of 150 runs and 100 of 100 on the then frozen commit.Per-draw cost, replay. Identical frames, so the change is the only difference. A 3-frame capture of the scene below (
APS5_FRAME_CAPTURE, 9,364 draws) is replayed withagc_frame_replay --repeat 5through the real submit path, with the same pipelined-draw settings as the boots; passes 2 to 5 count. Base46552cb461and each build alternate run by run. Every pass of every run drew exactly 9,364 draws and every run matched the base pixels exactly (pixels_identical1.0). The metric is committer wall time per commit, per draw; base is about 53.2 µs per draw. The replay tool ismain'stools/FrameReplay.cppwith #12565, #12567, #12568, #11435 and #13984 merged and a local retire of resident images before each memory restore so--repeatworks; it is local and not part of this pull request (per-build summaries and binary provenance attached).b0fe73c6dd46552cb461f62ea7bd080e323b1bdcThe calibration build reads its injected 1.0 µs, so the replay resolves per-draw costs below 1 µs; base against base reads +0.10 ± 0.37. The two null controls stay within noise. The three changes add up: -1.35, -0.81 and -0.44 sum to -2.60, inside the merged build's -2.99 ± 0.44. Thread CPU columns are attached but not used: Windows thread times tick in 15.6 ms steps, too coarse for 1 µs per draw. The replay cannot show contention with the title's own threads, frame pacing, or GPU-bound time.
Frame time, stacked boots.
main46552cb461against the three changes merged on it, one warm-up boot each, then two ABBA pairs in the scene below on the current host: mean ms/frame 147.0 to 136.0 (-7.5 %) and 136.7 to 131.3 (-4.0 %); p99 168.8 to 181.9 and 192.6 to 188.7. These are not attributed to the change: the merged build drew 13 % fewer draws per present in those boots (1,497 and 1,611 against 1,783 and 1,801), and draw count varies from boot to boot with the scene, which is why the per-draw figure above comes from the replay. The older per-pull-request pairs below were taken on this branch before its rebase and on the host state before the changes listed under Host; the counts are per pull request and stay.Performance, older per-PR pairs. GTA V (PPSA04263, content 01.011.001), standing scene, 3840x2160, default in-game settings. Two interleaved pairs,
mainthen this change, twice, after one warm-up boot of each build that is not a sample. Each capture is the 30 s trace window from 235 s after launch, about 30 s after the player stands still (202 to 206 s in every capture), with pipelined draws (APS5_DRAW_PIPELINE=1,APS5_PIPELINED_DRAWS=32,APS5_PIPELINE_DISPATCH=1).mainwas7383be1a19; the change was86104970d7, this branch before its rebase onto46552cb461(git range-diffshows the same patches; only the context lines of the debt entry differ).7383be1a19c786104970d79d7383be1a19c786104970d79dChange minus main, mean ms/frame: pair 1 +2.50, pair 2 -6.31, mean -1.90 (-1.4 %); p50 +0.6 and -7.5; p99 +42.9 and +6.7.
Frame time is within noise. Twelve
maincaptures of this scene across six blocks give a mean of 137.6 ms per frame with a standard deviation of 1.85 ms (1.35 %), and the two pair deltas have opposite signs; two pairs resolve about 3 % at best. The p99 rose in both pairs (+42.9 and +6.7 ms); in a 30 s capture of about 220 frames the p99 is set by the two or three longest frames, so a single pair's p99 moves with single long frames; in the stacked boots below it moved both ways (+13.1 and -3.9 ms).Why frame time barely moves: the scene is CPU-bound and the draw committer is its critical path. In a 60 s stack sample of
mainin this scene (1 ms sampling, 3,843 samples per thread, digests attached),finishDraw/commitDrawis 79.8 % of the committer's samples inclusive,Graphics::Draw76.1 %,prepareDraw53.4 %,recordPreparedDraw21.8 % andcollectWrites12.2 %; about half the sampled stacks are cut at 64 frames, so inclusive shares are lower bounds. The queue worker shows 95 % busy in every capture, but 53 % of its samples areDrawFinisher::Drainreadingsteady_clock::nowwhile it waits, so that figure overstates its load. GPU busy is 33.8 ms of a 137 ms frame.The work this change removes, counted in separate boots of the same scene (75 s after the player stands still,
APS5_PROFILE_DRAW=1, so counts only, never timing) with a local counter patch that counts thevkCmdBindPipeline(graphics) andvkCmd Set*calls the draw code requests and those actually recorded; the patch is applied identically to both sides and is not part of this PR (diag-base.patch, diag-r1.patch):mainboot 1mainboot 2Per frame that is about 51,000 fewer dynamic state commands (52,794 to 1,785) and 1,600 fewer pipeline binds (2,783 to 1,175). The boots drew 2,827 to 2,853 draws per present; the per-draw rows carry the comparison. Requests fall too because the draw path no longer asks for state a recorded pass already set.
The same boots print the draw committer's cost per commit (
[draw] pipelined (10 s, depth 32): N commits at X us each, one line per 10 s; a commit is one draw or other operation the committer runs from its queue). Over the seven 10 s blocks of the window,mainaveraged 35.4 and 34.4 us per commit (blocks 34.2 to 36.6 us) and this change 33.6 us (blocks 33.2 to 34.2 us), about 1.3 us (3.8 %) less. At about 3,660 commits per present in these boots that is about 4.9 ms per present on the committer, the thread on the critical path (see above).APS5_PROFILE_DRAWadds its own clock reads and turns off the draw finisher handoff, so these are a comparison between builds, not a timing.Summary lines (
tools/trace_digest.pyJSON summary, one per capture, in the order of the table):{"commit":"7383be1a19c7","dirty":false,"env":{"APS5_ADDRESS_COPY_MAX_MIB":"512","APS5_DRAW_PIPELINE":"1","APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"235:30","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.14","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 235:30","first_present":4119,"ms":30086.636},"presents":224,"frame_ms":{"p50":133.016,"p90":138.351,"p99":158.013,"max":202.100},"gpu_busy_ms_per_present":33.796,"worker_busy_pct":{"queue worker 0x0":94.800},"top_phases_ms_per_frame":{"Driver.Packet":120.795,"Graphics.Draw":102.866,"Driver.Packet.draw":91.530,"Driver.Draw":90.928,"Graphics.Draw.draw_and_resource_release":81.126,"Driver.DrawFinish":78.517,"Driver.Draw.prepare":71.069,"Driver.DrawFinish.shader_compile_and_link":43.331},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.091,"events_lost":1299839,"totals_full":false},"draw committer":{"events_full_after_s":10.820,"events_lost":467099,"totals_full":false},"draw finisher":{"events_full_after_s":12.816,"events_lost":349882,"totals_full":false}},"trace":"aps5-trace-7383be1a19c7-24960.json.gz"} {"commit":"86104970d79d","dirty":false,"env":{"APS5_ADDRESS_COPY_MAX_MIB":"512","APS5_DRAW_PIPELINE":"1","APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"235:30","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.14","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 235:30","first_present":4130,"ms":30099.117},"presents":220,"frame_ms":{"p50":133.579,"p90":145.444,"p99":200.923,"max":238.815},"gpu_busy_ms_per_present":34.000,"worker_busy_pct":{"queue worker 0x0":95.234},"top_phases_ms_per_frame":{"Driver.Packet":123.564,"Graphics.Draw":104.735,"Driver.Packet.draw":92.702,"Driver.Draw":92.113,"Graphics.Draw.draw_and_resource_release":82.199,"Driver.DrawFinish":79.021,"Driver.Draw.prepare":71.963,"Driver.DrawFinish.shader_compile_and_link":44.731},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.137,"events_lost":1250287,"totals_full":false},"draw committer":{"events_full_after_s":11.251,"events_lost":432802,"totals_full":false},"draw finisher":{"events_full_after_s":13.065,"events_lost":339709,"totals_full":false}},"trace":"aps5-trace-86104970d79d-10600.json.gz"} {"commit":"7383be1a19c7","dirty":false,"env":{"APS5_ADDRESS_COPY_MAX_MIB":"512","APS5_DRAW_PIPELINE":"1","APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"235:30","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.14","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 235:30","first_present":4079,"ms":30007.194},"presents":216,"frame_ms":{"p50":138.524,"p90":145.591,"p99":162.078,"max":194.210},"gpu_busy_ms_per_present":33.771,"worker_busy_pct":{"queue worker 0x0":95.238},"top_phases_ms_per_frame":{"Driver.Packet":124.735,"Graphics.Draw":107.107,"Driver.Packet.draw":94.222,"Driver.Draw":93.599,"Graphics.Draw.draw_and_resource_release":84.117,"Driver.DrawFinish":79.620,"Driver.Draw.prepare":72.851,"Driver.DrawFinish.shader_compile_and_link":45.859},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.923,"events_lost":1302401,"totals_full":false},"draw committer":{"events_full_after_s":10.599,"events_lost":475399,"totals_full":false},"draw finisher":{"events_full_after_s":11.773,"events_lost":393890,"totals_full":false}},"trace":"aps5-trace-7383be1a19c7-13360.json.gz"} {"commit":"86104970d79d","dirty":false,"env":{"APS5_ADDRESS_COPY_MAX_MIB":"512","APS5_DRAW_PIPELINE":"1","APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"235:30","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.14","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 235:30","first_present":4124,"ms":30103.471},"presents":227,"frame_ms":{"p50":131.048,"p90":137.280,"p99":168.750,"max":195.476},"gpu_busy_ms_per_present":34.068,"worker_busy_pct":{"queue worker 0x0":94.820},"top_phases_ms_per_frame":{"Driver.Packet":119.044,"Graphics.Draw":101.151,"Driver.Packet.draw":89.227,"Driver.Draw":88.637,"Graphics.Draw.draw_and_resource_release":79.489,"Driver.DrawFinish":76.272,"Driver.Draw.prepare":68.730,"Driver.DrawFinish.shader_compile_and_link":43.289},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.191,"events_lost":1248477,"totals_full":false},"draw committer":{"events_full_after_s":11.307,"events_lost":435802,"totals_full":false},"draw finisher":{"events_full_after_s":13.274,"events_lost":332110,"totals_full":false}},"trace":"aps5-trace-86104970d79d-19600.json.gz"}Traces: main, pair 1 aps5-trace-7383be1a19c7-24960.json.gz, change, pair 1 aps5-trace-86104970d79d-10600.json.gz, main, pair 2 aps5-trace-7383be1a19c7-13360.json.gz, change, pair 2 aps5-trace-86104970d79d-19600.json.gz. Counter lines: counters-base.txt, counters-base2.txt, counters-cand.txt.
tools/performance_compare.pyoutput per pair: pair 1, pair 2.tools/trace_digest.pyoutput per capture: main, pair 1, change, pair 1, main, pair 2, change, pair 2.Deviations from the Performance report form, the same in every capture (deviations.txt, environment per capture in the
*-env.txtfiles):APS5_ADDRESS_COPY_MAX_MIB=512,APS5_NO_PAD_INPUT=1,APS5_LOG_TIMESTAMPS=1andAPS5_TRACE_SUMMARY_EVERY=10.APS5_DUMP_FRAMES=80,APS5_DUMP_FRAMES_EVERY=300) let the script see the menus and check the view; the log is redirected to a file the script reads.ANYPS5_SHADER_CACHE_DIR,__GL_SHADER_DISK_CACHE_PATH).trace_dropped), so slice counts are partial; the summary totals are complete.maincapture ran at 21:09 and the other three at 21:16 to 21:31, with one killed boot between them that was not kept.Host: AMD Ryzen 7 5800X (16 threads), 32 GB, NVIDIA GeForce RTX 3080 (driver 621.14, Vulkan 1.4.357), Windows 10.0.26220, desktop on AC power with the High performance scheme, display 2560x1440 at 179 Hz; the title renders 3840x2160 (host-report.txt). That is the host of the older pairs and the counter boots above. Since then Resizable BAR is on (BAR1 16384 MiB, VBIOS 94.02.27.00.09), Windows is build 26320 and Defender excludes the build, tool and capture folders; the driver is still 621.14. The replay measurement and the stacked boots ran on that host.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code