Skip to content

perf(shader): keep the vector window to the blocks between relative accesses - #15520

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
beardsciences:perf/scoped-vector-window
Nov 9, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
beardsciences:perf/scoped-vector-window

Conversation

@beardsciences

@beardsciences beardsciences commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What

A program that addresses vector registers relatively (v_movrels_b32, v_movreld_b32, v_movrelsd_b32, v_movrelsd_2_b32, v_swaprel_b32) keeps its registers from the lowest relatively addressed one up in a window array. When it also writes through the window, every direct access in every block went through that array, even in blocks no relative access can reach or follow.

This keeps the window only in the blocks on a path from one relative access to another (the relative blocks plus every block both reachable from one and reaching one). Every other block keeps the registers in SSA values. Execution cannot return into those blocks once it leaves them, so the registers are copied into the window once where control enters them and, for a program with relative writes, back where it leaves. A copy sits at the start of the target block when all of that block's predecessors are on the other side, otherwise at the end of the source block. When the relative blocks are the whole program nothing changes. APS5_NO_SCOPED_VECTOR_WINDOW=1 keeps every block in the window; it is a recompiler switch, so it is part of the shader cache key.

The case that showed it: MediEvil: Resurrection (PPSA07550) runs in the PS5's PSP emulator, whose clipping geometry program (3184 words) has all 104 of its relative accesses in a section entered only by a wave with a primitive to clip. With APS5_PIPELINE_STATS=1 on NVIDIA (RTX 3060 Ti), a run from boot to the 3D menu creates 27 pipelines with that program. On main each of their mesh executables has 255 registers, 13,648–14,928 bytes of local memory per thread and 1.57–1.61 MB of code; with this change 255 registers, 3,312–3,744 bytes and 1.24–1.27 MB (Local Memory Size less the 2^36 the driver adds to every value; both logs attached). That program draws all of the title's 3D; every PS5 PSP release runs the same emulator.

pipeline-stats-main-4f41f4c375.txt
pipeline-stats-pr-a572e50206.txt

Cost in PPSA07550 gameplay: Dan's Crypt, the first level, with Sir Dan standing at the start after the level's opening movie (no input after the menu; presents and GPU time stay flat in 5 s steps across every window in the table). RTX 3060 Ti, warm caches, APS5_TRACE_SECONDS=640:60 and no other trace or profile switch, runs alternating in the order main 1, change 1, main 2, change 2, main 3. main is 4f41f4c, the change is this PR's commit a572e50 on it.

presents in 60 s frame p50 / p90 / p99 ms GPU busy per present
main, run 2 597 99.2 / 193.3 / 216.2 99.9 ms
main, run 3 662 89.8 / 163.1 / 184.7 90.4 ms
change, run 1 1590 37.9 / 42.7 / 58.4 37.3 ms
change, run 2 1578 38.9 / 42.3 / 59.5 37.6 ms

Each build first ran once untraced with frame dumps to warm the caches. main's untraced run never started a new game (its scripted presses did not get it past the menu), so its traced run 1 was the first to build the level's pipelines and was still in the level's opening movie during the window (1739 presents, 6.1 ms GPU busy per present); it is not in the table, but its trace and summary are attached. The four runs in the table report trace_dropped (the event buffers of the queue worker and the draw committer filled after 7–33 s); totals_full is false for every thread, so the summary numbers are complete. Traces and tools/trace_digest.py output attached.

aps5-trace-4f41f4c375f5-22248.json.gz
aps5-trace-4f41f4c375f5-38360.json.gz
aps5-trace-4f41f4c375f5-41496.json.gz
aps5-trace-a572e502064e-42364.json.gz
aps5-trace-a572e502064e-43468.json.gz
digest-main-1.txt
digest-main-2.txt
digest-main-3.txt
digest-pr-1.txt
digest-pr-2.txt
summary-main-1.txt
summary-main-2.txt
summary-main-3.txt
summary-pr-1.txt
summary-pr-2.txt

