Skip to content

perf(shader): end dead code elimination when no released value is left dead - #7494

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:perf/dce-skip-confirming-pass
Nov 8, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:perf/dce-skip-confirming-pass

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What

DeadCodeEliminator::Eliminate repeats a pass over every block until a pass removes nothing. So every call that removes anything pays one more full pass that only confirms the result.

The pass walks the blocks and their instructions backwards. An instruction it has already visited can only become dead later in the pass when the removal of one of its users drops its last use. For a non-phi user, that argument is usually defined earlier and is still ahead in the walk. The exception is an argument the walk has already passed, such as a phi's input from a later block. Uses only shrink during the pass, and an instruction's side effects don't change.

The pass now keeps the arguments of the instructions it removes. It runs again only when one of them is still in a block, has no uses and has no side effects. If none is, nothing removable is left in the blocks, and the next pass would have removed nothing. When one is, the next pass runs as before. The set of removed instructions, the order of the instructions that remain, and so the SPIR-V are unchanged.

agc_ir_reclaim now checks that an unused phi in the first block and its input in a later block are both removed. That passes on main (in a second pass) and with this PR. With the recheck replaced by changed = false, it fails with "the input of an eliminated phi from a later block was not eliminated".

Tested

Ubuntu 24.04 (Linux 6.8), GCC 13.3, NVIDIA RTX 4070 Ti, driver 595.99.02.

  • ctest -R "^agc_|^shader_ir" on cb1d6e5: 709/709 pass (3 skipped: host import sparse, sparse dma-buf import, stencil ref export). After rebasing onto 9caecfd: agc_ir_reclaim, agc_masked_select and agc_constant_phi pass.
  • agc_shader_replay --spv (Release, ANYPS5_ENABLE_SPIRV_TOOLS off, ANYPS5_NO_SHADER_CACHE=1) on 420 shader requests I had dumped with APS5_DUMP_SHADERS: 355 from MXGP 26 (PPSA30839, two dumps), 61 from PPSA31162 and 4 from another app. On main cb1d6e5 and with this PR, all 419 .spv files that are produced have the same SHA-256, and the replay output is identical, including the one request that fails on both.

Pass time, from a temporary timer and pass counter in Eliminate that are not part of this PR:

Replay Build DCE calls DCE passes DCE time
PPSA31162's largest compute shader (1,056,287 SPIR-V words), 20 runs per build, interleaved main 13 22 126.6 ± 6.2 ms (median 127.0)
this PR 13 13 85.4 ± 2.3 ms (median 85.1)
the 355 PPSA30839 requests in one replay, 3 runs per build, interleaved main 4,210 6,873 1,595.1, 1,620.4, 1,604.3 ms
this PR 4,210 4,544 1,249.6, 1,250.8, 1,279.6 ms

In the PPSA30839 requests, 334 passes beyond the first per call remain with this PR, for values that the walk had already passed. The largest shader's whole replay takes about 1.2 s of CPU time, so its gain is about 3.5% of that.

Title level: no speed claim. This is background shader preparation. I didn't run a title for it.

This is independent of #7431 (PlanBuilder::PatchReads) and #7491 (MaskedSelectEliminator), which change other passes of the same shader preparation. #7491 calls Eliminate after rounds that remove a select.

tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py reports no overlap with open pull requests.

Title capture

As the perf label asks, these are captures of one title and scene on one machine. MXGP26 (PPSA30839) ran from boot with APS5_TRACE_SECONDS=0:60, ANYPS5_NO_SHADER_CACHE=1 and a fresh run directory (cold AnyPS5 and NVIDIA caches), so the shaders compile inside the window. NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04, release libs, Xvfb display, no input. main dbac9fa was captured five times: before the PR captures, after them, and three more times in a row after that. Each PR capture and the first two main captures followed a rebuild of the release libraries; the last three main captures did not, and they came out lower. The change is main with this PR merged on top as a local merge commit (da0ca697c5e9). The time is the wall time of the Shader.PrepareArtifact slices on the shader prepare threads in each trace.

capture presents frame p50 / p90 artifacts prepared prepare time, total per artifact, mean / median
main 1 194 16.7 / 32.8 ms 935 87.3 s 93.4 / 27.7 ms
main 2 195 16.7 / 34.0 ms 956 91.4 s 95.6 / 29.6 ms
main 3 166 16.7 / 28.4 ms 961 82.1 s 85.4 / 27.3 ms
main 4 161 16.7 / 27.9 ms 946 77.6 s 82.1 / 24.7 ms
main 5 183 16.7 / 22.7 ms 939 78.4 s 83.5 / 22.8 ms
this PR 187 16.7 / 31.6 ms 946 95.2 s 100.6 / 28.5 ms

The five main captures span 17.7% in total prepare time, and the 13 prepare threads run in parallel with the title, so a title capture can't resolve a recompiler change of a few percent. The replay measurement above is this change's measurement. This PR's capture is above all five main captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help.

main 1 trace, digest, main 2 trace, digest, main 3 trace, digest, main 4 trace, digest, main 5 trace, digest, this PR trace, digest

{"commit":"dbac9fa15b61","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":120148.301},"presents":194,"frame_ms":{"p50":16.686,"p90":32.765,"p99":2921.590,"max":112847.624},"gpu_busy_ms_per_present":6.483,"worker_busy_pct":{"queue worker 0x0":88.481,"queue worker 0x20":73.127},"top_phases_ms_per_frame":{"Driver.Packet":1000.862,"Driver.Packet.dispatch":503.561,"Driver.Dispatch":503.451,"Shader.PrepareArtifact":450.125,"Driver.Packet.memory_wait":424.003,"Vulkan.GraphicsPipeline":132.519,"Vulkan.GraphicsPipelineLibrary":126.497,"Vulkan.GraphicsPipelinePrebuild":77.312},"trace_dropped":false,"trace":"aps5-trace-dbac9fa15b61-3.json.gz"}
{"commit":"da0ca697c5e9","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":117333.848},"presents":187,"frame_ms":{"p50":16.709,"p90":31.588,"p99":2098.845,"max":110882.020},"gpu_busy_ms_per_present":4.954,"worker_busy_pct":{"queue worker 0x0":88.094,"queue worker 0x20":71.639},"top_phases_ms_per_frame":{"Driver.Packet":1002.245,"Driver.Packet.dispatch":509.476,"Driver.Dispatch":509.370,"Shader.PrepareArtifact":509.078,"Driver.Packet.memory_wait":419.504,"Vulkan.GraphicsPipeline":125.361,"Vulkan.GraphicsPipelineLibrary":119.275,"Vulkan.GraphicsPipelinePrebuild":72.435},"trace_dropped":false,"trace":"aps5-trace-da0ca697c5e9-3.json.gz"}
  • Khronos validation layer (LunarG SDK 1.4.363), NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -V on main e2a2914 and on main + this PR (0aab6c1, a local merge). main: 815 of 815 pass. With this PR, 814 of 815 pass: agc_storage_written_buffer_order aborted in the dynamic loader before the test began (Inconsistency detected by ld.so: ... elf_machine_rela_relative: Assertion ... failed). A test in another PR's run hit the same assertion that evening, so it isn't this change. Rerun 5 times under the layer on the same merge, agc_storage_written_buffer_order passes 5 of 5 with no VUIDs. Neither log reports the layer missing. VUIDs on main and with this PR: VUID-vkCmdCopyBuffer-srcBuffer-00118 ×2, VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285 ×2, VUID-vkCmdWaitEvents-srcStageMask-01158 ×2, VUID-VkImageViewCreateInfo-usage-02275 ×6, VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ×18, VUID-vkSetEvent-event-09543 ×2. None is new with this PR.
  • Windows 11 Pro 26220, RTX 4070 (NVIDIA 596.21), WinLibs GCC 15.2 r7, Release, by @screamm (comment): merged with perf(shader): leave out the both-zero select of f16 min and max #7516 on main 1d41645 (and with perf(shader): keep one use list per IR value #7520/perf(shader): leave out the dead code pass after masked-select elimination #7522 in a second arm): agc_ir_reclaim (including the later-block phi case), agc_masked_select, agc_constant_phi and the 41-test shader set pass 3 of 3; identical shader-cache entries and replay hashes against two main runs (Showcase PPSA99005, RetroArch PPSA99169, vkQuake PPSA99010), static frames bit-identical, and draw-path recompile time within main's spread.

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 4070 Ti, driver 595.99.02, Ubuntu 24.04 (Linux 6.8); NVIDIA RTX 4070 (596.21), Windows 11 (@screamm)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

…t dead

DeadCodeEliminator::Eliminate repeated its pass over every block until a
pass removed nothing, so each call that removed anything paid one more
full pass that only confirmed the result. The pass walks the blocks
backwards, so an instruction it already visited can only become dead
when the removal of one of its users drops its last use. The pass now
keeps the arguments of the instructions it removes and runs again only
when one of them is still in a block, has no uses and has no side
effects. Otherwise the next pass would have removed nothing.

agc_ir_reclaim now checks that an unused phi and its input from a later
block are both removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milescoviello
milescoviello force-pushed the perf/dce-skip-confirming-pass branch from 4b011bf to 0aab6c1 Compare October 18, 2026 09:34
@github-actions github-actions Bot added shader core/shader agc libSceAgc* labels Oct 18, 2026
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@milescoviello

