Skip to content

perf(shader): cache BDA ranges in span reads - #14260

Draft
kiansaeidnia wants to merge 1 commit into
boykopovar:mainfrom
kiansaeidnia:perf/bda-range-cache
Draft

kiansaeidnia wants to merge 1 commit into
boykopovar:mainfrom
kiansaeidnia:perf/bda-range-cache

Conversation

@kiansaeidnia

@kiansaeidnia kiansaeidnia commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Draft: not ready for review yet. The change and the results below are real; the open items are listed at the end of this section.

Address-based (BDA) span reads walk the BDA table (probe_bda_pointer) on every access. A program that runs as one wave pays every walk on its critical path, because nothing else is resident to hide the latency. In Ghost of Yotei's opening cinematic, the single-wave program 0x807b90a100 spends 94 % of its time in a triangle loop of six runtime-format buffer loads. Shader-clock instrumentation of that loop shows the table walk is about a third of each load (~2,950 of ~8,400 cycles); the data load itself is ~220 cycles.

Each invocation now keeps the last four ranges its span reads found, as (begin, bound, device base) entries.

  • A read inside one of them translates directly.
  • A miss walks the table with the existing range-returning lookup (bda_anchor_range, with the same checks as the probe) and replaces the oldest entry with the range it finds.
  • A kept range ends at the next range's start, which is the first address the walk would resolve elsewhere, so a hit resolves exactly as the walk would.
  • An unmapped span still returns 0 and takes the same fault path as before.

The entries are separate variables indexed only by constants. A first version indexed 16 slots by pc; its dynamically indexed array added 512 bytes of local memory per thread on NVIDIA, and that showed up as 270 MB more VRAM in the frame replay. The four-entry version adds 176 bytes and about 40 MB.

APS5_NO_BDA_RANGE_CACHE=1 walks the table for every read, as before.

Still to do before this is ready:

  • A main-vs-PR summary from the same machine and scene. Ghost of Yotei only runs on the Celegans12 yotei/best fork, so the in-game numbers below come from that fork, not from main. I still need a title or homebrew that runs on main and exercises address-based span reads.
  • The replay and in-game tables were measured on the first (pc-indexed) version, or alongside a separate ballot change. They need repeating with exactly this commit.
  • fix(shader): mask writes after barrier-safe BDA faults #7392 edits the same span-read function (BdaSpanReadResultType and the stop handling) for a different purpose, masking writes after faults. Whichever lands second needs a rebase.

Overlap: the pr-overlap bot could not compare 54 open PRs that conflict with main, so I reviewed them by hand.

Tested

Windows 11 Pro 10.0.26200, RTX 3080 Ti, NVIDIA 616.92.

  • New agc_driver_bda_range_cache test. Eight loads over five guest blocks: A, A again (a hit), then B, C and D (misses), E (evicts A), A (evicts B) and B. It runs on wave32, wave64 and split wave64, with and without glc, and also passes with APS5_NO_BDA_RANGE_CACHE=1.

  • Focused tests on this branch rebased onto main 6fe120d, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (ctest -R "bda_range_cache|bda_span_reads|bda_anchor_reads|bda_device|global_loads|gpu_buffer_format|buffer_format|descriptor_web_faults|buffer_load_store" -V):

    • main: 15/15 passed.
    • This PR: 16/16 passed (the same 15 plus the new test).
    • Neither log has a VUID- line or a missing-layer message.
  • spirv-val --target-env vulkan1.3 passes for the five largest captured Ghost of Yotei programs (on the earlier base).

  • Frame replay (agc_frame_replay, exact mode) of a captured cinematic frame, alternating runs with the cache off and on. These runs used the first, pc-indexed version; the four-entry version gives 0x807b90a100 122.5 ms in the same replay. Output buffers are byte-identical in every run.

    Cache off Cache on
    0x807b90a100 174.7, 172.1 ms 120.7, 120.8 ms (−30 %)
    0x801edd2700 162, 176 ms 114, 120 ms (−30 %)
    All timed GPU work 678, 629 ms 576, 591 ms

    Shader-clock cycles of 0x807b90a100 and 0x807b925400 drop 34 % with the first version. With four entries, 1 of 42,846 reads walks the table.

  • In game, Ghost of Yotei (PPSA26344), on the yotei/best fork's runtime (see above). The change build also carried a spanned-ballot change that measured −1 to −6 % on these programs. Warm shader cache, tools/trace_digest.py of aps5-summary.jsonl:

    Without With
    Logo screens, presents per 10 s (p50) 70 (143 ms) 78 (129 ms)
    Opening cinematic, presents per 10 s 3.2–4.4 (5 runs) 4.95
    GPU busy per present in the cinematic 1,251–1,685 ms 959 ms
    0x807b90a100 / 0x807b925400 / 0x801edd2700 per run 155 / 129 / 20 ms 87 / 73 / 11 ms

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 3080 Ti, driver 616.92, Windows 11 Pro 10.0.26200
  • AI-assisted: yes

🤖 Generated with Claude Code

A span read walked the BDA table for every access. Single-wave
address-based programs pay that walk on their critical path: in Ghost of
Yotei's opening cinematic, 0x807b90a100 spends 94 % of its time in a
triangle loop of six runtime-format buffer loads, and the walk was about
a third of each load.

Each invocation now keeps the last four ranges its span reads found. A
read inside one of them translates directly; a miss walks the table with
the range-returning lookup and replaces the oldest entry with the range
it finds. A kept range ends at the next range's start, so a hit resolves
exactly as the walk would. The entries are separate variables indexed by
constants, which keeps their local-memory footprint small.

APS5_NO_BDA_RANGE_CACHE=1 walks the table for every read, as before.

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 Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

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.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 28240 docs/dev/ENVIRONMENT.md L321
PR 28765 docs/dev/ENVIRONMENT.md L321

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 1896 docs/dev/ENVIRONMENT.md
PR 4472 docs/dev/ENVIRONMENT.md
PR 6186 docs/dev/ENVIRONMENT.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 7275 docs/dev/ENVIRONMENT.md
PR 7392 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 7642 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 8246 docs/dev/ENVIRONMENT.md
PR 9289 docs/dev/ENVIRONMENT.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 9387 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 9508 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 9712 docs/dev/ENVIRONMENT.md
PR 9790 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 9852 docs/dev/ENVIRONMENT.md
PR 9969 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 10193 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11483 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 12324 docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 12944 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 13809 docs/dev/ENVIRONMENT.md
PR 13863 docs/dev/ENVIRONMENT.md
PR 13920 docs/dev/ENVIRONMENT.md
PR 13928 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 13929 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 15343 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 15456 docs/dev/ENVIRONMENT.md
PR 15548 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 15555 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 15570 docs/dev/ENVIRONMENT.md
PR 16217 docs/dev/ENVIRONMENT.md
PR 16372 docs/dev/ENVIRONMENT.md
PR 16571 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 16793 docs/dev/ENVIRONMENT.md
PR 16953 docs/dev/ENVIRONMENT.md
PR 17056 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 17259 docs/dev/ENVIRONMENT.md
PR 17611 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 17719 docs/dev/ENVIRONMENT.md
PR 17729 docs/dev/ENVIRONMENT.md
PR 17943 docs/dev/ENVIRONMENT.md
PR 18029 docs/dev/ENVIRONMENT.md
PR 18082 docs/dev/ENVIRONMENT.md
PR 18106 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 18107 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 18173 docs/dev/ENVIRONMENT.md
PR 18226 docs/dev/ENVIRONMENT.md
PR 18829 docs/dev/ENVIRONMENT.md
PR 20041 docs/dev/ENVIRONMENT.md
PR 20172 docs/dev/ENVIRONMENT.md
PR 20248 docs/dev/ENVIRONMENT.md
PR 20518 docs/dev/ENVIRONMENT.md
PR 21211 docs/dev/ENVIRONMENT.md
PR 22071 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 22424 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 22434 docs/dev/ENVIRONMENT.md
PR 22439 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 22546 docs/dev/ENVIRONMENT.md
PR 22647 docs/dev/ENVIRONMENT.md
PR 22697 docs/dev/ENVIRONMENT.md
PR 23596 docs/dev/ENVIRONMENT.md
PR 23811 docs/dev/ENVIRONMENT.md
PR 23975 docs/dev/ENVIRONMENT.md
PR 24661 docs/dev/ENVIRONMENT.md
PR 24714 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 26101 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 26686 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 27133 docs/dev/ENVIRONMENT.md
PR 27864 docs/dev/ENVIRONMENT.md
PR 28142 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 28150 docs/dev/ENVIRONMENT.md
PR 28372 docs/dev/ENVIRONMENT.md
PR 28384 docs/dev/ENVIRONMENT.md
PR 28387 docs/dev/ENVIRONMENT.md
PR 28391 docs/dev/ENVIRONMENT.md
PR 28469 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 28470 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 28487 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 28488 docs/dev/ENVIRONMENT.md
PR 28586 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 28590 docs/dev/ENVIRONMENT.md
PR 28668 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 28673 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 28738 docs/dev/ENVIRONMENT.md
PR 28786 docs/dev/ENVIRONMENT.md
PR 28787 docs/dev/ENVIRONMENT.md
PR 28808 docs/dev/ENVIRONMENT.md
PR 29038 docs/dev/ENVIRONMENT.md
PR 29042 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29066 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29067 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29076 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29084 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29087 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29089 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29095 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29101 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29103 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29104 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29105 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29106 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29107 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29118 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29119 docs/dev/ENVIRONMENT.md
PR 29120 docs/dev/ENVIRONMENT.md
PR 29121 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 29123 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Nov 1, 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.

Marked draft, so this is early feedback. The idea is sound for a single-wave loop of dependent loads, where the table walk is on the critical path. The cost lands on every shader with address-based span reads.

1. Local memory per thread is added to every program with a span read. Four (begin, bound, base) entries are 176 bytes per invocation, and the description's own first attempt showed what that costs: 270 MB more VRAM in the frame replay, and about 40 MB for the four-entry version. On NVIDIA that is also register or local-memory pressure for every wave, which lowers occupancy for programs that have many waves resident and do not need the cache. The win quoted is for a program that runs as one wave. Please apply the cache only where it can pay: a span read inside a loop, or a program whose launch is a single wave, and keep the table walk for the rest. Report the register or local-memory change for the largest captured programs from the replay.

2. The hit rate is not shown. Eight loads over five blocks test correctness. What decides the value is how often a real shader's reads hit one of four ranges. Please add hit and miss counters under the existing APS5_NO_BDA_RANGE_CACHE switch and report the ratio for the Yotei program and for two more titles. A 4-entry cache with oldest-replacement thrashes on a loop that cycles through five buffers.

3. Misses cost more than before. Each miss is a walk plus a replace, where before it was a walk. For a program with a low hit rate this is a regression. Show the replay time with the cache on and off for a program with scattered reads.

4. The numbers are on a different tree. The in-game table comes from the Celegans12 fork and the first version of the change, as the open items say. For the evidence to be usable, rerun it on exactly this commit, and on main for at least one title that runs there.

@VicRaster

Copy link
Copy Markdown
Contributor

There is a correctness issue to address before promoting this cache: a cached guest range can include addresses whose physical translation overflows. I rechecked current head 8630fa906d675132ad2741f997c275edb36434f9.

DefineBdaLookup(..., rangeResult=true) checks overflow for the initial request, but returns the entire guest (begin, bound, base) range. EmitCachedBdaTranslation subsequently checks guest containment and guest-end overflow, then returns base + (address - begin) without repeating the physical overflow checks. A valid first read can therefore warm a range that admits a later wrapping physical address.

The local correction bounds the cached extent by physical capacity:

safeBound = begin + min(bound - begin, UINT64_MAX - base)

This is conservative and retains the existing exclusive-end overflow rule. Requests outside that safe interval miss and take the original checked lookup/fault path.

The synthetic regression below performs two reads from an oversized table entry: the first is valid and warms the cache; the second wraps the translated device address. Both the uncached baseline and corrected cache preserve the first result, return zero for the second, and record Overflow, for coherent and noncoherent reads. The uncorrected malformed GPU access was not executed: the defect is established by source reasoning, supported by baseline/corrected regression results, not an observed crash. Fifteen focused BDA/buffer GPU tests passed on the corrected experimental stack with Vulkan required, shader cache disabled and validation enabled; no VUID or missing layer was observed. Current-main integration still needs qualification.

Separately, the cache did not establish a repeatable performance win on our stationary five-frame GTA V replay. On Ryzen 9 3900X / RTX 3080 Ti / NVIDIA 610.88 / Windows / GCC 15.2 Release / SPIRV-Tools OFF, using the same archived integrated base 214c012afcd5c156ddf65a45ae04ede695d6f72c and warmed caches:

Variant Matched runs Dominant dispatch mean (range), ms
Baseline 3 195.32 (186.81–200.08)
Four entries, with bound correction 3 187.98 (186.72–188.85)
One entry, with bound correction 2 186.97 (185.52–188.41)

An unchanged run was as fast as the cache variants; clocks were monitored but not locked. One additional cache run needed an extra real memory restore and was excluded from matched timing, retained for correctness. Matched runs had exact three-buffer replay images and no failed/stale registrations, skipped mappings, unfinished submissions, pacing timeouts or synthesised waits; existing packet-wait/prebuild/pending-image warnings remained. This is exploratory replay evidence, not a current-main performance report or live-game speedup.

Below are only our bound correction and synthetic regression, not a republication of the PR's implementation. The patch is against our archived integration and needs porting/retesting on the final PR composition. The input tables and expected values are synthetic; no GTA V code, shader, memory, image or log is included. AI-assisted investigation/code, built and checked locally.

Physical-capacity correction and synthetic two-read regression
diff --git a/core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp b/core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
index 8682643..fe0f7a9 100644
--- a/core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
+++ b/core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
@@ -129,8 +129,11 @@ std::uint32_t DefineBdaLookup(SpirvEmitterState& state, const char* name, bool r
         const auto last = binary(spv::OpUGreaterThanEqual, boolean, index, count);
         const auto next = BdaLoadAddress(state, binary(spv::OpIAdd, u32, constant(4), binary(spv::OpIMul, u32, Select(state, u32, last, binary(spv::OpISub, u32, index, constant(1)), index), constant(8))));
         const auto bound = Select(state, u64, binary(spv::OpLogicalOr, boolean, last, binary(spv::OpULessThan, boolean, finish, next)), finish, next);
+        const auto extent = binary(spv::OpISub, u64, bound, begin);
+        const auto capacity = binary(spv::OpISub, u64, BdaConstant(state, ~std::uint64_t{0}), base);
+        const auto safeBound = binary(spv::OpIAdd, u64, begin, Select(state, u64, binary(spv::OpULessThan, boolean, capacity, extent), capacity, extent));
         const auto range = state.module.AllocateId();
-        state.module.AddFunction(spv::OpCompositeConstruct, rangeType, range, begin, bound, base);
+        state.module.AddFunction(spv::OpCompositeConstruct, rangeType, range, begin, safeBound, base);
         leave(range);
     } else {
         leave(result);
diff --git a/core/libs/prx/libSceAgcDriver/tests/BdaExecution.cpp b/core/libs/prx/libSceAgcDriver/tests/BdaExecution.cpp
index b596aae..a7b0c6e 100644
--- a/core/libs/prx/libSceAgcDriver/tests/BdaExecution.cpp
+++ b/core/libs/prx/libSceAgcDriver/tests/BdaExecution.cpp
@@ -519,6 +519,27 @@ void RunBdaExecutionTests(const Context& context) {
             span(4, -8, 0b0001u, coherent, stops, {0, 0, 0, 0}, Abi::FaultReason::Overflow, 4, 0);
         }
     }
+    {
+        constexpr std::uint64_t firstGuest = 0x1000;
+        const auto secondGuest = firstGuest - wide.DeviceAddress() + 16u;
+        const Abi::Header header{Abi::Version, 1, sizeof(Abi::Range), 0};
+        const Abi::Range range{firstGuest, std::numeric_limits<std::uint64_t>::max(), wide.DeviceAddress(), Abi::Read, 0};
+        Buffer overflowTable(context, sizeof(header) + sizeof(range), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT);
+        std::memcpy(overflowTable.Bytes().data(), &header, sizeof(header));
+        std::memcpy(overflowTable.Bytes().data() + sizeof(header), &range, sizeof(range));
+        for (const bool coherent : {false, true}) {
+            std::memset(fault.Bytes().data(), 0, fault.Bytes().size());
+            std::memset(words.Bytes().data(), 0xcd, words.Bytes().size());
+            Pipeline pipeline(context, MakeBdaSpanSequenceTestShader(firstGuest, secondGuest, coherent), {&overflowTable, &fault, &words});
+            pipeline.Run(1);
+            Abi::Fault report{};
+            std::array<std::uint32_t, 2> result{};
+            std::memcpy(&report, fault.Bytes().data(), sizeof(report));
+            std::memcpy(result.data(), words.Bytes().data(), sizeof(result));
+            Require(result[0] == at(0) && result[1] == 0, "a warmed BDA span lookup lost its valid read or failed to reject device-address overflow");
+            Require(report.state == Abi::FaultState::Ready && report.reason == Abi::FaultReason::Overflow && report.address == secondGuest, "a warmed BDA span lookup did not retain device-address overflow reporting");
+        }
+    }
     ranges[0].permissions = 0;
     run(guest, 8, 0, Abi::FaultReason::Permission);
     const auto sequence = [&](std::initializer_list<Abi::FaultReason> reasons, Abi::FaultReason recorded, std::uint32_t otherFaults) {
diff --git a/core/libs/prx/libSceAgcDriver/tests/BdaShader.cpp b/core/libs/prx/libSceAgcDriver/tests/BdaShader.cpp
index 955969b..59ff8b1 100644
--- a/core/libs/prx/libSceAgcDriver/tests/BdaShader.cpp
+++ b/core/libs/prx/libSceAgcDriver/tests/BdaShader.cpp
@@ -87,6 +87,15 @@ std::vector<std::uint32_t> MakeBdaSpanReadTestShader(std::uint64_t address, std:
     }, extracted);
 }
 
+std::vector<std::uint32_t> MakeBdaSpanSequenceTestShader(std::uint64_t first, std::uint64_t second, bool coherent) {
+    using namespace ShaderRecompiler;
+    return MakeShader(first, coherent, false, [&](SpirvValueEmitContext& ctx, const IrValue& instruction, std::uint32_t base) {
+        const auto initial = EmitBdaDwordReads(ctx, instruction, base, 0u, 4u);
+        const auto next = EmitBdaDwordReads(ctx, instruction, BdaConstant(ctx.state, second), 0u, 4u);
+        return std::vector<std::uint32_t>{initial[0], next[0]};
+    }, 1u);
+}
+
 std::vector<std::uint32_t> MakeBdaDwordWriteTestShader(std::uint64_t address, std::uint32_t dwords, const std::uint32_t* values) {
     using namespace ShaderRecompiler;
     return MakeShader(address, false, true, [&](SpirvValueEmitContext& ctx, const IrValue& instruction, std::uint32_t base) {
diff --git a/core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp b/core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp
index 31c068d..73fe98e 100644
--- a/core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp
+++ b/core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp
@@ -10,6 +10,7 @@
 std::vector<std::uint32_t> MakeBdaTestShader(std::uint64_t address, std::uint32_t bits, std::int64_t offset = 0);
 std::vector<std::uint32_t> MakeBdaDwordReadTestShader(std::uint64_t address, std::uint32_t dwords, bool coherent, bool stops);
 std::vector<std::uint32_t> MakeBdaSpanReadTestShader(std::uint64_t address, std::uint32_t offset, std::uint32_t extracted, bool coherent, bool stops);
+std::vector<std::uint32_t> MakeBdaSpanSequenceTestShader(std::uint64_t first, std::uint64_t second, bool coherent);
 std::vector<std::uint32_t> MakeBdaFaultSequenceTestShader(std::initializer_list<ShaderRecompiler::BdaAbi::FaultReason> reasons);
 std::vector<std::uint32_t> MakeBdaDwordWriteTestShader(std::uint64_t address, std::uint32_t dwords, const std::uint32_t* values);
 std::vector<std::uint32_t> MakeBdaStoreTestShader(std::uint64_t address, std::uint32_t value, std::uint32_t bits, bool coherent);

@shahulmubeen-a

Copy link
Copy Markdown
Contributor

Windows data point for this PR, from Ghost of Yōtei 02.002 (PPSA26344) at HOME on an RTX 4070 Ti SUPER (driver 610.88).

Setup

  • Build: a yotei/best-based fork build (porter/best1103-hull, 385463f), not main.
  • 8630fa9 cherry-picks onto it cleanly, and agc_driver_bda_range_cache passes there.
  • Method: a 3-frame APS5_FRAME_CAPTURE of HOME, replayed through agc_frame_replay with the title's switches and APS5_PROFILE_GPU=1.
    • A is the build as is. B is the same build plus this PR.
    • Runs alternated (A, B, A, B, A, B), and B's shader cache was warmed first.
  • On that fork the replay stops completing after the first frame, so each number is frame 1 of one run.

Result: GPU busy for the frame (union of both lanes) went from 104.2 / 104.0 / 103.6 ms to 88.9 / 88.7 / 88.4 ms, -14.7 %.

program span reads A (ms) B (ms) change
0x8000193900 (x7) 150, address-based 16.7 / 16.6 / 16.6 9.1 / 9.0 / 9.0 -45.7 %
0x80001aa100 (x24) 87, address-based 10.4 / 10.4 / 10.4 8.2 / 8.0 / 8.1 -22.1 %
0x80001c0300 (x4) 150, address-based 8.3 / 8.1 / 8.1 6.8 / 6.7 / 6.4 -18.8 %
0x800019ee00 (x11) 150, address-based 5.7 / 5.8 / 5.7 4.7 / 4.7 / 4.7 -18.0 %
0x801f808700 375, runtime V#s 4.6 / 4.6 / 4.6 3.1 / 3.1 / 3.1 -32.6 %
0x801f64cc00 447, runtime V#s 2.3 / 2.3 / 2.4 1.6 / 1.6 / 1.6 -31.4 %
0x800033ef00 36 2.8 / 2.5 / 2.3 3.0 / 3.1 / 3.1 +21 %
0x801f6d2900, 0x80628b1b00, 0x801fa1ba00 none — — -2.1 %, -5.3 %, +2.1 %

How the columns were counted

  • Span reads are the OpFunctionCalls of read_bda_span in the program's SPIR-V, from agc_shader_replay --spv of the dumped request.
  • "Address-based" and "runtime V#s" come from APS5_TRACE_BDA=1. The two 0x801f… programs show no address accesses, so all of their span reads go through runtime V#s.

Notes

  • 0x800033ef00 is the one program with span reads that got slower: 1800 code words, 36 span reads, wave64. It may be worth a look for the miss path's cost.
  • 0x8020740d00 has no span reads, yet went from 1.9 to 1.5 ms in all three pairs. I can't explain that one.
  • In the game, HOME is not GPU-bound on this build: GPU busy is about 42 % of the wall time, and the CPU-side draw committer sets the frame time. So I did not measure an in-game fps change.
  • Not covered: main, other GPUs, Linux.

Written by Claude Code, verified by me.

@shahulmubeen-a

Copy link
Copy Markdown
Contributor

Main-vs-PR captures for this PR, as the perf label asks. Title: Ghost of Yōtei 02.002 (PPSA26344) at the title menu. Machine: Windows, RTX 4070 Ti SUPER (driver 610.88), Ryzen 9 7950X. Result: no change. Frame times and GPU busy time are the same within the run spread.

Setup

  • Baseline: this PR's base, 6fe120d (main on 11-01). Candidate: this PR's head, 8630fa9. Both are Release builds with GCC 15.2 from the same worktree.
  • The PR changes only the SPIR-V backend, so the two arms differ only in libSceAgcDriver.prx. The shader cache's source version confirms which driver ran: 0976ceaf6ce7abe6 for the baseline, 294234c6703c1f6f for the candidate.
  • Why not current main: on main 85e291c (11-06), this title stops during boot in 3 of 3 runs, after [gpu] rejected submission of 552 dwords and AGC driver: unsupported PM4 packet type. The PR base boots normally. That is a separate problem.
  • Scene: the title menu with the pre-order bonus notice open, with no pad input (APS5_NO_PAD_INPUT=1), at 1920x1080. It is the title menu rather than gameplay because the world did not load on main for this title when I last tried (11-02).
  • The game executable is the same in both arms. It has a local patch that fixes the render resolution at 1080p.
  • Warm caches: each arm has its own shader cache directory. One cold run per arm sat at the menu until the cache stopped compiling.
  • Six captures, alternating A, B, A, B, A, B, each a fresh start.
    • Switches: APS5_TRACE_SECONDS=240:60, plus APS5_TRACE_DIR for the output folder. No other APS5_TRACE_* or APS5_PROFILE_* switch.
    • The log was not redirected.

Results

# arm commit presents in 60 s p50 p90 p99 max GPU busy per present queue worker 0x0 busy
1 A1 (attached) 6fe120d 187 321.8 326.5 335.0 338.7 90.1 96.7 %
2 B1 8630fa9 185 324.3 330.4 335.1 336.9 89.9 96.8 %
3 A2 6fe120d 187 321.1 326.9 346.7 347.5 90.7 96.6 %
4 B2 8630fa9 189 318.9 325.0 332.1 336.2 90.7 96.7 %
5 A3 6fe120d 186 324.0 331.1 336.2 338.0 90.0 96.6 %
6 B3 (attached) 8630fa9 186 322.3 330.1 342.6 347.8 90.2 96.7 %

Frame times and GPU busy time are in ms.

A mean [range] B mean [range] B vs A
presents 186.7 [186.0-187.0] 186.7 [185.0-189.0] +0.0 %
frame p50 322.3 [321.1-324.0] 321.9 [318.9-324.3] -0.1 %
frame p90 328.2 [326.5-331.1] 328.5 [325.0-330.4] +0.1 %
frame p99 339.3 [335.0-346.7] 336.6 [332.1-342.6] -0.8 %
GPU busy per present 90.3 [90.0-90.7] 90.3 [89.9-90.7] -0.0 %

What it shows

  • This scene is CPU-bound. Queue worker 0x0 is about 97 % busy and the draw committer about 56 %. The GPU is busy about 90 ms of a 322 ms frame, so a GPU saving could not shorten the frame here.
  • The GPU busy time itself is the same in both arms (90.3 ms per present). The menu's GPU work does not show a measurable effect of the range cache, in either direction.
  • So this capture shows the PR is neutral on main for this scene. It does not show a speed-up. The GPU effect I measured earlier in this thread was at HOME in gameplay, by frame replay on a fork build: -14.7 % GPU busy per frame.

Notes on the summary lines

  • dirty is null in all six lines. The worktree's submodules are directory junctions, so the build's git status fails. The tracked files were unmodified: git status --ignore-submodules=all printed nothing.
  • trace_dropped is true in all six lines. Queue worker 0x0 filled its event buffer after about 46 s of the 60 s window, and 78k-87k events were lost. The phase totals are complete (totals_full: false). I kept the default buffer because the form asks for no other APS5_TRACE_* switch.
  • Attached: the traces of A1 (aps5-trace-6fe120d11ba3-34060.json.gz) and B3 (aps5-trace-8630fa906d67-37604.json.gz). Each is the run with its arm's median p50.
The six aps5-summary.jsonl lines
{"commit":"6fe120d11ba3","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1387,"ms":60166.650},"presents":187,"frame_ms":{"p50":321.824,"p90":326.495,"p99":335.027,"max":338.747},"gpu_busy_ms_per_present":90.061,"worker_busy_pct":{"queue worker 0x0":96.671,"queue worker 0x52":33.967,"queue worker 0x53":31.784,"queue worker 0x20":35.773,"queue worker 0x30":40.473,"queue worker 0x38":45.667,"queue worker 0x48":1.191,"queue worker 0x51":1.310,"queue worker 0x50":62.878},"top_phases_ms_per_frame":{"Driver.Packet":1121.542,"Driver.Packet.memory_wait":660.508,"Driver.Packet.dispatch":212.554,"Resources.Complete":180.566,"Graphics.Draw":179.558,"Graphics.Draw.draw_and_resource_release":176.793,"Driver.Dispatch":164.342,"Driver.Packet.draw":52.194},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.794,"events_lost":81364,"totals_full":false}},"trace":"aps5-trace-6fe120d11ba3-34060.json.gz"}
{"commit":"8630fa906d67","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1343,"ms":60009.974},"presents":185,"frame_ms":{"p50":324.331,"p90":330.381,"p99":335.097,"max":336.853},"gpu_busy_ms_per_present":89.859,"worker_busy_pct":{"queue worker 0x0":96.785,"queue worker 0x52":33.650,"queue worker 0x20":35.554,"queue worker 0x53":31.557,"queue worker 0x30":40.193,"queue worker 0x38":45.395,"queue worker 0x48":1.147,"queue worker 0x51":1.293,"queue worker 0x50":63.137},"top_phases_ms_per_frame":{"Driver.Packet":1127.153,"Driver.Packet.memory_wait":663.787,"Driver.Packet.dispatch":212.083,"Resources.Complete":183.182,"Graphics.Draw":182.223,"Graphics.Draw.draw_and_resource_release":179.480,"Driver.Dispatch":164.854,"Driver.Packet.draw":52.399},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":46.126,"events_lost":77739,"totals_full":false}},"trace":"aps5-trace-8630fa906d67-34464.json.gz"}
{"commit":"6fe120d11ba3","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1398,"ms":60130.866},"presents":187,"frame_ms":{"p50":321.126,"p90":326.889,"p99":346.701,"max":347.475},"gpu_busy_ms_per_present":90.701,"worker_busy_pct":{"queue worker 0x0":96.593,"queue worker 0x52":33.801,"queue worker 0x20":35.752,"queue worker 0x53":31.771,"queue worker 0x30":40.360,"queue worker 0x38":45.315,"queue worker 0x48":1.273,"queue worker 0x51":1.312,"queue worker 0x50":63.041},"top_phases_ms_per_frame":{"Driver.Packet":1119.885,"Driver.Packet.memory_wait":658.775,"Driver.Packet.dispatch":213.079,"Resources.Complete":180.662,"Graphics.Draw":179.580,"Graphics.Draw.draw_and_resource_release":176.887,"Driver.Dispatch":164.757,"Driver.Packet.draw":52.504},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.687,"events_lost":82546,"totals_full":false}},"trace":"aps5-trace-6fe120d11ba3-27644.json.gz"}
{"commit":"8630fa906d67","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1386,"ms":60274.939},"presents":189,"frame_ms":{"p50":318.912,"p90":325.006,"p99":332.092,"max":336.177},"gpu_busy_ms_per_present":90.703,"worker_busy_pct":{"queue worker 0x0":96.671,"queue worker 0x20":36.096,"queue worker 0x52":34.033,"queue worker 0x53":31.885,"queue worker 0x38":45.813,"queue worker 0x30":40.728,"queue worker 0x48":1.289,"queue worker 0x51":1.323,"queue worker 0x50":62.615},"top_phases_ms_per_frame":{"Driver.Packet":1114.337,"Driver.Packet.memory_wait":654.282,"Driver.Packet.dispatch":213.421,"Resources.Complete":178.986,"Graphics.Draw":178.035,"Graphics.Draw.draw_and_resource_release":175.314,"Driver.Dispatch":164.349,"Driver.Packet.draw":53.002},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.111,"events_lost":86818,"totals_full":false}},"trace":"aps5-trace-8630fa906d67-18544.json.gz"}
{"commit":"6fe120d11ba3","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1394,"ms":60300.546},"presents":186,"frame_ms":{"p50":323.971,"p90":331.144,"p99":336.171,"max":338.000},"gpu_busy_ms_per_present":90.021,"worker_busy_pct":{"queue worker 0x0":96.628,"queue worker 0x52":33.659,"queue worker 0x53":31.692,"queue worker 0x20":35.579,"queue worker 0x30":40.042,"queue worker 0x38":44.840,"queue worker 0x48":1.154,"queue worker 0x51":1.302,"queue worker 0x50":63.359},"top_phases_ms_per_frame":{"Driver.Packet":1126.398,"Driver.Packet.memory_wait":661.556,"Driver.Packet.dispatch":212.043,"Graphics.Draw":182.212,"Resources.Complete":181.456,"Graphics.Draw.draw_and_resource_release":179.419,"Driver.Dispatch":165.233,"Driver.Packet.draw":53.112},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.743,"events_lost":82645,"totals_full":false}},"trace":"aps5-trace-6fe120d11ba3-33744.json.gz"}
{"commit":"8630fa906d67","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1396,"ms":60118.920},"presents":186,"frame_ms":{"p50":322.310,"p90":330.087,"p99":342.600,"max":347.835},"gpu_busy_ms_per_present":90.219,"worker_busy_pct":{"queue worker 0x0":96.741,"queue worker 0x20":36.335,"queue worker 0x52":34.377,"queue worker 0x53":32.314,"queue worker 0x30":40.941,"queue worker 0x38":45.650,"queue worker 0x48":1.235,"queue worker 0x51":1.298,"queue worker 0x50":62.576},"top_phases_ms_per_frame":{"Driver.Packet":1133.567,"Driver.Packet.memory_wait":667.210,"Driver.Packet.dispatch":215.370,"Resources.Complete":180.292,"Graphics.Draw":179.887,"Graphics.Draw.draw_and_resource_release":177.120,"Driver.Dispatch":167.015,"Driver.Packet.draw":53.563},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.875,"events_lost":80491,"totals_full":false}},"trace":"aps5-trace-8630fa906d67-37604.json.gz"}
tools/performance_compare.py for the attached pair (A1, B3)

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 6fe120d aps5-trace-6fe120d11ba3-34060.json.gz 187 60166.650
candidate 8630fa9 aps5-trace-8630fa906d67-37604.json.gz 186 60118.920
  • Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.
  • baseline: trace events were dropped; the event trace omits some of the work included in phase totals.
  • baseline: source tree is dirty or its state is unknown; the commit alone does not identify the build.
  • candidate: trace events were dropped; the event trace omits some of the work included in phase totals.
  • candidate: source tree is dirty or its state is unknown; the commit alone does not identify the build.

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 321.824 322.310 +0.486 +0.151
frame_ms.p90 326.495 330.087 +3.592 +1.100
frame_ms.p99 335.027 342.600 +7.573 +2.260
frame_ms.max 338.747 347.835 +9.088 +2.683
mean_frame_ms 321.747 323.220 +1.473 +0.458
gpu_busy_ms_per_present 90.061 90.219 +0.158 +0.175

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Dispatch 164.342 167.015 +2.673 +1.626
Driver.Packet 1121.542 1133.567 +12.025 +1.072
Driver.Packet.dispatch 212.554 215.370 +2.816 +1.325
Driver.Packet.draw 52.194 53.563 +1.369 +2.623
Driver.Packet.memory_wait 660.508 667.210 +6.702 +1.015
Graphics.Draw 179.558 179.887 +0.329 +0.183
Graphics.Draw.draw_and_resource_release 176.793 177.120 +0.327 +0.185
Resources.Complete 180.566 180.292 -0.274 -0.152
tools/trace_digest.py aps5-trace-6fe120d11ba3-34060.json.gz (A1)

seconds 240:60 from present 1387: 187 presents, frame p50 321.8 / p90 326.5 / p99 335.0 / max 338.7 ms, GPU busy 90.1 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 610.88, Windows 10.0.26300, 1920x1080, commit 6fe120d, dropped: yes

{"commit":"6fe120d11ba3","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Y\u014dtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1387,"ms":60166.65},"presents":187,"frame_ms":{"p50":321.824,"p90":326.495,"p99":335.027,"max":338.747},"gpu_busy_ms_per_present":90.061,"worker_busy_pct":{"queue worker 0x0":96.671,"queue worker 0x52":33.967,"queue worker 0x53":31.784,"queue worker 0x20":35.773,"queue worker 0x30":40.473,"queue worker 0x38":45.667,"queue worker 0x48":1.191,"queue worker 0x51":1.31,"queue worker 0x50":62.878},"top_phases_ms_per_frame":{"Driver.Packet":1121.542,"Driver.Packet.memory_wait":660.508,"Driver.Packet.dispatch":212.554,"Resources.Complete":180.566,"Graphics.Draw":179.558,"Graphics.Draw.draw_and_resource_release":176.793,"Driver.Dispatch":164.342,"Driver.Packet.draw":52.194},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.794,"events_lost":81364,"totals_full":false}},"trace":"aps5-trace-6fe120d11ba3-34060.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1465: 338.7 ms at 24979 ms: Driver.WorkerWait (queue worker 0x48) 335.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 335.1, Driver.WorkerWait (queue worker 0x51) 334.1, Driver.Packet (queue worker 0x0) 323.2
  • present 1466: 335.0 ms at 25318 ms: Driver.WorkerWait (queue worker 0x48) 331.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 331.4, Driver.WorkerWait (queue worker 0x51) 330.2, Driver.Packet (queue worker 0x0) 319.3
  • present 1487: 334.5 ms at 32103 ms: Driver.WorkerWait (queue worker 0x48) 330.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 330.8, Driver.WorkerWait (queue worker 0x51) 329.9, Driver.Packet (queue worker 0x0) 318.3
  • present 1528: 334.3 ms at 45337 ms: Driver.WorkerWait (queue worker 0x51) 330.3, Driver.WorkerWait (queue worker 0x48) 330.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 330.3, Driver.Packet (queue worker 0x0) 318.6
  • present 1463: 333.0 ms at 24314 ms: Driver.WorkerWait (queue worker 0x48) 329.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 329.6, Driver.WorkerWait (queue worker 0x51) 328.7, Driver.Packet (queue worker 0x0) 318.2

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.7 (0 %) 0.0 (0 %) 321.0 0.4 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.3
queue worker 0x0 182.6 (57 %) 58.7 (18 %) 80.5 21.9 Driver.Packet 233.4, Driver.Suspend 0.0
queue worker 0x52 6.9 (2 %) 313.5 (97 %) 1.3 0.9 Driver.Packet 107.8, Driver.EndSubmission 1.3
queue worker 0x53 1.1 (0 %) 319.5 (99 %) 1.2 0.2 Driver.Packet 102.1, Driver.EndSubmission 0.2
queue worker 0x20 11.7 (4 %) 308.8 (96 %) 1.3 1.5 Driver.Packet 114.9, Driver.EndSubmission 0.0
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x30 15.1 (5 %) 305.4 (95 %) 1.2 0.8 Driver.Packet 130.0, Driver.EndSubmission 0.1
queue worker 0x38 74.3 (23 %) 245.9 (76 %) 1.5 3.4 Driver.Packet 144.7, Driver.EndSubmission 1.8
queue worker 0x48 2.3 (1 %) 317.8 (99 %) 1.7 0.5 Driver.Packet 3.7, Driver.EndSubmission 0.1
draw committer 180.7 (56 %) 5.5 (2 %) 135.5 3.5 Graphics.Draw 165.4, Recorder.Sync 15.0
presenter 4.2 (1 %) 0.5 (0 %) 317.0 0.1 VideoOut.Flip 4.7, Driver.Present 0.0
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.1 0.2 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.5 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 321.2 0.2 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x51 4.0 (1 %) 316.7 (98 %) 1.0 0.3 Driver.Packet 4.1, Driver.EndSubmission 0.1
queue worker 0x50 6.3 (2 %) 315.2 (98 %) 0.2 1.3 Driver.Packet 202.2, Vulkan.Dispatch 0.0
gpu 90.1 (28 %) 0.0 (0 %) 231.7 0.0 batch 90.1

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1758.8, Driver.WorkerWait.idle_and_completion_poll 1566.4, Driver.Packet 1042.8, Driver.Packet.memory_wait 649.6, Driver.Packet.dispatch 198.6, Driver.WorkerWait.dequeue_order 193.0, Resources.Complete 177.7, Graphics.Draw 175.4, Graphics.Draw.draw_and_resource_release 172.8, Driver.Dispatch 154.4

Longest waits

  • Driver.WorkerWait (queue worker 0x48) 335.0 ms at 24993 ms, present 1465
  • Driver.WorkerWait (queue worker 0x51) 333.7 ms at 24984 ms, present 1465
  • Driver.WorkerWait (queue worker 0x48) 331.2 ms at 24327 ms, present 1463
  • Driver.WorkerWait (queue worker 0x48) 331.1 ms at 25332 ms, present 1466
  • Driver.WorkerWait (queue worker 0x51) 330.6 ms at 25322 ms, present 1466
  • Driver.WorkerWait (queue worker 0x51) 330.0 ms at 45342 ms, present 1528
  • Driver.WorkerWait (queue worker 0x51) 330.0 ms at 32107 ms, present 1487
  • Driver.WorkerWait (queue worker 0x48) 329.6 ms at 32117 ms, present 1487
  • Driver.WorkerWait (queue worker 0x48) 329.1 ms at 45352 ms, present 1528
  • Driver.WorkerWait (queue worker 0x51) 329.0 ms at 24318 ms, present 1463

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

  • batch 510: 10.3 ms at 1360 ms, present 1391: GPU no ranges; recorded by GpuMutex.wait.label (draw committer) 0.6, Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1
  • batch 3473: 9.3 ms at 10285 ms, present 1419: GPU no ranges; recorded by GpuMutex.wait.label (draw committer) 0.2, Graphics.Draw.validate (draw committer) 0.0, GpuMutex.wait.draw (draw committer) 0.0
  • batch 16357: 8.6 ms at 49001 ms, present 1539: GPU no ranges; recorded by GpuMutex.wait.label (draw committer) 0.5
  • batch 19134: 8.5 ms at 57394 ms, present 1565: GPU no ranges; recorded by no CPU slices
  • batch 7222: 8.5 ms at 21587 ms, present 1454: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6
tools/trace_digest.py aps5-trace-8630fa906d67-37604.json.gz (B3)

seconds 240:60 from present 1396: 186 presents, frame p50 322.3 / p90 330.1 / p99 342.6 / max 347.8 ms, GPU busy 90.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 610.88, Windows 10.0.26300, 1920x1080, commit 8630fa9, dropped: yes

{"commit":"8630fa906d67","dirty":null,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"240:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":64704,"title_id":"PPSA26344","title":"Ghost of Y\u014dtei","content_version":"02.002.000","resolution":"1920x1080","window":{"spec":"seconds 240:60","first_present":1396,"ms":60118.92},"presents":186,"frame_ms":{"p50":322.31,"p90":330.087,"p99":342.6,"max":347.835},"gpu_busy_ms_per_present":90.219,"worker_busy_pct":{"queue worker 0x0":96.741,"queue worker 0x20":36.335,"queue worker 0x52":34.377,"queue worker 0x53":32.314,"queue worker 0x30":40.941,"queue worker 0x38":45.65,"queue worker 0x48":1.235,"queue worker 0x51":1.298,"queue worker 0x50":62.576},"top_phases_ms_per_frame":{"Driver.Packet":1133.567,"Driver.Packet.memory_wait":667.21,"Driver.Packet.dispatch":215.37,"Resources.Complete":180.292,"Graphics.Draw":179.887,"Graphics.Draw.draw_and_resource_release":177.12,"Driver.Dispatch":167.015,"Driver.Packet.draw":53.563},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":45.875,"events_lost":80491,"totals_full":false}},"trace":"aps5-trace-8630fa906d67-37604.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1579: 347.8 ms at 59111 ms: Driver.WorkerWait (queue worker 0x48) 343.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 343.6, Driver.WorkerWait (queue worker 0x51) 342.9, Driver.WorkerWait (queue worker 0x53) 237.9
  • present 1578: 342.6 ms at 58769 ms: Driver.WorkerWait (queue worker 0x48) 338.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 338.9, Driver.WorkerWait (queue worker 0x51) 338.1, Driver.WorkerWait (queue worker 0x53) 227.7
  • present 1577: 341.9 ms at 58427 ms: Driver.WorkerWait (queue worker 0x51) 336.5, Driver.WorkerWait (queue worker 0x48) 335.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 335.2, Driver.WorkerWait (queue worker 0x53) 235.4
  • present 1494: 339.4 ms at 31559 ms: Driver.WorkerWait (queue worker 0x48) 335.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 335.4, Driver.WorkerWait (queue worker 0x51) 334.8, Driver.Packet (queue worker 0x0) 324.3
  • present 1523: 337.2 ms at 40957 ms: Driver.WorkerWait (queue worker 0x51) 332.7, Driver.WorkerWait (queue worker 0x48) 330.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 330.0, Driver.Packet (queue worker 0x0) 321.4

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.7 (0 %) 0.0 (0 %) 322.5 0.4 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.3
queue worker 0x0 184.5 (57 %) 58.5 (18 %) 80.2 22.1 Driver.Packet 235.3, Driver.Draw.draw_enqueued 0.0
queue worker 0x20 11.3 (4 %) 310.5 (96 %) 1.4 1.4 Driver.Packet 117.2, Driver.EndSubmission 0.0
queue worker 0x52 6.6 (2 %) 315.3 (98 %) 1.3 0.9 Driver.Packet 109.5, Driver.EndSubmission 1.5
queue worker 0x53 0.8 (0 %) 321.2 (99 %) 1.2 0.2 Driver.Packet 104.3, Driver.EndSubmission 0.1
title 0.5 (0 %) 0.0 (0 %) 322.7 0.1 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.6 0.1 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.6 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x30 14.6 (5 %) 307.4 (95 %) 1.2 0.8 Driver.Packet 132.2, Driver.EndSubmission 0.0
queue worker 0x38 75.8 (23 %) 245.8 (76 %) 1.5 3.5 Driver.Packet 146.6, Driver.EndSubmission 0.4
queue worker 0x48 2.2 (1 %) 319.2 (99 %) 1.8 0.5 Driver.Packet 3.8, Driver.EndSubmission 0.2
draw committer 181.6 (56 %) 6.2 (2 %) 135.4 3.5 Graphics.Draw 165.7, Recorder.Sync 15.6
presenter 4.2 (1 %) 0.3 (0 %) 318.6 0.1 VideoOut.Flip 4.6, Driver.Present 0.0
title 0.6 (0 %) 0.0 (0 %) 322.7 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.7 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.7 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.6 0.1 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.6 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.6 0.2 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
title 0.6 (0 %) 0.0 (0 %) 322.7 0.1 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x51 4.0 (1 %) 318.2 (98 %) 1.1 0.3 Driver.Packet 4.1, Driver.EndSubmission 0.1
queue worker 0x50 6.0 (2 %) 317.0 (98 %) 0.2 1.4 Driver.Packet 202.1, Vulkan.Dispatch 0.0
gpu 90.2 (28 %) 0.0 (0 %) 233.0 0.0 batch 90.2

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1760.9, Driver.WorkerWait.idle_and_completion_poll 1568.4, Driver.Packet 1055.1, Driver.Packet.memory_wait 656.8, Driver.Packet.dispatch 201.1, Driver.WorkerWait.dequeue_order 193.1, Resources.Complete 177.6, Graphics.Draw 175.7, Graphics.Draw.draw_and_resource_release 173.1, Driver.Dispatch 156.9

Longest waits

  • Driver.WorkerWait (queue worker 0x51) 343.3 ms at 59116 ms, present 1579
  • Driver.WorkerWait (queue worker 0x48) 343.2 ms at 59126 ms, present 1579
  • Driver.WorkerWait (queue worker 0x48) 339.2 ms at 58783 ms, present 1578
  • Driver.WorkerWait (queue worker 0x51) 337.8 ms at 58774 ms, present 1578
  • Driver.WorkerWait (queue worker 0x51) 336.9 ms at 58432 ms, present 1577
  • Driver.WorkerWait (queue worker 0x51) 335.4 ms at 31564 ms, present 1494
  • Driver.WorkerWait (queue worker 0x48) 334.7 ms at 58445 ms, present 1577
  • Driver.WorkerWait (queue worker 0x48) 334.6 ms at 31574 ms, present 1494
  • Driver.WorkerWait (queue worker 0x51) 333.0 ms at 40962 ms, present 1523
  • Driver.WorkerWait (queue worker 0x48) 333.0 ms at 37715 ms, present 1513

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

  • batch 16490: 9.7 ms at 49486 ms, present 1549: GPU no ranges; recorded by Driver.Dispatch.lookup_cache (queue worker 0x20) 11.0, Driver.Packet (queue worker 0x20) 2.2, Driver.Packet.dispatch (queue worker 0x20) 2.2, Driver.Dispatch (queue worker 0x20) 1.6
  • batch 14440: 9.7 ms at 43357 ms, present 1530: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 2.1, Driver.Packet.dispatch (queue worker 0x20) 2.1, Driver.Dispatch (queue worker 0x20) 1.2, Vulkan.Dispatch (queue worker 0x20) 0.3
  • batch 11534: 9.6 ms at 34579 ms, present 1503: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.9, GpuMutex.wait.label (draw committer) 0.3, GpuMutex.wait.draw (draw committer) 0.2
  • batch 19726: 9.3 ms at 59233 ms, present 1579: GPU no ranges; recorded by no CPU slices
  • batch 2548: 9.0 ms at 7488 ms, present 1419: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 0.7, Graphics.Draw (draw committer) 0.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, GpuMutex.wait.flush (draw committer) 0.1

Written by Claude Code, verified by me.

@domx4q

domx4q commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

NVIDIA Linux run with the Khronos validation layer of the current head 8630fa906d; Tested and the captures in the thread are NVIDIA on Windows, on base 6fe120d11b.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 8630fa906d merged onto main 40206fe50d with --no-ff (clean, as c7814d2d79). Main baseline is a Release build of 40206fe50d on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R 'bda_range_cache|bda_span_reads|bda_anchor_reads|bda_device|global_loads|gpu_buffer_format|buffer_format|descriptor_web_faults|buffer_load_store' -V
main 40206fe50d this PR
Result 17 of 17 passed 17 of 18 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 16 16
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

The pattern is the one from Tested. agc_driver_bda_range_cache is added by this PR and does not exist on main; it passes (BDA range cache tests passed). All device tests selected the RTX 4090.

agc_driver_bda_device fails on the merge, deterministically (2 of 2), in its CPU contract checks before any device is created, so the layer is not inserted for it:

BDA device selection CPU tests passed
AGC graphics: a BDA read program, which writes only the fault report, was given a full fault buffer
1/1 Test #2323: agc_driver_bda_device ............***Failed    0.00 sec

The check (tests/BdaContracts.cpp:250, SpirvFaultReportOnly) came to main after this PR's base with 2545cdf (perf(agc): give report-only programs a 32-byte BDA fault slot). With this PR's SpirvBdaRead.cpp change merged, SpirvFaultReportOnly no longer holds for at least one of the three BDA read test shaders; I did not check which. It passes on main 40206fe50d. The speed claim was not measured here.

No VUID- errors on either side, but merged onto current main this PR fails agc_driver_bda_device (report-only BDA read programs get the full fault buffer); the other 17 focused tests pass on Ada.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 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.

Reviewed — comments

The review covered the changed implementation, its new execution test, and the documentation at head 8630fa906d675132ad2741f997c275edb36434f9; performance results and focused test runs are author-reported, and I did not run checks.

What I ran

No commands or tests were run. I read review/description.md, review/commits.md, review/manifest.json, and review/diff.patch, plus the full text of all four changed files through the pinned reader. The supplied reader was repo_read.py.

Results

Check Result Note
Source review passed Four changed files read
Tests not run Results in description are author-reported
Performance evidence not verified Reported captures predate this exact implementation

Findings

Blocking

None.

Non-blocking

  • core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp:393 caches the environment-variable decision in a function-local static. Changing APS5_NO_BDA_RANGE_CACHE after the first shader compilation will not change behavior for later compilations in that process. This may be fine if runtime switches are intentionally process-start settings, but the new toggle's expected lifetime is not specified in the change description.
  • The description says the performance tables and replay were measured with earlier code or alongside another change, and says a same-machine main comparison and exact-commit captures remain outstanding. Those results therefore do not establish the performance or memory impact of this exact head.

Not verified

I did not execute tests or reproduce performance captures. The test and source files were read; no changed files were excluded according to manifest.json. review/files.json was not available through the reader, so its exclusion list could not be independently checked. I did not verify behavior on physical console hardware or other host platforms.

To get this to a good state

Nothing is required. Optional: clarify whether the environment switch is process-start-only, and provide exact-head performance captures and a matched main comparison when available.

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* docs 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