Summary lines, in run order
{"commit":"4f41f4c375f5","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"640:60"},"gpu":"NVIDIA GeForce RTX 3060 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32674,"title_id":"PPSA07550","title":"MediEvil: Resurrection","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 640:60","first_present":13995,"ms":60028.524},"presents":1739,"frame_ms":{"p50":31.114,"p90":40.619,"p99":41.598,"max":42.083},"gpu_busy_ms_per_present":6.134,"worker_busy_pct":{"queue worker 0x0":7.300},"top_phases_ms_per_frame":{"VideoOut.Flip":6.491,"VideoOut.Flip.present":6.307,"Driver.Present":6.306,"Driver.Present.render_fence_wait":5.904,"Vulkan.Retire":5.904,"Vulkan.Retire.wait":5.895,"Driver.Packet":2.509,"Graphics.Draw":1.749},"trace_dropped":false,"trace":"aps5-trace-4f41f4c375f5-41496.json.gz"}
{"commit":"a572e502064e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"640:60"},"gpu":"NVIDIA GeForce RTX 3060 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32674,"title_id":"PPSA07550","title":"MediEvil: Resurrection","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 640:60","first_present":18241,"ms":60018.478},"presents":1590,"frame_ms":{"p50":37.942,"p90":42.748,"p99":58.382,"max":71.954},"gpu_busy_ms_per_present":37.330,"worker_busy_pct":{"queue worker 0x0":86.640},"top_phases_ms_per_frame":{"Driver.Packet":32.675,"VideoOut.Flip":32.297,"Driver.Present":32.126,"VideoOut.Flip.present":32.108,"Driver.Present.render_fence_wait":31.464,"Vulkan.Retire":31.464,"Vulkan.Retire.wait":31.453,"Driver.Packet.draw":25.329},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.504,"events_lost":1830725,"totals_full":false},"draw committer":{"events_full_after_s":12.089,"events_lost":1021395,"totals_full":false}},"trace":"aps5-trace-a572e502064e-42364.json.gz"}
{"commit":"4f41f4c375f5","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"640:60"},"gpu":"NVIDIA GeForce RTX 3060 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32674,"title_id":"PPSA07550","title":"MediEvil: Resurrection","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 640:60","first_present":16452,"ms":60059.768},"presents":597,"frame_ms":{"p50":99.172,"p90":193.318,"p99":216.152,"max":287.487},"gpu_busy_ms_per_present":99.915,"worker_busy_pct":{"queue worker 0x0":90.310},"top_phases_ms_per_frame":{"VideoOut.Flip":99.029,"Driver.Present":98.523,"VideoOut.Flip.present":98.352,"Driver.Present.render_fence_wait":97.692,"Vulkan.Retire":97.692,"Vulkan.Retire.wait":97.678,"Driver.Packet":90.811,"Driver.Packet.rendering_wait":61.132},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":19.348,"events_lost":559515,"totals_full":false},"draw committer":{"events_full_after_s":32.833,"events_lost":215610,"totals_full":false}},"trace":"aps5-trace-4f41f4c375f5-38360.json.gz"}
{"commit":"a572e502064e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"640:60"},"gpu":"NVIDIA GeForce RTX 3060 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32674,"title_id":"PPSA07550","title":"MediEvil: Resurrection","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 640:60","first_present":18227,"ms":60015.649},"presents":1578,"frame_ms":{"p50":38.879,"p90":42.327,"p99":59.463,"max":79.446},"gpu_busy_ms_per_present":37.623,"worker_busy_pct":{"queue worker 0x0":83.734},"top_phases_ms_per_frame":{"VideoOut.Flip":34.866,"Driver.Present":34.688,"VideoOut.Flip.present":34.669,"Driver.Present.render_fence_wait":33.932,"Vulkan.Retire":33.932,"Vulkan.Retire.wait":33.921,"Driver.Packet":31.820,"Driver.Packet.draw":23.122},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.508,"events_lost":1822930,"totals_full":false},"draw committer":{"events_full_after_s":12.721,"events_lost":977646,"totals_full":false}},"trace":"aps5-trace-a572e502064e-43468.json.gz"}
{"commit":"4f41f4c375f5","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"640:60"},"gpu":"NVIDIA GeForce RTX 3060 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32674,"title_id":"PPSA07550","title":"MediEvil: Resurrection","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 640:60","first_present":16690,"ms":60158.202},"presents":662,"frame_ms":{"p50":89.835,"p90":163.077,"p99":184.732,"max":189.693},"gpu_busy_ms_per_present":90.375,"worker_busy_pct":{"queue worker 0x0":92.326},"top_phases_ms_per_frame":{"VideoOut.Flip":90.028,"Driver.Present":89.502,"VideoOut.Flip.present":89.373,"Driver.Present.render_fence_wait":88.815,"Vulkan.Retire":88.815,"Vulkan.Retire.wait":88.803,"Driver.Packet":83.860,"Driver.Packet.rendering_wait":60.556},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":17.294,"events_lost":636913,"totals_full":false},"draw committer":{"events_full_after_s":31.818,"events_lost":231696,"totals_full":false}},"trace":"aps5-trace-4f41f4c375f5-22248.json.gz"}

#15362 (open) stops zeroing the NVIDIA mesh window buffer at workgroup start; it and this PR change different files and merge without a conflict. Neither build above has it.

The change edits the recompiler, so the shader cache's source version changes and cached modules are rebuilt once.

Tests: agc_vector_window gains a translation check that registers outside a loop of relative writes stay out of the window (it fails on main). The new GPU test agc_driver_vector_window_region runs relative reads and writes inside a loop that only some waves enter, in wave32 and wave64, with a fully active, a partly active and a skipped wave, and covers each copy placement: into the window at the end of a source block and at the start of a target block, back at the start of a target block and at the end of a source block that also leads to a join, and a window that includes the entry block, read relatively at a register only the entry prologue sets (added in a04c37a after review). It also checks inactive lanes, a register only read relatively and a register never written. docs/dev/debt/shader.md describes the scoped window and where its copies run.

Overlap: 172 open PRs share a file with this one. tools/pr_overlap.py --branch finds no overlap with the 98 it could compare; it could not compare the other 74 because they conflict with main. Checked by hand with git merge-tree of each against main and against this branch: 70 add no conflict with this change, among them #7410, #10359, #11265 and #11490 (they edit InstructionTranslator.cpp or TranslationContext.hpp) and #12548 (VectorWindow.cpp). #6924, #10757 and #12324 each add an ENVIRONMENT.md row in the same place as this PR's row, and #14212 rewraps the whole debt file, so whichever of those lands second needs a one-line rebase. #15362 and this PR merge without a conflict.

Tested

Windows 11, NVIDIA GeForce RTX 3060 Ti, driver 621.01 (32.0.16.2101). main is 4f41f4c and the change is this PR's commit a572e50 on it; every build below is a clean tree at one of those two commits, apart from the two local edits named in the second item. tools/check_conventions.py --base origin/main passes.

  • Validation, main and the change: ctest --test-dir build -R "mesh|vector_window|relative|window_lane|ngg|provoking" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer; both logs attached, each starting with its commit. Neither contains was not found but was requested by env var VK_INSTANCE_LAYERS; the loader inserts VK_LAYER_KHRONOS_validation into every Vulkan instance (24 in main's run, 25 in the change's, which has the new test), next to the machine's implicit layers (NVIDIA's and the OBS and Overwolf capture hooks). The layer reports the same 20 messages in both, all WARNING-VkImageSubresourceRange-layerCount-compatibility, and no VUID- error. main passes 28 of 28, the change 29 of 29.
    validation-main-4f41f4c375.txt
    validation-pr-a572e50206.txt

  • agc_driver_vector_window_region fails when any copy placement is removed from the translator (local edits, not in this PR): without the copies at the start of a target block, loop, wave32 lane 0 v10 is 0x00000002, expected 0x00000001; without the copies at the end of a source block, v1 is 0x00000000, expected 0x00000001; without the copy into the window after the entry prologue (entryIr.SyncVectorWindow(true), checked at a04c37a), entry block reads an input register, wave32 lane 1 v1 is 0xdeadbeef, expected 0x00000011. The new agc_vector_window check fails with APS5_NO_SCOPED_VECTOR_WINDOW=1.

  • agc_driver_mesh_vector_window_waves passes with this change (2 of 2) and still fails with APS5_NO_MESH_WINDOW_BUFFER=1 (2 of 2, wrong threads per wave: 0 64 64 64); log attached.
    regression-pr-a572e50206.txt

  • python tools/select_tests.py ctest build --output-on-failure --timeout 120 --parallel 4 on the change: 3907 of 3919 pass. Six of the twelve failures pass when run alone. The other six: test_registration and select_tests_MissingCommandTests need symlink rights (os.symlink, WinError 1314), annotate_module and conventions_wrapped_declarations time out, and agc_driver_direct_write_completion and agc_driver_store_over_untracked fail the same way on main and with APS5_NO_SCOPED_VECTOR_WINDOW=1 (neither has relative addressing).

  • MediEvil: Resurrection (PPSA07550), both builds from boot through the 3D main menu, the New Game movie and Dan's Crypt: the menu and the level render the same.

    Before: main, the spot the traces measure (frames from separate runs of the same builds with APS5_DUMP_FRAMES).

gameplay-main

After: this PR, the same spot.
gameplay-pr

Pixel compare of these two frames: 5,911 of 518,400 pixels differ (1.14 %), 49 of them by more than 24 of 255, all on Sir Dan's idle pose, the flickering light in the doorway and a few dust pixels; the rest is identical bit for bit. The closest pair of frames within one build differs more: main 1.95 %, this PR 1.55 %. Red marks every pixel that differs.
dans-crypt-diff-main-vs-change

3D main menu, main and then this PR (the skeleton's idle pose differs between the two frames).
menu-main
menu-pr

  • Not tested here: AMD and Intel GPUs (the change applies on every GPU), other NVIDIA GPUs and drivers. TechLevelZero's CI passed on a572e50 and a04c37a on an NVIDIA RTX 2000 Ada (Linux, 595.99.02) and an AMD Radeon RX 6300 (RADV, Mesa 25.2.8).

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 3060 Ti, driver 621.01 (32.0.16.2101), Windows 11
  • AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added perf Performance change shader core/shader docs agc libSceAgc* labels Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a572e50 merged onto main 4f41f4c · tested 2026-11-03 18:04 UTC · 30 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,688 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,741 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (924 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_driver_submit_progress: failed in 5 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 517 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (517 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 509 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin a572e502064e488ff130b37a19bea17981789e91 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff a572e502064e488ff130b37a19bea17981789e91
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean oneandonlydean self-assigned this Nov 3, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi beardsciences,

Thanks for this, and for the detailed traces. The region and copy logic look right to me. Two small requests:

  1. Removing the copy into the window at the start of the entry block (entryIr.SyncVectorWindow(true) after the prologue, in InstructionTranslator.cpp) still leaves every test passing. Could one variant of VectorWindowRegion relatively read, inside a region that includes the entry block, a register that only the prologue sets (an input VGPR)? Then that copy is covered.
  2. Both builds made frame dumps while warming the caches. A pixel compare of main and the change at the same point in Dan's Crypt would show that the scoped window doesn't change what the clipping program draws.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head a572e50 merged onto main 1e65852 · tested 2026-11-03 21:47 UTC · 23 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,681 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 57 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,747 of 3,818 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (930 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 54.3 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_store_over_untracked
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 518 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (518 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 510 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (57)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscree
Reproduce
git fetch origin a572e502064e488ff130b37a19bea17981789e91 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff a572e502064e488ff130b37a19bea17981789e91
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a04c37a merged onto main 1e65852 · tested 2026-11-03 22:04 UTC · 17 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,695 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,747 of 3,818 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 518 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (518 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 510 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin a04c37a63c55211a2b62dab3e9774ec67d69785a 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff a04c37a63c55211a2b62dab3e9774ec67d69785a
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head a04c37a merged onto main 1e65852 · tested 2026-11-03 22:07 UTC · 19 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,680 passed · 10 failed (0 new, 9 also fail on main, 1 unstable on main) · 57 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,747 of 3,818 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.4 s, ⚠️ public_headers 53.9 s, ⚠️ agc_driver_stream_copy 42.3 s, ⚠️ agc_driver_image_sample_unnormalized 42.1 s, ⚠️ agc_driver_sample_multisample_target 41.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
Failing on main too (9, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_store_over_untracked
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 518 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (518 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 510 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (57)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscree
Reproduce
git fetch origin a04c37a63c55211a2b62dab3e9774ec67d69785a 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff a04c37a63c55211a2b62dab3e9774ec67d69785a
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@beardsciences

Copy link
Copy Markdown
Contributor Author

Thanks, both done.

  1. a04c37a adds a fourth variant to VectorWindowRegion, "entry block reads an input register". Its entry block runs s_mov_b32 m0, 0 and v_movrels_b32 v16, v0, so the window starts at v0 and the region includes the entry block. Only the prologue sets v0 (the thread id), and the loop later reads v16 relatively into v5, so both must hold the thread id. RTX 3060 Ti, NVIDIA 621.01, Windows, wave32 and wave64:

    • with the change: passes, 2 of 2
    • with APS5_NO_SCOPED_VECTOR_WINDOW=1: passes, 2 of 2
    • with entryIr.SyncVectorWindow(true) removed: fails, 2 of 2: vector window region: entry block reads an input register, wave32 lane 1 v1 is 0xdeadbeef, expected 0x00000011. The program also computes each lane's output offset from v0, which in that region it reads from the window, so without the copy lane 1's results are never written.

    The traces and the other evidence in the description are from a572e50; the new commit changes only the test.

  2. Pixel compare in Dan's Crypt, using the two gameplay screenshots in the description (main 4f41f4c frame 317 and the change a572e50 frame 371, 960x540 frame dumps from the warm-up runs, same camera): 5,911 of 518,400 pixels differ (1.14 %), 49 of them by more than 24 of 255. All of them are on Sir Dan, who is playing his idle animation, on the flickering light in the doorway, and on a few single dust pixels; the rest of the frame is identical bit for bit. For scale, the closest pair of frames within one build differs more: main frames 339 and 357 by 1.95 %, the change's frames 302 and 342 by 1.55 %. Red marks every pixel that differs:

dans-crypt-diff-main-vs-change

CI on a04c37a: TechLevelZero's NVIDIA and AMD runs passed. relinker (macos-latest, clang++) shows as failed, but it was cancelled at the job's 15-minute limit after its build and ctest steps had passed; a re-run should clear it.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

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

Pull request Shared files not compared
PR 1896 docs/dev/ENVIRONMENT.md
PR 4472 docs/dev/ENVIRONMENT.md
PR 5021 docs/dev/debt/shader.md
PR 5371 docs/dev/debt/shader.md
PR 6186 docs/dev/ENVIRONMENT.md
PR 6235 docs/dev/debt/shader.md
PR 6280 docs/dev/debt/shader.md
PR 6412 docs/dev/debt/shader.md
PR 6488 docs/dev/debt/shader.md
PR 6924 docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 7449 docs/dev/ENVIRONMENT.md
PR 7457 docs/dev/ENVIRONMENT.md
PR 7514 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 7684 docs/dev/debt/shader.md
PR 8004 docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 8484 docs/dev/ENVIRONMENT.md
PR 9289 docs/dev/ENVIRONMENT.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 docs/dev/ENVIRONMENT.md
PR 9387 docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 9748 docs/dev/debt/shader.md
PR 9852 docs/dev/ENVIRONMENT.md
PR 10193 docs/dev/ENVIRONMENT.md
PR 10359 core/shader/recompiler/Translation/src/InstructionTranslator.cpp
PR 10442 docs/dev/ENVIRONMENT.md
PR 10652 docs/dev/debt/shader.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 12316 docs/dev/debt/shader.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 13809 docs/dev/ENVIRONMENT.md
PR 13863 docs/dev/ENVIRONMENT.md
PR 13920 docs/dev/ENVIRONMENT.md
PR 13928 docs/dev/ENVIRONMENT.md
PR 13929 docs/dev/ENVIRONMENT.md
PR 14212 docs/dev/debt/shader.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 14344 docs/dev/ENVIRONMENT.md
PR 14377 docs/dev/debt/shader.md
PR 15059 docs/dev/ENVIRONMENT.md
PR 15136 docs/dev/ENVIRONMENT.md
PR 15570 docs/dev/ENVIRONMENT.md
PR 15681 docs/dev/debt/shader.md
PR 16831 docs/dev/ENVIRONMENT.md
PR 17024 docs/dev/ENVIRONMENT.md

@beardsciences

Copy link
Copy Markdown
Contributor Author

@oneandonlydean both requests from your review are done in the comment above: the entry-prologue variant in a04c37a, and the Dan's Crypt pixel compare. The PR still merges cleanly with current main.

@oneandonlydean
oneandonlydean merged commit da47ac9 into boykopovar:main Nov 9, 2026
16 of 17 checks passed
@beardsciences
beardsciences deleted the perf/scoped-vector-window branch November 9, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs perf Performance change shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants