perf(shader): select the record of a T# whose offset the CPU evaluates #6243

Merged
EagleBearerYS merged 18 commits from upstream-pr/6243 into main 2026-10-18 02:00:57 +00:00
EagleBearerYS commented 2026-10-15 06:49:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-15T06:49:16Z.


What

Since #757, a T# loaded from a buffer heap at a runtime offset is an image table column. Every capture then snapshots the whole heap, up to 65,536 records, even when user data or an SRT read fixes the offset. That covers #5188's case, a T# read from a constant buffer at a user-data offset: #757 made it a one-column table instead of an ordinary image.

In Resident Evil Village (PPSA01556) narrowing never applies to these tables, and the cost is large. With APS5_PROFILE_DRAW=1 at the title:

  • 445 snapshots per 10 s at 5.4 ms each, so 2.4 s of every 10 s;
  • narrowing applied to 0 of 34,294 snapshots;
  • about 100k words read per capture.

With image tables switched off (APS5_NO_IMAGE_TABLES=1), the title runs about 16x faster. That's not a fix, though: 26 shaders read a T# chosen per lane and then get a null image.

With this change, a column whose T# words and offset are runtime values the SRT walker evaluates is selected:

  • the offset is kept as a descriptor source and the shader indexes entry 0;
  • the snapshot reads only the record at the evaluated offset, with the heap base moved to that record.

The column keeps a table's semantics:

  • An invalid T#, an unmapped record or an offset that carries past 32 bits is poison that faults only when a lane selects it.
  • An offset the walker can't read faults the table instead of throwing.
  • The record's mode is picked per entry, so no pipeline variant is added.
  • A dispatch that writes the record faults it as written.

A column stays a whole table in two cases:

  • its offset is chosen per lane;
  • the shader may write the memory the offset is read from: the buffer it's read from (by V#), or any memory when the read or a write goes through a pointer or a GPU-only descriptor.

When the shader also uses such a T# for an operation a table can't express (an image store, an image atomic, or a packed or BY2/BY4 load), the T# is bound directly instead, through #5188's path, for every operation of that shader on it. A T# keyed per lane keeps the table: its image stores are table operations since #6402, and its atomics and packed or BY2/BY4 loads still fault, as on main.

A selected record's descriptor index is uniform for the whole draw or dispatch, so it isn't decorated NonUniform. A column deselected because its key may be written also drops the key domains narrowed from that key.

Samplers need no change: an S# whose words the walker evaluates is already bound directly on main, so no sampler column has an offset the CPU evaluates. A test pins that. The disk cache format becomes 37, above the 36 that #1193 gave main. Merging main e49ec591dc into this branch conflicted only on that line, and the merges of main 8856f180ca and 4186f06a9a had no conflicts. The merge of main 55f82fee83 takes #7101's bulk scan of key buffers, and its two skips for an inaccessible key page give this PR's NarrowSkip::Unmapped reason. The merge of main f1af6c5915 keeps both sides' tests in tests/ShaderMemory.cpp, with #7325's verifyChainedTableOffset after this PR's selected-record tests. The last commit adapts the selection to 682b07eb0, which came with 4186f06a9a: main now poisons an image whose dword 3 wasn't captured, and a record selected past the end of its heap reads nothing there, so it was poisoned instead of selecting a null image. Dwords past the end of the buffer now count as read zeros, which is what a scalar buffer load returns there; every other path keeps main's rule.

The second commit names why narrowing is skipped in the [image-table] profile line, with selected records counted apart. The third covers the selected records and their fallbacks, and each later commit adds one of the changes above, with its test after it:

  • agc_shader_memory and agc_shader_bindless: invalid, unmapped, past-the-heap, past-the-cap and carried records, a written key buffer and a per-lane key;
  • agc_driver_image_table: a dispatch samples selected records exactly as direct bindings do, and faults on a store over its record;
  • agc_shader_disk_cache: the round trip.

After the merges, docs(agc) drops the disk cache's format version from ARCHITECTURE.md, which said 36, so the line no longer goes stale or conflicts on each bump. After the merge of main 55f82fee83, test(agc) expects an image store through a T# keyed per lane to be a supported table operation, as #6402 makes it.

Not changed here:

  • On columns that remain whole tables, packed and BY2/BY4 operations still read zeros and fault, as on main, and image stores take main's path since #6402.
  • The record is chosen when the capture is taken, as a direct image's T# is. A pending GPU write on the key is waited for, and a key written through an alias the write guard can't see keeps the old record, as for any direct image. A key base in the table header, with a one-key window, could widen the window at capture time instead. That changes the shader ABI, and is left for a follow-up.

Related: #757 and #5188 (both merged).

Tested

  • At the head, 8c6765be71, which merges main f1af6c5915 (with #7325), on GitHub's runners (run):
    • Linux: the bindless, disk cache and image table tests pass 3 runs in a row, as do the ^agc tests (684, 0 failed). libc's precise_wait timing test failed in that run's suite; this PR doesn't touch libc.
    • Windows: the only failures are agc_driver_pm4_replay_tool and agc_shader_replay_tool, which fail the same way on that runner for an unrelated branch (run).
  • At 9dcf408034, which merges main 55f82fee83 (with #6402 and #7101) and adds the test(agc) commit:
    • With the merge alone (4cb0512329), agc_shader_bindless fails on Linux and Windows: "selected record direct operations: image_store through a T# keyed per lane left the image table or lost its unsupported mark" (run).
    • With the commit, the 17 bindless, image table, disk cache and shader-memory tests pass 3 runs in a row on Linux, as do the ^agc tests (681, 0 failed), and the libc and libkernel suites pass. On Windows the only failures are the same two replay tools (run).
  • At 090c0dad15, which merges main 4186f06a9a:
    • Windows, the full Build workflow on my fork (run): 1,290 of 1,290 pass, 485 skipped, all expected by check_skips.py.
    • Linux, GitHub runner: ctest -R '^agc' runs 601 tests, 1 failed (agc_driver_preparation_scope_settle), 41 skipped (run), the same as main 2e5dd5aa14, ten commits earlier, on that runner (run).
    • The last commit: with the merge alone, agc_shader_bindless and agc_driver_image_table fail in every one of 3 runs on Linux, and agc_shader_bindless on Windows, whose runner has no GPU for the other. With it, both pass 5 runs in a row on both (run).
  • At a34ba0c7c7, which merged main 8856f180ca (pipelined draws on by default):
    • Windows, the full Build workflow on my fork (run): 1,265 of 1,265 pass, 473 skipped, all expected by check_skips.py. The workflow carried the runner-image CA-bundle fix (CI only, no source change).
    • Linux, GitHub runner: ctest -R '^agc' runs 589 tests, 0 failed, 42 skipped (run), the same counts as main 8856f180ca on that runner (run).
  • At 0b099964f0, before that merge, in CI's Linux configuration: ^agc runs 589 tests, 0 failed, 42 skipped, as main e49ec591dc does there, and the full suite fails only the five socket tests that machine can't run.
  • Windows (fork Build 38678651237, on 43855cb5e8): the full suite, 1,252 of 1,252.
  • Linux, GitHub runner (verify job, on 8f28ea4acf):
    • the new tests need the change to build, and with it 10 runs pass;
    • the libc (73) and libkernel (140) suites pass.
      The only difference between 8f28ea4acf and 43855cb5e8 is a test variable renamed because it clashed with the Windows far macro.
  • Linux, CI's configuration (Ubuntu 24.04.5, GCC 13.3, lavapipe), with a benchmark commit on top that isn't part of this PR:
    • configure, test registration, build and libs pass;
    • ctest runs 1,229 tests, and only the five socket tests that machine can't run fail (guest_datagram_* and guest_tcp), as on main there;
    • ^agc runs 576 tests with 0 failures.
  • Red check: with the selection disabled, the five updated checks, the two new ones and the new GPU test fail.
  • The later commits, each red without its fix:
    • agc_shader_bindless:
      • stores, atomics, PCK and BY2 through a T# whose record the CPU evaluates are planned direct;
      • a T# both sampled and stored is direct for both;
      • the same operations keyed per lane stay a faulting table;
      • a selected record's index carries no NonUniform in a two-wave workgroup;
      • a key a pointer store may write keeps no key domain;
      • an evaluable S# is a direct sampler (a pin).
    • agc_driver_image_table, on the GPU: 64 lanes image_store through a selected record, and the texels read back hold the value.
    • Linux, CI's configuration: every commit builds and passes the eight image-table and shader-memory tests. At the head, ctest runs 1,229 tests, and only the five socket tests that machine can't run fail.
    • GitHub runners (verify run 38716615293, against 43855cb5e8): without these commits agc_shader_bindless fails on Linux and Windows, and agc_driver_image_table on Linux (the Windows runner has no GPU for it). With them, the 14 related tests pass 5 runs on both, and the libc and libkernel suites pass apart from main's intermittent guest_kqueue on Windows, which fails on both trees.
  • Microbenchmark (Linux): a Resident Evil Village-like capture goes from 32,768 keys, 262,161 words and 2.1-2.2 ms to 1 key, 26 words and 6-8 µs. The draw-cache compare goes from 77-81 µs to 0.05 µs.

Resident Evil Village (PPSA01556, 01.210.000) at the static main menu, on Windows 11 Home 10.0.26300, RTX 3070 Laptop (driver 617.42), Ryzen 9 5900HS, 15.4 GB RAM:

presents in the window frame p50 frame p90 capture_resources self time per draw (queue worker 0x0)
before 15 in 180.8 s 11,809 ms 13,169 ms 5,749 µs
after 49 in 181.2 s 3,662 ms 4,171 ms 1,698 µs
  • The stack: Resident Evil Village's test tree, main e34c47921 plus the title's test commits, with this PR's three commits ported and no extra commit. That tree predates main's pointer and two-load table columns, so the port leaves out the offset-carry case and its test, and its disk cache format is 34. Every column that tree can plan behaves as in this PR.
  • The runs:
    • APS5_TRACE_SECONDS=1500:180 APS5_TRACE_EVENTS=1048576;
    • APS5_RE8_LAZY_PREPARE=1 APS5_NO_GPL=1, which the test tree needs to run the title on this PC;
    • a warm shader disk cache;
    • one Cross to skip the intro, then no input.
  • Departures from the Performance report form:
    • both builds are Tracy-enabled builds with no profiler connected;
    • the log went to a file, so that a crash would be seen.
  • The same scene:
    • draws per frame are the same: 13,174 and 13,166 over 14 frames;
    • the menu image is the same;
    • neither run logged a null image, an invalid runtime value or a FATAL.
  • Every phase fell: each of the eight largest phases fell 70-73% per frame.
  • Window focus: the game window was in the background for part of the before window and in the foreground for the after window. The dispatch-side stages, which this change doesn't touch, cost the same per frame in both:
    • Driver.Dispatch: 248 and 240 ms;
    • GpuMutex.wait.dispatch: 135 and 127 ms;
    • Vulkan.Dispatch.shader_resources: 90 and 94 ms.
  • Traces: the fork's pre-release, aps5-trace-a762c980a2ea-24852.json.gz (before) and aps5-trace-320af7a8feb1-21124.json.gz (after).

Before:

{"commit":"a762c980a2ea","dirty":false,"env":{"APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RE8_LAZY_PREPARE":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"1500:180"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"seconds 1500:180","first_present":875,"ms":180753.229},"presents":15,"frame_ms":{"p50":11809.09,"p90":13168.687,"p99":13975.212,"max":13975.212},"gpu_busy_ms_per_present":597.261,"worker_busy_pct":{"queue worker 0x0":99.957,"queue worker 0x38":0.034,"queue worker 0x20":98.635,"queue worker 0x28":99.604},"top_phases_ms_per_frame":{"Driver.Packet":35927.067,"Driver.Packet.memory_wait":23629.307,"Driver.Packet.draw":11731.423,"Driver.Draw":11728.805,"Shader.DrawStage":6719.182,"Driver.Draw.shader_compile_and_link":5654.378,"Shader.DrawStage.capture_resources":5554.289,"Driver.Draw.draw_and_resource_release":4505.873},"trace_dropped":false,"trace":"aps5-trace-a762c980a2ea-24852.json.gz"}

After:

{"commit":"320af7a8feb1","dirty":false,"env":{"APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RE8_LAZY_PREPARE":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"1500:180"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"seconds 1500:180","first_present":1074,"ms":181174.051},"presents":49,"frame_ms":{"p50":3661.649,"p90":4171.06,"p99":4280.652,"max":4280.652},"gpu_busy_ms_per_present":414.233,"worker_busy_pct":{"queue worker 0x0":99.891,"queue worker 0x38":0.221,"queue worker 0x20":96.478,"queue worker 0x28":98.551},"top_phases_ms_per_frame":{"Driver.Packet":10891.181,"Driver.Packet.memory_wait":6946.788,"Driver.Packet.draw":3399.883,"Driver.Draw":3398.48,"Shader.DrawStage":1929.28,"Shader.DrawStage.capture_resources":1621.917,"Driver.Draw.shader_compile_and_link":1587.204,"Driver.Draw.draw_and_resource_release":1215.804},"trace_dropped":false,"trace":"aps5-trace-320af7a8feb1-21124.json.gz"}

On main, unprofiled. A later pair on Resident Evil Village's test tree of main 0c4816f611, with the fixes it needs to reach the menu, before and after this PR's head (090c0dad15). Same PC and driver, the same environment in both (APS5_HOST_IMPORT_MIB=6400 APS5_NO_GPL=1 APS5_TRACE_SUMMARY_EVERY=60, and the test tree's APS5_LAZY_SHADER_PREPARE=1, which it needs to run the title on this PC), no profiler connected, the game window in the foreground, at the static main menu:

menu fps frame p50 Driver.Packet per frame
before 0.028 (4 presents in the menu's first 143 s) 35.0-39.0 s 100.9-112.1 s
after 0.134 (median of the 60-s intervals 5-15 min after the menu stood, 0.129-0.139) 7.52 s 21.4-24.4 s
  • The before run ended 2.4 min after its menu stood, so it has no 5-15 min window; the 12.6 min before its menu, while the title and menu loaded, ran 0.025 fps. A before run over the same window as the after run hasn't been made.
  • The per-frame driver time agrees with the frame rate: about 4.5-5x.
  • Neither run logged a FATAL.
trace_digest of the before trace

seconds 1500:180 from present 875: 15 presents, frame p50 11809.1 / p90 13168.7 / p99 13975.2 / max 13975.2 ms, GPU busy 597.3 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 3840x2160, commit a762c980a2ea, dropped: no

Slowest frames (largest slices inside each, inclusive)

  • present 877: 13975.2 ms at 24983 ms: Driver.WorkerWait (queue worker 0x38) 13971.6, Driver.WorkerWait.dequeue_order (queue worker 0x38) 13969.2, Driver.Packet (queue worker 0x0) 13955.8, Driver.Packet (queue worker 0x28) 13926.7
  • present 875: 13168.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 13151.2, Driver.Packet (queue worker 0x28) 13121.8, Driver.Packet.memory_wait (queue worker 0x28) 13116.3, Driver.Packet (queue worker 0x20) 13001.0
  • present 884: 12363.2 ms at 108933 ms: Driver.WorkerWait (queue worker 0x38) 12358.2, Driver.WorkerWait.dequeue_order (queue worker 0x38) 12356.0, Driver.Packet (queue worker 0x0) 12342.7, Driver.Packet (queue worker 0x28) 12250.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 11002.3 (91 %) 1033.8 (9 %) 14.0 79.0 Driver.Packet 12031.4, Driver.Suspend 2.9
presenter 3.4 (0 %) 0.2 (0 %) 12046.7 0.1 Driver.Present 3.6
queue worker 0x38 4.3 (0 %) 10364.7 (86 %) 1681.2 0.6 Driver.Packet 3.9, Driver.WorkerWait.idle_and_completion_poll 0.2
queue worker 0x20 217.5 (2 %) 11824.1 (98 %) 8.6 4.7 Driver.Packet 11885.1, Driver.EndSubmission 0.1
queue worker 0x28 12.9 (0 %) 12034.3 (100 %) 3.1 0.1 Driver.Packet 11995.4, Driver.EndSubmission 7.0
gpu 597.6 (5 %) 0.0 (0 %) 11452.7 0.0 batch 597.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 35915.9, Driver.Packet.memory_wait 23629.1, Driver.Packet.draw 11731.4, Driver.Draw 11728.8, Driver.WorkerWait 10567.6, Driver.WorkerWait.dequeue_order 10362.5, Shader.DrawStage 6715.2, Driver.Draw.shader_compile_and_link 5654.3

Longest waits

  • Driver.WorkerWait (queue worker 0x38) 13971.1 ms at 24988 ms, present 877
  • Driver.Packet.memory_wait (queue worker 0x28) 13790.7 ms at 25119 ms, present 877
  • Driver.Packet.memory_wait (queue worker 0x20) 13525.9 ms at 25056 ms, present 877
  • Driver.Packet.memory_wait (queue worker 0x28) 12933.3 ms at 187 ms, present 875
  • Driver.Packet.memory_wait (queue worker 0x20) 12704.7 ms at 101 ms, present 875
  • Driver.WorkerWait (queue worker 0x38) 12358.0 ms at 108938 ms, present 884
  • Driver.WorkerWait (queue worker 0x38) 12347.4 ms at 132763 ms, present 886
  • Driver.Packet.memory_wait (queue worker 0x28) 12138.4 ms at 132880 ms, present 886

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

  • batch 531: 80.0 ms at 138007 ms, present 886: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1768.9, Driver.Packet.draw (queue worker 0x0) 1768.5, Driver.Draw (queue worker 0x0) 1768.2, Driver.Draw.draw_and_resource_release (queue worker 0x0) 1038.4
  • batch 157: 79.8 ms at 44187 ms, present 878: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1610.7, Driver.Packet.draw (queue worker 0x0) 1610.4, Driver.Draw (queue worker 0x0) 1610.2, Driver.Draw.draw_and_resource_release (queue worker 0x0) 943.8
  • batch 111: 75.1 ms at 30995 ms, present 877: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1878.5, Driver.Packet.draw (queue worker 0x0) 1878.2, Driver.Draw (queue worker 0x0) 1877.9, Driver.Draw.draw_and_resource_release (queue worker 0x0) 1088.2
trace_digest of the after trace

seconds 1500:180 from present 1074: 49 presents, frame p50 3661.6 / p90 4171.1 / p99 4280.7 / max 4280.7 ms, GPU busy 414.2 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 3840x2160, commit 320af7a8feb1, dropped: no

Slowest frames (largest slices inside each, inclusive)

  • present 1108: 4280.7 ms at 126325 ms: Driver.WorkerWait (queue worker 0x38) 4268.2, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4265.5, Driver.Packet (queue worker 0x0) 4254.0, Driver.Packet (queue worker 0x28) 4219.2
  • present 1088: 4210.8 ms at 51814 ms: Driver.WorkerWait (queue worker 0x38) 4207.0, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4204.5, Driver.Packet (queue worker 0x0) 4194.5, Driver.Packet (queue worker 0x28) 4157.6
  • present 1084: 4194.8 ms at 36619 ms: Driver.WorkerWait (queue worker 0x38) 4190.6, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4187.0, Driver.Packet (queue worker 0x0) 4178.6, Driver.Packet (queue worker 0x28) 4157.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 3215.0 (87 %) 471.3 (13 %) 11.2 84.1 Driver.Packet 3677.5, Driver.Suspend 7.1
presenter 7.3 (0 %) 0.4 (0 %) 3689.7 0.1 Driver.Present 7.8
queue worker 0x38 8.2 (0 %) 3615.5 (98 %) 73.7 0.8 Driver.Packet 7.9, Driver.EndSubmission 0.2
queue worker 0x20 220.9 (6 %) 3473.0 (94 %) 3.5 4.9 Driver.Packet 3558.8, Driver.EndSubmission 7.9
queue worker 0x28 14.8 (0 %) 3681.4 (100 %) 1.2 0.2 Driver.Packet 3637.6, Driver.EndSubmission 6.2
gpu 413.6 (11 %) 0.0 (0 %) 3283.8 0.0 batch 413.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 10881.8, Driver.Packet.memory_wait 6946.6, Driver.WorkerWait 3796.8, Driver.WorkerWait.dequeue_order 3613.1, Driver.Packet.draw 3399.9, Driver.Draw 3398.5, Shader.DrawStage 1925.3, Shader.DrawStage.capture_resources 1615.1

Longest waits

  • Driver.WorkerWait (queue worker 0x38) 4267.9 ms at 126338 ms, present 1108
  • Driver.WorkerWait (queue worker 0x38) 4207.0 ms at 51818 ms, present 1088
  • Driver.WorkerWait (queue worker 0x38) 4191.0 ms at 36624 ms, present 1084
  • Driver.WorkerWait (queue worker 0x38) 4185.5 ms at 17621 ms, present 1079
  • Driver.WorkerWait (queue worker 0x38) 4167.0 ms at 134611 ms, present 1110
  • Driver.WorkerWait (queue worker 0x38) 4090.8 ms at 104303 ms, present 1102
  • Driver.WorkerWait (queue worker 0x38) 4076.9 ms at 100209 ms, present 1101
  • Driver.Packet.memory_wait (queue worker 0x28) 4060.6 ms at 126492 ms, present 1108

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

  • batch 1764: 56.0 ms at 145870 ms, present 1113: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 42.8, Driver.Packet.dispatch (queue worker 0x0) 42.7, Driver.Dispatch (queue worker 0x0) 42.7, GpuMutex.wait.dispatch (queue worker 0x0) 39.8
  • batch 2034: 53.8 ms at 167065 ms, present 1119: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 50.7, Driver.Packet.dispatch (queue worker 0x0) 50.7, Driver.Dispatch (queue worker 0x0) 50.6, GpuMutex.wait.dispatch (queue worker 0x0) 46.4
  • batch 404: 52.6 ms at 33006 ms, present 1083: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 59.3, Driver.Packet.dispatch (queue worker 0x0) 59.3, Driver.Dispatch (queue worker 0x0) 59.2, GpuMutex.wait.dispatch (queue worker 0x0) 54.4

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
  • Unblocks: PPSA01556 #5169 (the title and menus: image table snapshots)
  • GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11 Home 10.0.26300 (the Resident Evil Village runs); Mesa lavapipe (mesa-vulkan-drivers 25.2.8), Ubuntu 24.04.5 (the Linux ctest suite)
  • AI-assisted: yes

Overlap (checked against main bc400bede6 and the open PRs, 2026-10-16): #6232 also adds a TableColumn field (pointerHops), so the two conflict in TableColumn::operator==, the plan encoder's size and field-count asserts in ShaderDiskCache.cpp, and the test lists. Whichever merges second keeps both fields in the comparison, the encoder and the decoder, updates those asserts and sets FormatVersion above main's. #6488 (waterfall loops over per-lane T#s) adds two TableColumn fields, laneKey and implicitDerivatives, and conflicts in TableColumn::operator== and the test list in ShaderMemory.cpp. It also sets the field-count assert to 17 and FormatVersion to 37, as this PR does, so git merges those two lines without a conflict; whichever merges second raises them by hand (19 fields with both, and the next format version), and keeps all four fields in the encoder and the decoder. #6440 (reuse an image table column's records while its words are unchanged) adds its memo counters where this PR adds its narrowing and selection counters in ResourceMaterializer.cpp, changes the same [image-table] statistics line, and adds its test at the same place in ShaderMemory.cpp; keep both sets of counters, print both, and keep both tests. #6032, #6296 and #6858 each add EntryHeaderBytes on the line after FormatVersion; keep both lines. #6674 (uncompressed FMASK images) adds a debt line next to this PR's image-table line in docs/dev/debt/shader.md; keep both.

#6402 (Pipodi, merged: stores to images selected through image tables) makes an image_store through a T# keyed per lane a supported table operation. It merged without conflicts here, and the test(agc) commit after the merge of main 55f82fee83 changes the one expectation it broke: in agc_shader_bindless's selected record direct operations case, that store is now TableOperation::Supported, while atomics, PCK and BY2/BY4 keyed per lane still fault. A store whose record the CPU evaluates stays a direct binding here, and #6402's storage table takes the stores keyed per lane.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4869389238 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-15T06:49:16Z. --- ### What Since #757, a T# loaded from a buffer heap at a runtime offset is an image table column. Every capture then snapshots the whole heap, up to 65,536 records, even when user data or an SRT read fixes the offset. That covers #5188's case, a T# read from a constant buffer at a user-data offset: #757 made it a one-column table instead of an ordinary image. In Resident Evil Village (PPSA01556) narrowing never applies to these tables, and the cost is large. With `APS5_PROFILE_DRAW=1` at the title: - 445 snapshots per 10 s at 5.4 ms each, so 2.4 s of every 10 s; - narrowing applied to 0 of 34,294 snapshots; - about 100k words read per capture. With image tables switched off (`APS5_NO_IMAGE_TABLES=1`), the title runs about 16x faster. That's not a fix, though: 26 shaders read a T# chosen per lane and then get a null image. With this change, a column whose T# words and offset are runtime values the SRT walker evaluates is *selected*: - the offset is kept as a descriptor source and the shader indexes entry 0; - the snapshot reads only the record at the evaluated offset, with the heap base moved to that record. The column keeps a table's semantics: - An invalid T#, an unmapped record or an offset that carries past 32 bits is poison that faults only when a lane selects it. - An offset the walker can't read faults the table instead of throwing. - The record's mode is picked per entry, so no pipeline variant is added. - A dispatch that writes the record faults it as written. A column stays a whole table in two cases: - its offset is chosen per lane; - the shader may write the memory the offset is read from: the buffer it's read from (by V#), or any memory when the read or a write goes through a pointer or a GPU-only descriptor. When the shader also uses such a T# for an operation a table can't express (an image store, an image atomic, or a packed or BY2/BY4 load), the T# is bound directly instead, through #5188's path, for every operation of that shader on it. A T# keyed per lane keeps the table: its image stores are table operations since #6402, and its atomics and packed or BY2/BY4 loads still fault, as on `main`. A selected record's descriptor index is uniform for the whole draw or dispatch, so it isn't decorated `NonUniform`. A column deselected because its key may be written also drops the key domains narrowed from that key. Samplers need no change: an S# whose words the walker evaluates is already bound directly on `main`, so no sampler column has an offset the CPU evaluates. A test pins that. The disk cache format becomes 37, above the 36 that #1193 gave `main`. Merging `main` e49ec591dc into this branch conflicted only on that line, and the merges of `main` 8856f180ca and 4186f06a9a had no conflicts. The merge of `main` 55f82fee83 takes #7101's bulk scan of key buffers, and its two skips for an inaccessible key page give this PR's `NarrowSkip::Unmapped` reason. The merge of `main` f1af6c5915 keeps both sides' tests in `tests/ShaderMemory.cpp`, with #7325's `verifyChainedTableOffset` after this PR's selected-record tests. The last commit adapts the selection to 682b07eb0, which came with 4186f06a9a: `main` now poisons an image whose dword 3 wasn't captured, and a record selected past the end of its heap reads nothing there, so it was poisoned instead of selecting a null image. Dwords past the end of the buffer now count as read zeros, which is what a scalar buffer load returns there; every other path keeps `main`'s rule. The second commit names why narrowing is skipped in the `[image-table]` profile line, with selected records counted apart. The third covers the selected records and their fallbacks, and each later commit adds one of the changes above, with its test after it: - `agc_shader_memory` and `agc_shader_bindless`: invalid, unmapped, past-the-heap, past-the-cap and carried records, a written key buffer and a per-lane key; - `agc_driver_image_table`: a dispatch samples selected records exactly as direct bindings do, and faults on a store over its record; - `agc_shader_disk_cache`: the round trip. After the merges, `docs(agc)` drops the disk cache's format version from `ARCHITECTURE.md`, which said 36, so the line no longer goes stale or conflicts on each bump. After the merge of `main` 55f82fee83, `test(agc)` expects an image store through a T# keyed per lane to be a supported table operation, as #6402 makes it. Not changed here: - On columns that remain whole tables, packed and BY2/BY4 operations still read zeros and fault, as on `main`, and image stores take `main`'s path since #6402. - The record is chosen when the capture is taken, as a direct image's T# is. A pending GPU write on the key is waited for, and a key written through an alias the write guard can't see keeps the old record, as for any direct image. A key base in the table header, with a one-key window, could widen the window at capture time instead. That changes the shader ABI, and is left for a follow-up. Related: #757 and #5188 (both merged). ### Tested - **At the head**, 8c6765be71, which merges `main` f1af6c5915 (with #7325), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39083139632)): - Linux: the bindless, disk cache and image table tests pass 3 runs in a row, as do the `^agc` tests (684, 0 failed). libc's `precise_wait` timing test failed in that run's suite; this PR doesn't touch libc. - Windows: the only failures are `agc_driver_pm4_replay_tool` and `agc_shader_replay_tool`, which fail the same way on that runner for an unrelated branch ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39061670036)). - **At 9dcf408034**, which merges `main` 55f82fee83 (with #6402 and #7101) and adds the `test(agc)` commit: - With the merge alone (4cb0512329), `agc_shader_bindless` fails on Linux and Windows: "selected record direct operations: image_store through a T# keyed per lane left the image table or lost its unsupported mark" ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39077258574)). - With the commit, the 17 bindless, image table, disk cache and shader-memory tests pass 3 runs in a row on Linux, as do the `^agc` tests (681, 0 failed), and the libc and libkernel suites pass. On Windows the only failures are the same two replay tools ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39077269246)). - **At 090c0dad15**, which merges `main` 4186f06a9a: - Windows, the full Build workflow on my fork ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38750933948)): 1,290 of 1,290 pass, 485 skipped, all expected by `check_skips.py`. - Linux, GitHub runner: `ctest -R '^agc'` runs 601 tests, 1 failed (`agc_driver_preparation_scope_settle`), 41 skipped ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38744611538)), the same as `main` 2e5dd5aa14, ten commits earlier, on that runner ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38740973645)). - The last commit: with the merge alone, `agc_shader_bindless` and `agc_driver_image_table` fail in every one of 3 runs on Linux, and `agc_shader_bindless` on Windows, whose runner has no GPU for the other. With it, both pass 5 runs in a row on both ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38744598206)). - **At a34ba0c7c7**, which merged `main` 8856f180ca (pipelined draws on by default): - Windows, the full Build workflow on my fork ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38725640177)): 1,265 of 1,265 pass, 473 skipped, all expected by `check_skips.py`. The workflow carried the runner-image CA-bundle fix (CI only, no source change). - Linux, GitHub runner: `ctest -R '^agc'` runs 589 tests, 0 failed, 42 skipped ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38723575403)), the same counts as `main` 8856f180ca on that runner ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38723759909)). - **At 0b099964f0**, before that merge, in CI's Linux configuration: `^agc` runs 589 tests, 0 failed, 42 skipped, as `main` e49ec591dc does there, and the full suite fails only the five socket tests that machine can't run. - **Windows** ([fork Build 38678651237](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38678651237), on 43855cb5e8): the full suite, 1,252 of 1,252. - **Linux, GitHub runner** ([verify job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38677407202/job/116234053856), on 8f28ea4acf): - the new tests need the change to build, and with it 10 runs pass; - the libc (73) and libkernel (140) suites pass. The only difference between 8f28ea4acf and 43855cb5e8 is a test variable renamed because it clashed with the Windows `far` macro. - **Linux, CI's configuration** (Ubuntu 24.04.5, GCC 13.3, lavapipe), with a benchmark commit on top that isn't part of this PR: - configure, test registration, build and `libs` pass; - ctest runs 1,229 tests, and only the five socket tests that machine can't run fail (`guest_datagram_*` and `guest_tcp`), as on `main` there; - `^agc` runs 576 tests with 0 failures. - **Red check:** with the selection disabled, the five updated checks, the two new ones and the new GPU test fail. - **The later commits**, each red without its fix: - `agc_shader_bindless`: - stores, atomics, PCK and BY2 through a T# whose record the CPU evaluates are planned direct; - a T# both sampled and stored is direct for both; - the same operations keyed per lane stay a faulting table; - a selected record's index carries no `NonUniform` in a two-wave workgroup; - a key a pointer store may write keeps no key domain; - an evaluable S# is a direct sampler (a pin). - `agc_driver_image_table`, on the GPU: 64 lanes `image_store` through a selected record, and the texels read back hold the value. - Linux, CI's configuration: every commit builds and passes the eight image-table and shader-memory tests. At the head, ctest runs 1,229 tests, and only the five socket tests that machine can't run fail. - GitHub runners ([verify run 38716615293](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38716615293), against 43855cb5e8): without these commits `agc_shader_bindless` fails on Linux and Windows, and `agc_driver_image_table` on Linux (the Windows runner has no GPU for it). With them, the 14 related tests pass 5 runs on both, and the libc and libkernel suites pass apart from main's intermittent `guest_kqueue` on Windows, which fails on both trees. - **Microbenchmark** (Linux): a Resident Evil Village-like capture goes from 32,768 keys, 262,161 words and 2.1-2.2 ms to 1 key, 26 words and 6-8 µs. The draw-cache compare goes from 77-81 µs to 0.05 µs. **Resident Evil Village** (PPSA01556, 01.210.000) at the static main menu, on Windows 11 Home 10.0.26300, RTX 3070 Laptop (driver 617.42), Ryzen 9 5900HS, 15.4 GB RAM: | | presents in the window | frame p50 | frame p90 | `capture_resources` self time per draw (queue worker 0x0) | |---|---|---|---|---| | before | 15 in 180.8 s | 11,809 ms | 13,169 ms | 5,749 µs | | after | 49 in 181.2 s | 3,662 ms | 4,171 ms | 1,698 µs | - **The stack:** Resident Evil Village's test tree, `main` e34c47921 plus the title's test commits, with this PR's three commits ported and no extra commit. That tree predates `main`'s pointer and two-load table columns, so the port leaves out the offset-carry case and its test, and its disk cache format is 34. Every column that tree can plan behaves as in this PR. - **The runs:** - `APS5_TRACE_SECONDS=1500:180 APS5_TRACE_EVENTS=1048576`; - `APS5_RE8_LAZY_PREPARE=1 APS5_NO_GPL=1`, which the test tree needs to run the title on this PC; - a warm shader disk cache; - one Cross to skip the intro, then no input. - **Departures from the Performance report form:** - both builds are Tracy-enabled builds with no profiler connected; - the log went to a file, so that a crash would be seen. - **The same scene:** - draws per frame are the same: 13,174 and 13,166 over 14 frames; - the menu image is the same; - neither run logged a null image, an invalid runtime value or a FATAL. - **Every phase fell:** each of the eight largest phases fell 70-73% per frame. - **Window focus:** the game window was in the background for part of the before window and in the foreground for the after window. The dispatch-side stages, which this change doesn't touch, cost the same per frame in both: - `Driver.Dispatch`: 248 and 240 ms; - `GpuMutex.wait.dispatch`: 135 and 127 ms; - `Vulkan.Dispatch.shader_resources`: 90 and 94 ms. - **Traces:** [the fork's pre-release](https://github.com/EagleBearerYS/AnyPS5/releases/tag/traces-village-image-tables), `aps5-trace-a762c980a2ea-24852.json.gz` (before) and `aps5-trace-320af7a8feb1-21124.json.gz` (after). Before: ```json {"commit":"a762c980a2ea","dirty":false,"env":{"APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RE8_LAZY_PREPARE":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"1500:180"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"seconds 1500:180","first_present":875,"ms":180753.229},"presents":15,"frame_ms":{"p50":11809.09,"p90":13168.687,"p99":13975.212,"max":13975.212},"gpu_busy_ms_per_present":597.261,"worker_busy_pct":{"queue worker 0x0":99.957,"queue worker 0x38":0.034,"queue worker 0x20":98.635,"queue worker 0x28":99.604},"top_phases_ms_per_frame":{"Driver.Packet":35927.067,"Driver.Packet.memory_wait":23629.307,"Driver.Packet.draw":11731.423,"Driver.Draw":11728.805,"Shader.DrawStage":6719.182,"Driver.Draw.shader_compile_and_link":5654.378,"Shader.DrawStage.capture_resources":5554.289,"Driver.Draw.draw_and_resource_release":4505.873},"trace_dropped":false,"trace":"aps5-trace-a762c980a2ea-24852.json.gz"} ``` After: ```json {"commit":"320af7a8feb1","dirty":false,"env":{"APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RE8_LAZY_PREPARE":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"1500:180"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"seconds 1500:180","first_present":1074,"ms":181174.051},"presents":49,"frame_ms":{"p50":3661.649,"p90":4171.06,"p99":4280.652,"max":4280.652},"gpu_busy_ms_per_present":414.233,"worker_busy_pct":{"queue worker 0x0":99.891,"queue worker 0x38":0.221,"queue worker 0x20":96.478,"queue worker 0x28":98.551},"top_phases_ms_per_frame":{"Driver.Packet":10891.181,"Driver.Packet.memory_wait":6946.788,"Driver.Packet.draw":3399.883,"Driver.Draw":3398.48,"Shader.DrawStage":1929.28,"Shader.DrawStage.capture_resources":1621.917,"Driver.Draw.shader_compile_and_link":1587.204,"Driver.Draw.draw_and_resource_release":1215.804},"trace_dropped":false,"trace":"aps5-trace-320af7a8feb1-21124.json.gz"} ``` **On `main`, unprofiled.** A later pair on Resident Evil Village's test tree of `main` 0c4816f611, with the fixes it needs to reach the menu, before and after this PR's head (090c0dad15). Same PC and driver, the same environment in both (`APS5_HOST_IMPORT_MIB=6400 APS5_NO_GPL=1 APS5_TRACE_SUMMARY_EVERY=60`, and the test tree's `APS5_LAZY_SHADER_PREPARE=1`, which it needs to run the title on this PC), no profiler connected, the game window in the foreground, at the static main menu: | | menu fps | frame p50 | `Driver.Packet` per frame | |---|---|---|---| | before | 0.028 (4 presents in the menu's first 143 s) | 35.0-39.0 s | 100.9-112.1 s | | after | 0.134 (median of the 60-s intervals 5-15 min after the menu stood, 0.129-0.139) | 7.52 s | 21.4-24.4 s | - The before run ended 2.4 min after its menu stood, so it has no 5-15 min window; the 12.6 min before its menu, while the title and menu loaded, ran 0.025 fps. A before run over the same window as the after run hasn't been made. - The per-frame driver time agrees with the frame rate: about 4.5-5x. - Neither run logged a FATAL. <details><summary>trace_digest of the before trace</summary> **seconds 1500:180** from present 875: 15 presents, frame p50 11809.1 / p90 13168.7 / p99 13975.2 / max 13975.2 ms, GPU busy 597.3 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 3840x2160, commit a762c980a2ea, dropped: no **Slowest frames** (largest slices inside each, inclusive) - present 877: 13975.2 ms at 24983 ms: Driver.WorkerWait (queue worker 0x38) 13971.6, Driver.WorkerWait.dequeue_order (queue worker 0x38) 13969.2, Driver.Packet (queue worker 0x0) 13955.8, Driver.Packet (queue worker 0x28) 13926.7 - present 875: 13168.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 13151.2, Driver.Packet (queue worker 0x28) 13121.8, Driver.Packet.memory_wait (queue worker 0x28) 13116.3, Driver.Packet (queue worker 0x20) 13001.0 - present 884: 12363.2 ms at 108933 ms: Driver.WorkerWait (queue worker 0x38) 12358.2, Driver.WorkerWait.dequeue_order (queue worker 0x38) 12356.0, Driver.Packet (queue worker 0x0) 12342.7, Driver.Packet (queue worker 0x28) 12250.1 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 11002.3 (91 %) | 1033.8 (9 %) | 14.0 | 79.0 | Driver.Packet 12031.4, Driver.Suspend 2.9 | | presenter | 3.4 (0 %) | 0.2 (0 %) | 12046.7 | 0.1 | Driver.Present 3.6 | | queue worker 0x38 | 4.3 (0 %) | 10364.7 (86 %) | 1681.2 | 0.6 | Driver.Packet 3.9, Driver.WorkerWait.idle_and_completion_poll 0.2 | | queue worker 0x20 | 217.5 (2 %) | 11824.1 (98 %) | 8.6 | 4.7 | Driver.Packet 11885.1, Driver.EndSubmission 0.1 | | queue worker 0x28 | 12.9 (0 %) | 12034.3 (100 %) | 3.1 | 0.1 | Driver.Packet 11995.4, Driver.EndSubmission 7.0 | | gpu | 597.6 (5 %) | 0.0 (0 %) | 11452.7 | 0.0 | batch 597.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 35915.9, Driver.Packet.memory_wait 23629.1, Driver.Packet.draw 11731.4, Driver.Draw 11728.8, Driver.WorkerWait 10567.6, Driver.WorkerWait.dequeue_order 10362.5, Shader.DrawStage 6715.2, Driver.Draw.shader_compile_and_link 5654.3 **Longest waits** - Driver.WorkerWait (queue worker 0x38) 13971.1 ms at 24988 ms, present 877 - Driver.Packet.memory_wait (queue worker 0x28) 13790.7 ms at 25119 ms, present 877 - Driver.Packet.memory_wait (queue worker 0x20) 13525.9 ms at 25056 ms, present 877 - Driver.Packet.memory_wait (queue worker 0x28) 12933.3 ms at 187 ms, present 875 - Driver.Packet.memory_wait (queue worker 0x20) 12704.7 ms at 101 ms, present 875 - Driver.WorkerWait (queue worker 0x38) 12358.0 ms at 108938 ms, present 884 - Driver.WorkerWait (queue worker 0x38) 12347.4 ms at 132763 ms, present 886 - Driver.Packet.memory_wait (queue worker 0x28) 12138.4 ms at 132880 ms, present 886 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 531: 80.0 ms at 138007 ms, present 886: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1768.9, Driver.Packet.draw (queue worker 0x0) 1768.5, Driver.Draw (queue worker 0x0) 1768.2, Driver.Draw.draw_and_resource_release (queue worker 0x0) 1038.4 - batch 157: 79.8 ms at 44187 ms, present 878: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1610.7, Driver.Packet.draw (queue worker 0x0) 1610.4, Driver.Draw (queue worker 0x0) 1610.2, Driver.Draw.draw_and_resource_release (queue worker 0x0) 943.8 - batch 111: 75.1 ms at 30995 ms, present 877: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1878.5, Driver.Packet.draw (queue worker 0x0) 1878.2, Driver.Draw (queue worker 0x0) 1877.9, Driver.Draw.draw_and_resource_release (queue worker 0x0) 1088.2 </details> <details><summary>trace_digest of the after trace</summary> **seconds 1500:180** from present 1074: 49 presents, frame p50 3661.6 / p90 4171.1 / p99 4280.7 / max 4280.7 ms, GPU busy 414.2 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 3840x2160, commit 320af7a8feb1, dropped: no **Slowest frames** (largest slices inside each, inclusive) - present 1108: 4280.7 ms at 126325 ms: Driver.WorkerWait (queue worker 0x38) 4268.2, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4265.5, Driver.Packet (queue worker 0x0) 4254.0, Driver.Packet (queue worker 0x28) 4219.2 - present 1088: 4210.8 ms at 51814 ms: Driver.WorkerWait (queue worker 0x38) 4207.0, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4204.5, Driver.Packet (queue worker 0x0) 4194.5, Driver.Packet (queue worker 0x28) 4157.6 - present 1084: 4194.8 ms at 36619 ms: Driver.WorkerWait (queue worker 0x38) 4190.6, Driver.WorkerWait.dequeue_order (queue worker 0x38) 4187.0, Driver.Packet (queue worker 0x0) 4178.6, Driver.Packet (queue worker 0x28) 4157.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 3215.0 (87 %) | 471.3 (13 %) | 11.2 | 84.1 | Driver.Packet 3677.5, Driver.Suspend 7.1 | | presenter | 7.3 (0 %) | 0.4 (0 %) | 3689.7 | 0.1 | Driver.Present 7.8 | | queue worker 0x38 | 8.2 (0 %) | 3615.5 (98 %) | 73.7 | 0.8 | Driver.Packet 7.9, Driver.EndSubmission 0.2 | | queue worker 0x20 | 220.9 (6 %) | 3473.0 (94 %) | 3.5 | 4.9 | Driver.Packet 3558.8, Driver.EndSubmission 7.9 | | queue worker 0x28 | 14.8 (0 %) | 3681.4 (100 %) | 1.2 | 0.2 | Driver.Packet 3637.6, Driver.EndSubmission 6.2 | | gpu | 413.6 (11 %) | 0.0 (0 %) | 3283.8 | 0.0 | batch 413.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 10881.8, Driver.Packet.memory_wait 6946.6, Driver.WorkerWait 3796.8, Driver.WorkerWait.dequeue_order 3613.1, Driver.Packet.draw 3399.9, Driver.Draw 3398.5, Shader.DrawStage 1925.3, Shader.DrawStage.capture_resources 1615.1 **Longest waits** - Driver.WorkerWait (queue worker 0x38) 4267.9 ms at 126338 ms, present 1108 - Driver.WorkerWait (queue worker 0x38) 4207.0 ms at 51818 ms, present 1088 - Driver.WorkerWait (queue worker 0x38) 4191.0 ms at 36624 ms, present 1084 - Driver.WorkerWait (queue worker 0x38) 4185.5 ms at 17621 ms, present 1079 - Driver.WorkerWait (queue worker 0x38) 4167.0 ms at 134611 ms, present 1110 - Driver.WorkerWait (queue worker 0x38) 4090.8 ms at 104303 ms, present 1102 - Driver.WorkerWait (queue worker 0x38) 4076.9 ms at 100209 ms, present 1101 - Driver.Packet.memory_wait (queue worker 0x28) 4060.6 ms at 126492 ms, present 1108 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1764: 56.0 ms at 145870 ms, present 1113: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 42.8, Driver.Packet.dispatch (queue worker 0x0) 42.7, Driver.Dispatch (queue worker 0x0) 42.7, GpuMutex.wait.dispatch (queue worker 0x0) 39.8 - batch 2034: 53.8 ms at 167065 ms, present 1119: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 50.7, Driver.Packet.dispatch (queue worker 0x0) 50.7, Driver.Dispatch (queue worker 0x0) 50.6, GpuMutex.wait.dispatch (queue worker 0x0) 46.4 - batch 404: 52.6 ms at 33006 ms, present 1083: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 59.3, Driver.Packet.dispatch (queue worker 0x0) 59.3, Driver.Dispatch (queue worker 0x0) 59.2, GpuMutex.wait.dispatch (queue worker 0x0) 54.4 </details> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA01556 #5169 (the title and menus: image table snapshots) - [x] GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11 Home 10.0.26300 (the Resident Evil Village runs); Mesa lavapipe (mesa-vulkan-drivers 25.2.8), Ubuntu 24.04.5 (the Linux ctest suite) - [x] AI-assisted: yes Overlap (checked against `main` bc400bede6 and the open PRs, 2026-10-16): #6232 also adds a `TableColumn` field (`pointerHops`), so the two conflict in `TableColumn::operator==`, the plan encoder's size and field-count asserts in `ShaderDiskCache.cpp`, and the test lists. Whichever merges second keeps both fields in the comparison, the encoder and the decoder, updates those asserts and sets `FormatVersion` above `main`'s. #6488 (waterfall loops over per-lane T#s) adds two `TableColumn` fields, `laneKey` and `implicitDerivatives`, and conflicts in `TableColumn::operator==` and the test list in `ShaderMemory.cpp`. It also sets the field-count assert to 17 and `FormatVersion` to 37, as this PR does, so git merges those two lines without a conflict; whichever merges second raises them by hand (19 fields with both, and the next format version), and keeps all four fields in the encoder and the decoder. #6440 (reuse an image table column's records while its words are unchanged) adds its memo counters where this PR adds its narrowing and selection counters in `ResourceMaterializer.cpp`, changes the same `[image-table]` statistics line, and adds its test at the same place in `ShaderMemory.cpp`; keep both sets of counters, print both, and keep both tests. #6032, #6296 and #6858 each add `EntryHeaderBytes` on the line after `FormatVersion`; keep both lines. #6674 (uncompressed FMASK images) adds a debt line next to this PR's image-table line in `docs/dev/debt/shader.md`; keep both. #6402 (Pipodi, merged: stores to images selected through image tables) makes an `image_store` through a T# keyed per lane a supported table operation. It merged without conflicts here, and the `test(agc)` commit after the merge of `main` 55f82fee83 changes the one expectation it broke: in `agc_shader_bindless`'s `selected record direct operations` case, that store is now `TableOperation::Supported`, while atomics, PCK and BY2/BY4 keyed per lane still fault. A store whose record the CPU evaluates stays a direct binding here, and #6402's storage table takes the stores keyed per lane.
github-actions[bot] commented 2026-10-15 07:33:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T07:33:11Z.


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 6032 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 6296 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 6440 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L322, L350-352
PR 6674 docs/dev/debt/shader.md L36-38
PR 6858 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 6924 core/shader/recompiler/ShaderDiskCache.hpp L16

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 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 1341 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 3247 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4650 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/libSceAgcDriver.md
PR 5021 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5426 docs/dev/debt/shader.md
PR 5499 docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 5609 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/ARCHITECTURE.md
docs/dev/debt/libSceAgcDriver.md
PR 5941 docs/dev/debt/shader.md
PR 5958 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6044 docs/dev/ARCHITECTURE.md
PR 6054 docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6094 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6177 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6222 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6232 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6317 docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/ARCHITECTURE.md
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6416 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 6481 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6492 docs/dev/debt/libSceAgcDriver.md
PR 6498 docs/dev/debt/libSceAgcDriver.md
PR 6503 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ARCHITECTURE.md
PR 6539 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6563 docs/dev/debt/libSceAgcDriver.md
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6741 docs/dev/debt/libSceAgcDriver.md
PR 6767 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 6783 docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6879 core/shader/recompiler/ShaderDiskCache.cpp
PR 6931 docs/dev/ARCHITECTURE.md
PR 6941 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/ARCHITECTURE.md
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp
docs/dev/ARCHITECTURE.md
docs/dev/debt/libSceAgcDriver.md
PR 6973 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6977 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6987 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7089 docs/dev/debt/libSceAgcDriver.md
PR 7154 docs/dev/debt/libSceAgcDriver.md
PR 7175 docs/dev/debt/libSceAgcDriver.md
PR 7178 docs/dev/debt/libSceAgcDriver.md
PR 7193 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7201 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 7223 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7258 docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6186951813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6186951813). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T07:33:11Z. --- <!-- pr-overlap --> 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 6032](https://www.github.com/boykopovar/AnyPS5/pull/6032) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | | [PR 6296](https://www.github.com/boykopovar/AnyPS5/pull/6296) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | | [PR 6440](https://www.github.com/boykopovar/AnyPS5/pull/6440) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` [L322](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L322), [L350-352](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L350-L352) | | | | [PR 6674](https://www.github.com/boykopovar/AnyPS5/pull/6674) | `docs/dev/debt/shader.md` [L36-38](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/docs/dev/debt/shader.md#L36-L38) | | | | [PR 6858](https://www.github.com/boykopovar/AnyPS5/pull/6858) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/154d627e387cecbf9d21946554e20b5f48483958/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | 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 907](https://www.github.com/boykopovar/AnyPS5/pull/907) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 3247](https://www.github.com/boykopovar/AnyPS5/pull/3247) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5941](https://www.github.com/boykopovar/AnyPS5/pull/5941) | `docs/dev/debt/shader.md` | | [PR 5958](https://www.github.com/boykopovar/AnyPS5/pull/5958) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6009](https://www.github.com/boykopovar/AnyPS5/pull/6009) | `docs/dev/debt/shader.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `docs/dev/ARCHITECTURE.md` | | [PR 6054](https://www.github.com/boykopovar/AnyPS5/pull/6054) | `docs/dev/debt/libSceAgcDriver.md`<br>`docs/dev/debt/shader.md` | | [PR 6094](https://www.github.com/boykopovar/AnyPS5/pull/6094) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/dev/debt/shader.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6232](https://www.github.com/boykopovar/AnyPS5/pull/6232) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6317](https://www.github.com/boykopovar/AnyPS5/pull/6317) | `docs/dev/debt/shader.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/dev/debt/shader.md` | | [PR 6416](https://www.github.com/boykopovar/AnyPS5/pull/6416) | `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6492](https://www.github.com/boykopovar/AnyPS5/pull/6492) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6498](https://www.github.com/boykopovar/AnyPS5/pull/6498) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6503](https://www.github.com/boykopovar/AnyPS5/pull/6503) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6645](https://www.github.com/boykopovar/AnyPS5/pull/6645) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6741](https://www.github.com/boykopovar/AnyPS5/pull/6741) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6767](https://www.github.com/boykopovar/AnyPS5/pull/6767) | `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/debt/shader.md` | | [PR 6783](https://www.github.com/boykopovar/AnyPS5/pull/6783) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6786](https://www.github.com/boykopovar/AnyPS5/pull/6786) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6804](https://www.github.com/boykopovar/AnyPS5/pull/6804) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6931](https://www.github.com/boykopovar/AnyPS5/pull/6931) | `docs/dev/ARCHITECTURE.md` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6973](https://www.github.com/boykopovar/AnyPS5/pull/6973) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/dev/debt/shader.md` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7089](https://www.github.com/boykopovar/AnyPS5/pull/7089) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7175](https://www.github.com/boykopovar/AnyPS5/pull/7175) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7178](https://www.github.com/boykopovar/AnyPS5/pull/7178) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7193](https://www.github.com/boykopovar/AnyPS5/pull/7193) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7258](https://www.github.com/boykopovar/AnyPS5/pull/7258) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/dev/debt/shader.md` |
LeandroLP23 commented 2026-10-16 09:33:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-16T09:33:55Z.


Small doc mismatch: this PR bumps FormatVersion in ShaderDiskCache.hpp to 37, but the docs/dev/ARCHITECTURE.md line it edits says FormatVersion 36. On main the same line already lags (33 there vs 36 in the code). Dropping the number, so it reads "The disk cache stores the table...", would keep the line from going stale on every bump. It would also stop the two PRs that touch it from conflicting on that line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6212557309 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6212557309). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-16T09:33:55Z. --- Small doc mismatch: this PR bumps `FormatVersion` in `ShaderDiskCache.hpp` to 37, but the `docs/dev/ARCHITECTURE.md` line it edits says `FormatVersion` 36. On `main` the same line already lags (33 there vs 36 in the code). Dropping the number, so it reads "The disk cache stores the table...", would keep the line from going stale on every bump. It would also stop the two PRs that touch it from conflicting on that line.
EagleBearerYS commented 2026-10-16 09:43:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-16T09:43:17Z.


Thanks, @LeandroLP23. The line now reads "The disk cache stores ...", without the number (ca174bc7e6 here, merged into #6454 too).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6212717625 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6212717625). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-16T09:43:17Z. --- Thanks, @LeandroLP23. The line now reads "The disk cache stores ...", without the number (ca174bc7e6 here, merged into #6454 too).
oneandonlydean commented 2026-10-18 00:57:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T00:57:20Z.


Thanks for this. Our review of 9dcf40803 passed (the bindless, disk cache and image table tests pass with the change merged onto main), so this is close.

It now conflicts with main in core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, after #7325 ("fold chained immediate addends of image-table record offsets") merged. Could you rebase onto current main? The other files merge cleanly.

One more thing to know: #6488 also uses cache FormatVersion 37. Whichever of the two merges second will need to move to 38, so we may ask for that bump after the rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243966532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6243966532). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T00:57:20Z. --- Thanks for this. Our review of 9dcf40803 passed (the bindless, disk cache and image table tests pass with the change merged onto main), so this is close. It now conflicts with main in `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`, after #7325 ("fold chained immediate addends of image-table record offsets") merged. Could you rebase onto current main? The other files merge cleanly. One more thing to know: #6488 also uses cache FormatVersion 37. Whichever of the two merges second will need to move to 38, so we may ask for that bump after the rebase.
oneandonlydean commented 2026-10-18 01:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T01:07:16Z.


Thanks for this. Our review of 9dcf40803 passed (the bindless, disk cache and image table tests pass with the change merged onto main), so this is close.

It now conflicts with main in core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, after #7325 ("fold chained immediate addends of image-table record offsets") merged. Could you rebase onto current main? The other files merge cleanly.

One more thing to know: #6488 also uses cache FormatVersion 37. Whichever of the two merges second will need to move to 38, so we may ask for that bump after the rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244050314 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6244050314). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T01:07:16Z. --- Thanks for this. Our review of 9dcf40803 passed (the bindless, disk cache and image table tests pass with the change merged onto main), so this is close. It now conflicts with main in `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`, after #7325 ("fold chained immediate addends of image-table record offsets") merged. Could you rebase onto current main? The other files merge cleanly. One more thing to know: #6488 also uses cache FormatVersion 37. Whichever of the two merges second will need to move to 38, so we may ask for that bump after the rebase.
EagleBearerYS commented 2026-10-18 01:25:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T01:25:31Z.


@oneandonlydean main is merged in at 8c6765be71 (main f1af6c5915), so the conflict with #7325 in tests/ShaderMemory.cpp is resolved. Both sides' tests stay, with #7325's verifyChainedTableOffset after this PR's selected-record tests, and the other files merged cleanly. I merged rather than rebased, so the head you reviewed, 9dcf408034, is the merge's first parent and the change itself is unchanged. On GitHub's runners (run), the bindless, disk cache and image table tests pass 3 runs in a row on Linux, as do the ^agc tests. On Windows the only failures are agc_driver_pm4_replay_tool and agc_shader_replay_tool, which fail the same way on that runner for an unrelated branch today (run). The run shows as failed because of those two and libc's precise_wait timing test on Linux; this PR doesn't touch libc.

On the cache format: if #6488 lands first, the next merge of main here moves this PR to 38. #6455, next in your order, merges cleanly with current main, with every check passing (two skipped).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244198622 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6243#issuecomment-6244198622). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T01:25:31Z. --- @oneandonlydean `main` is merged in at 8c6765be71 (`main` f1af6c5915), so the conflict with #7325 in `tests/ShaderMemory.cpp` is resolved. Both sides' tests stay, with #7325's `verifyChainedTableOffset` after this PR's selected-record tests, and the other files merged cleanly. I merged rather than rebased, so the head you reviewed, 9dcf408034, is the merge's first parent and the change itself is unchanged. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39083139632)), the bindless, disk cache and image table tests pass 3 runs in a row on Linux, as do the `^agc` tests. On Windows the only failures are `agc_driver_pm4_replay_tool` and `agc_shader_replay_tool`, which fail the same way on that runner for an unrelated branch today ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39061670036)). The run shows as failed because of those two and libc's `precise_wait` timing test on Linux; this PR doesn't touch libc. On the cache format: if #6488 lands first, the next merge of `main` here moves this PR to 38. #6455, next in your order, merges cleanly with current `main`, with every check passing (two skipped).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6243
No description provided.