Copy link
Copy Markdown
Contributor Author

The title capture the perf label asks for is now in the description, with both summary lines, the traces and the digests: MXGP26 from boot, a cold shader cache, main dbac9fa against main + this PR (da0ca697c5e9). The five main captures span 17.7% in total shader prepare time, so the capture can't resolve this change, and the replay measurement in the description is still its measurement. This PR's capture is above all five main captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the perf numbers missing perf pull request without a before and after summary line label Oct 19, 2026
@screamm

screamm commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Independent run, Windows. Host: Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2 r7, Release. This PR at 0aab6c1f3 was merged with #7516 (f099292f8; they share no file) on main 1d4164552 (arm A). A second arm added #7520 (d484281b6) and #7522 (cabf6ad53). All merges were clean. Targeted build: the shader and AGC test targets plus libs.

  • agc_ir_reclaim, including the new later-block phi case: 3 of 3 on both arms. Also 3x on both arms: agc_masked_select, agc_constant_phi, the ^shader_|^agc_shader_ set and the f16/f32 min/max GPU tests (41 tests). Arm A passed 40 of 41 and arm B 41 of 41, none skipped. The arm A exception, shader_cache_runtime_sources, hit its 180 s limit once on a loaded host and passed 3 of 3 serially.
  • Shader output, three homebrews, fresh shader cache directory per run, 60 s: Showcase PPSA99005 52 entries, RetroArch PPSA99169 24, vkQuake PPSA99010 52. Entry count, keys and payloads are the same for two main runs, arm A and arm B. I matched keys with the source-version word masked and compared payloads with host pointers masked: 5 Showcase entries hold a host address and differ between two main runs too. Showcase's two dumped compute requests replay (agc_shader_replay --spv) to identical SHA-256 on all three builds. That matches your replay result: the SPIR-V doesn't change.
  • Cold-cache A B A B, main, A, main, A, then one B run, 90 s each. Settings: ANYPS5_NO_SHADER_CACHE=1, a freshly relinked run directory each time, APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10. No run had a stop line. These titles have no Shader.PrepareArtifact slices, because they compile on the draw path. So I summed the draw-path "recompile" row of the [draw] driver phases lines over each run:
    • vkQuake: main 2594.5 / 2223.2 ms (16.7% apart), arm A 2530.6 / 2473.1 ms (+3.9% on the mean), arm B 2245.5 ms.
    • Showcase: main 46.8 / 35.0 ms, arm A 42.2 ms, arm B 39.7 ms. The other arm A run ran during a load spike on the host and is not usable.
    • RetroArch: 8924 to 9147 presents per run, p50 8.34 ms in every run.
    • All arm values are within the main spread, as you expected: a title capture can't resolve this change. These are the first title runs of it on Windows.
  • Frame dumps: vkQuake's four static console and loading screens are bit-identical between main and both arms. The animated frames of all three titles differ between two main runs too, so they can't be compared.
  • A negative control doesn't apply to a bit-exact optimisation. I didn't repeat your changed = false check; identical output stands in for it.
  • tools/check_conventions.py --base origin/main and git diff --check: pass.

Not checked: a full build, the agc_driver_ GPU suite, a pass count or DCE timing (that needs your temporary counter), AMD/Intel, Linux.

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks @screamm, the first Windows title runs of this one, and the identical cache entries and replay hashes are the right check for a bit-exact change. Added to the description.

AI-assisted: yes (Claude Code)

@milescoviello

Copy link
Copy Markdown
Contributor Author

A second title for this one: Crimson Desert (PPSA25286), whose start-up is CPU-bound on preparing registered shaders. I dumped 6,065 of its registration requests as they were prepared, then replayed them with agc_shader_replay --prepare. Release, SPIRV-Tools off, ANYPS5_NO_SHADER_CACHE=1, i7-13700K, task-clock over a fixed subset of 152 requests, 8 interleaved runs per build:

build median range
main 5d10ea9 16.58 s 16.50 to 16.75 s
main + this PR (0aab6c1, merged cleanly) 16.16 s 15.97 to 16.60 s

That's 2.5 % less CPU for these requests. The prepared SPIR-V of the 152 requests is byte-identical to main's.

I also tried replacing the remaining rescans with a worklist over the removed instructions' operands. All 6,065 prepared modules and 458 recompiled MXGP and SMB3D modules came out identical, but it measured 16.11 s (16.04 to 16.20 s), no better than this PR. So I'm not proposing it: this PR already takes nearly all of the dead-code pass's cost here.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The termination check is sound for the reverse walk: removing an instruction can only make one of its operands newly dead, so the pass repeats only when a released operand still belongs to a block, has no uses and has no side effects. The new later-block phi regression exercises that exception, and the reported control fails when the recheck is removed. The replay reports byte-identical SPIR-V/output hashes across 419 produced modules, and the second title replay shows a small CPU-time reduction with overlapping ranges. The MXGP title capture is noisy and slower than all five main captures; the description appropriately makes no title-speed claim. Conventions, eligibility, labels and report pass; hosted product jobs are skipped. Current tools/pr_overlap.py reports no overlap across 1,105 open PRs. I did not run the tests locally. No blocking issue found; approved.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks @MarcZX10 for the review, and for re-running pr_overlap.py across the open PRs.

AI-assisted: yes (Claude Code)

@blawesom

Copy link
Copy Markdown
Contributor

Static review plus an independent Linux/AMD run on both trees per the repo AGENTS shader-recompiler protocol (CachyOS, kernel 7.2.10, GCC 16.2.1, Ninja 1.13.2, Release, BUILD_TESTING=ON, Ryzen 7 9800X3D). No findings.

What I checked

  • The fixed point is preserved: changed now asks "did removing an instruction flip any of its arguments to dead?" instead of "did the pass remove anything?" — identical iteration criterion (an argument of a removed instruction is the only way an already-visited instruction can become dead mid-pass), and strictly cheaper: no extra full pass just to confirm. Termination is unchanged (each pass that continues removes at least one more instruction in the next one).
  • Null arguments are skipped (argument != nullptr), matching the phi-empty-operand case the new test builds.
  • The new test pins the exact panel behavior the old criterion would also have handled but this optimization must keep: a phi with an operand defined in a later block — with blocks walked in reverse, the phi dies first and its operand must be collected via released and die in the same or next pass. Both children assert Parent() == nullptr and the block's instruction list is empty, so partial cleanup (parent nulled but still listed) fails.

Focused paired run (VVL env)

tree agc_ir_reclaim VUID- missing-layer
this head 0aab6c1f35 Passed (0.00s) 0 0
main bb04a4f1ea Passed (0.00s) 0 0

Comparing logs, no new validation errors from this change.

Not covered

No benchmark measurement accompanies the perf claim (one confirmation pass saved per call that removed anything). That is a cheap self-evident win rather than a trace-visible one — repo AGENTS asks for tools/trace_digest.py diffs only for claims about title-visible speed; I would not block on that here, just noting the saving is argued from complexity, not measured.

@milescoviello

Copy link
Copy Markdown
Contributor Author

@blawesom thanks for the review and the paired run. On the measurement: the description's Replay table has it. agc_shader_replay --spv with interleaved builds puts DCE time on PPSA31162's largest compute shader (1,056,287 SPIR-V words, 20 runs) at 126.6 ± 6.2 ms on main and 85.4 ± 2.3 ms here, with DCE passes 22 → 13. Over the 355 PPSA30839 requests it's about 1,600 ms → 1,250 ms (passes 6,873 → 4,544). It's a CPU-only compile change with the same SPIR-V, so I didn't add a title trace.

AI-assisted: yes (Claude Code)

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0aab6c1 merged onto main ba5b533 · tested 2026-10-29 18:45 UTC · 28 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,208 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 39 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,253 of 2,891 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 (855 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 4 of the last 6 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_depth_clear_hle: SEGFAULT in the parallel run; also passed only on retry in 54 other runs in the last 7 days
Validation IDs already present on main (4 IDs in 404 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (404 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alpha_to_coverage, agc_driver_array_layer_target_cpu, agc_driver_bc_block_copy, and 396 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (39)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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_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_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_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_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 configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: 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_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SD
Reproduce
git fetch origin 0aab6c1f35249f95f4f0498e3314ea2acc8b60d8 ba5b5330b37724bca4b99f30faab504653635a04
git checkout ba5b5330b37724bca4b99f30faab504653635a04 && git merge --no-ff 0aab6c1f35249f95f4f0498e3314ea2acc8b60d8
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.

@adriadam10
adriadam10 merged commit 73047b1 into boykopovar:main Nov 8, 2026
15 of 16 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the new termination condition against IrValue::Invalidate/AddPhiOperand (phi inputs are arguments, collected before they are cleared, released is reset every pass so values outside blocks can't loop), and that the new agc_ir_reclaim case needs the recheck for the phi input from a later block; the one red test in the earlier batch run, agc_driver_sgpr_pattern_fill_keys, is unrelated to this diff; merged.

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

Labels

agc libSceAgc* perf Performance change shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants