Skip to content

refactor(agc): create, bind and free buffers through the device function table - #11920

Open
milescoviello wants to merge 3 commits into
boykopovar:mainfrom
milescoviello:perf/device-functions-hot-calls
Open

milescoviello wants to merge 3 commits into
boykopovar:mainfrom
milescoviello:perf/device-functions-hot-calls

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

Follow-up to #10764, as agreed with oneandonlydean there (comment). BiladeiroSupremo's lookup cache (BiladeiroSupremo/AnyPS5Wolverine@fccc2547a) gets a home in the resolved device-function table, not a separate per-thread cache. BiladeiroSupremo is credited with a Co-authored-by trailer.

Graphics::Context::Function looks a Vulkan device function up by name, through the loader and every implicit layer, on each call. #10764 moved the texture detiler onto Context::Resolved. That reads DeviceFunctions and falls back to Function only while the table is absent or lacks the entry.

I counted lookups by name in Call of Duty: Black Ops II (PPSA34502 01.010.000, 300 s of campaign gameplay). The build was main plus #10764 and #9656 plus a local counter (not in this PR). It made 2.1 million lookups by name, and four buffer calls account for 1.9 million of them:

Function Lookups
vkCreateBuffer 485,014
vkBindBufferMemory 485,013
vkGetBufferMemoryRequirements 485,013
vkDestroyBuffer 459,796
vkCmdPipelineBarrier 38,262
vkMapMemory 18,606
vkCreateImageView / vkDestroyImageView 8,731 / 6,677
vkResetDescriptorPool, fence calls, submit, command buffer begin/end/reset, framebuffers 3,000–7,500 each

They come from ShaderResources::addDataBuffer → Buffer::Buffer → BindExactBuffer: a pooled buffer rebound at a new exact size for a draw's data.

This PR:

  • adds createBuffer, destroyBuffer, getBufferMemoryRequirements, bindBufferMemory, allocateMemory, freeMemory, mapMemory and unmapMemory to DeviceFunctions and to FillDeviceFunctions;
  • resolves those calls through the table in BindExactBuffer, Buffer::Buffer, Buffer::release, DeviceBuffer::DeviceBuffer, DeviceBuffer::release, BufferPool's constructor and MemoryAccounting::Allocate / Free. The one vkGetFenceStatus call in CommandBatch::~CommandBatch also uses the table entry it already had.

Every other Function call site stays as it is. An earlier version of this PR converted 366 call sites in 23 files. CnRJay pointed out that the counts above put the saving in these few, so the rest is out.

How

Resolved returns the table entry when the device has filled its table, and otherwise calls Function as before. So contexts without a table (mocks, APS5_NO_PROC_TABLE, calls made before the table is filled) behave exactly as on main. The table is filled once at device creation and only read afterwards.

Tests, in agc_buffer_pool:

  • TableFill fills a table through FillDeviceFunctions from a mock vkGetDeviceProcAddr. It checks that each of the 8 new members holds the mock function of the name it is filled from, so a member filled from the wrong name fails.
  • TableLookups: the mock counts lookups by name. A cycle of a host-visible Buffer and a DeviceBuffer at sizes the pool hasn't seen forces the exact-size rebind path. Without a table the cycle must look something up, so the counter sees these calls. With a table holding the buffer and memory functions, a second cycle must make no lookup.

Tested

At head 860450ba7f (rebased onto main abe492bfea), same machine: a full cmake --build build succeeds, and the 15 tests matching BufferPool|buffer_pool|memory_accounting|device_functions|pipeline_cache_alloc pass.

Earlier, Linux (Ubuntu 26.04.1, GCC 15.2), RTX 4070 Ti (NVIDIA 615.71.09), at head 8b7a2ae407:

  • Merged with main 5bae1a4bc2 (bfb5e10bbc, clean): a full cmake --build build of every target succeeds, and the 8 tests in the next item pass on the merge too.
  • agc_buffer_pool (3 entries), agc_memory_accounting, agc_memory_accounting_budget_cap, agc_memory_accounting_budget_floor and agc_deferred_memory_accounting pass, 8 of 8 in each of 3 runs.
  • Khronos validation layer (1.4.363), same 8 tests, main-side base 52ca9f0137 (perf(agc): take the texture detiler's Vulkan entry points from the device table #10764 alone) against this head: 8 of 8 pass on both, one Vulkan device created on each, no validation IDs on either.

Windows 11 VM (GeForce GT 1030, WinLibs GCC, Release), agc_buffer_pool, agc_memory_accounting* and agc_deferred_memory_accounting: 8 of 8 in each of 3 runs, on this head and on main 0e9dc7bc4c.

Red control for TableFill: this head with destroyBuffer filled from "vkDestroyBufferView" (35e1d136a0, branch test/11920-fill-mutant on my fork) fails agc_buffer_pool in all 3 runs on the VM: the device function table's member for vkDestroyBuffer was not filled from that name.

I haven't re-measured CPU time for this narrowed commit, and I don't claim a frame-time change.

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: fix(agc): define the device lookup count in the pipeline cache allocation test instead of linking the driver library #15440 (it takes libSceAgcDriver off agc_pipeline_cache_allocation_tests's link line; this PR rebases onto it)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 4070 Ti (Linux, 615.71.09), GeForce GT 1030 (Windows 11 VM)
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for folding in the device-function table with credit. The pairing of member and name checks out across all the resolved call sites, and the fallback when there's no table looks right.

Two things:

  • Evidence: the description has lookup counts (about 7k/s) but no time saved. Could you add a before/after measurement (CPU time in the affected calls, or frame time on a title)?
  • Timing: this touches the shared device-call path, and many open AGC PRs that merge cleanly with main would conflict with it. A maintainer will decide the landing order before you rebase, so please hold off on the rebase until then (it currently conflicts with main in 8 files).

@milescoviello

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks for checking the pairs.

AI-assisted: yes (Claude Code)

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8912 core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp L52
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp L123-124, L133-135
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp L132-133

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 4472 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 12904 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 15343 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 15548 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 27, 2026
@milescoviello

Copy link
Copy Markdown
Contributor Author

@oneandonlydean measured CPU time in the by-name lookups, before and after this PR.

Setup.

Run Before: lookups by name Before: time in vkGetDeviceProcAddr After: lookups by name After: time
1 7,569,911 845.7 ms 61,501 49.2 ms
2 7,549,243 868.3 ms 60,475 48.1 ms
3 8,021,780 861.8 ms 62,983 49.6 ms

So in this title the change removes about 0.81 s of lookup time per 300 s run, about 2.7 ms of CPU per second of gameplay. That's roughly 0.3 % of one core. Before, the lookups cost about 110 ns each. The roughly 60,000 left are device setup and paths outside the table; they average about 800 ns each because most are first-time lookups.

It's a small saving. Most of the lookups were on the draw-recording path (ShaderResources::addDataBuffer binding pooled buffers, from the earlier count). I haven't measured frame time and don't claim a frame-rate change. The counts and timings are the evidence. If that's too small to be worth the 23-file conflict surface you mentioned, I'm fine with this waiting behind the other AGC PRs, or with it being closed.

AI-assisted: yes (Claude Code)

@milescoviello

Copy link
Copy Markdown
Contributor Author

Updated for main: this PR's commit now sits on #10764's head 73165822ca unchanged, plus a merge of main 1f52200308 (dd7a4d164c). That way #10764 keeps its approved commits, and once it merges only this PR's commit remains. The commit had textual conflicts with main in 8 files. I kept main's lines and converted the table-member calls in them the same way, so it still changes the same 359 lines in 23 files. Tested (details in the description):

  • The AGC driver GPU subset passes 197 of 198 in each of 3 runs.
  • The one failure, agc_driver_pipeline_journal, fails the same way on main: the 11th Vulkan device the test opens in one process can't load the NVIDIA driver here (cannot allocate memory in static TLS block).
  • agc_buffer_pool passes 3 of 3 on the Windows VM, at the head and on main.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@Filip722

Copy link
Copy Markdown
Contributor

@milescoviello Could we agree on #12559 → #11920 for the overlapping storage-image clear calls? #12559 has an agreed first landing relative to #7085 and keeps the exact packed-float byte encoding in StorageTexture::clearImage.

I inspected your current dd7a4d164c3d diff: the clear-call overlap is the mechanical Function → Resolved conversion, not a competing backing-format implementation. Downstream, retain #12559's three clearImage callers and convert the Vulkan call inside that helper to the resolved function table, keeping its four-byte encoding. Please confirm that order and downstream integration/revalidation ownership. I will record it reciprocally once agreed. I am refreshing #12559 against main edf6804cf52c; no combined build/runtime result is claimed here.

AI-assisted: yes (Codex).

@milescoviello

Copy link
Copy Markdown
Contributor Author

@Filip722 agreed: #12559 → #11920. git merge-tree of the two heads (6e1ef08b7d, dd7a4d164c) shows three conflict hunks, all in Texture.cpp, at the same three clear sites. #12559 calls clearImage there, and this PR turns the same lines into context.Resolved(...) calls.

When #12559 lands, I'll rebase this PR onto it:

  • keep its three clearImage callers and their barriers, with the barrier as context.Resolved(&DeviceFunctions::cmdPipelineBarrier, ...);
  • convert the vkCmdClearColorImage call inside clearImage to context.Resolved(&DeviceFunctions::cmdClearColorImage, ...), keeping your four-byte packed-float encoding as it is;
  • rerun this PR's tests and the replay comparison on the result.

The integration and revalidation are mine. (For the record, this PR was opened first, 2026-10-27, but the overlap is only mechanical on my side, so your order is simpler.)

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@milescoviello the added lookup CPU-time comparison addresses the earlier timing ask; thank you. Head dd7a4d1 now conflicts with main aaccd0b in TextureDetiler.cpp at two cmdPushConstants sites. Main adds push.splitStride = layout.gcnSplitStride immediately before each call, while this PR converts the call to Resolved.

Once the agreed parent/landing order permits the refresh, could you rebase keeping both splitStride assignments and the matching resolved cmdPushConstants calls? Then rerun the table/fallback and detiler bars on that composition. No further performance evidence request here; frame-time qualification remains the coordinated gate.

@milescoviello
milescoviello force-pushed the perf/device-functions-hot-calls branch from dd7a4d1 to bfdcd5a Compare October 29, 2026 09:54
@milescoviello

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks. Rebased: #10764 is now 2705c900a2 on main aaccd0ba39, and this PR's commit sits on it as bfdcd5a302. The two cmdPushConstants sites keep main's push.splitStride = layout.gcnSplitStride; right before the call, which now goes through context.Resolved(&DeviceFunctions::cmdPushConstants, ...) (MarcZX10 re-approved #10764 on that head). This PR's own commit applied on top without conflicts, and main's GCN merge added no other by-name Vulkan calls in the 25 files it converts.

At bfdcd5a302 on Linux (RTX 4070 Ti):

  • agc_buffer_pool (3 entries, the function-table test included) passes in each of 3 runs.
  • The AGC driver GPU subset from Tested (201 tests now), 1 run: 200 pass. agc_driver_pipeline_journal fails, the same way on main aaccd0ba39 in 2 of 2 runs: the loader falls back to llvmpipe in that process, and the test then fails the oversized record was not counted as a write failure.

The order with #12559 still holds: if it lands first, I rebase this PR onto it.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: build failed

PR head bfdcd5a merged onto main ba5b533 · tested 2026-10-29 13:00 UTC · 4 min

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 ❌ failed
Tests not run
build: first errors
[4602/6414] Linking CXX executable tests/agc_shader_device_profile_tests
[4603/6414] Linking CXX executable tests/agc_pipeline_cache_allocation_tests
FAILED: tests/agc_pipeline_cache_allocation_tests 
: && /usr/bin/g++ -O3 -DNDEBUG -Wl,--no-as-needed -fPIE -pie core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/tests/PipelineCacheFailures.cpp.o core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/Graphics/src/PipelineCache.cpp.o core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/tests/AllocationFailure.cpp.o -o tests/agc_pipeline_cache_allocation_tests  -Wl,-rpath,/home/ben/anyps5-gpu-ci/data/trees/pr-11920/build/core/libs/libs/unpatched  core/libs/prx/libSceAgcDriver/libshader_recompiler_agc_driver.a  core/libs/libs/unpatched/libc.prx  3rdparty/glslang/SPIRV/libSPIRV.a  3rdparty/glslang/glslang/libglslang.a  3rdparty/SPIRV-Tools/source/opt/libSPIRV-Tools-opt.a  3rdparty/SPIRV-Tools/source/libSPIRV-Tools.a  -lrt && :
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/Graphics/src/PipelineCache.cpp.o: in function `AgcDriver::Graphics::PipelineCache::PipelineCache(AgcDriver::Graphics::Context const&, VkPhysicalDeviceProperties const&, bool)':
PipelineCache.cpp:(.text+0x1b2a): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/Graphics/src/PipelineCache.cpp.o: in function `AgcDriver::Graphics::PipelineCache::save(bool, bool)':
PipelineCache.cpp:(.text+0x2560): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineCache.cpp:(.text+0x2725): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineCache.cpp:(.text+0x2802): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineCache.cpp:(.text+0x2972): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_cache_allocation_tests.dir/Graphics/src/PipelineCache.cpp.o:PipelineCache.cpp:(.text+0x2f17): more undefined references to `AgcDriver::Graphics::DeviceProcLookups()' follow
collect2: error: ld returned 1 exit status
[4604/6414] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Execution/src/PerformanceOverlay.cpp.o
[4605/6414] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_command_batch_failure_tests.dir/tests/AllocationFailure.cpp.o
[4606/6414] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/MultisampleTarget.cpp.o
[4607/6414] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/GpuColorTransfer.cpp.o
[4608/6414] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_queue_failure_tests.dir/tests/PipelineQueueFailure.cpp.o
Reproduce
git fetch origin bfdcd5a302e00da6bd83b9fce4502b4a26862a02 ba5b5330b37724bca4b99f30faab504653635a04
git checkout ba5b5330b37724bca4b99f30faab504653635a04 && git merge --no-ff bfdcd5a302e00da6bd83b9fce4502b4a26862a02
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.

@milescoviello
milescoviello force-pushed the perf/device-functions-hot-calls branch from bfdcd5a to d8f9675 Compare October 29, 2026 13:10
@milescoviello

Copy link
Copy Markdown
Contributor Author

@TechLevelZero thanks, that build failure was real and came from #10764, which this PR sits on: agc_pipeline_cache_allocation_tests compiles PipelineCache.cpp on its own and didn't link the driver library that now holds DeviceProcLookups(). Fixed in #10764 (2a95ecd874, the target now links libSceAgcDriver), and this PR is restacked on it: head d8f9675f06. A full build of every target on d8f9675f06 merged onto main 157b02c4f1 succeeds, and the 18 focused tests pass (the five agc_pipeline_cache_allocation_*, agc_buffer_pool, the detiler and texture set). A rerun on your side would confirm it.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the build label Oct 29, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head d8f9675 merged onto main ba5b533 · tested 2026-10-29 14:36 UTC · 32 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,288 passed · 4 failed (0 new, 4 also fail 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,331 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 (894 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Failing on main too (4, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 437 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (437 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 429 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 d8f9675f06b2ea1159847fc59d9963116acd786c ba5b5330b37724bca4b99f30faab504653635a04
git checkout ba5b5330b37724bca4b99f30faab504653635a04 && git merge --no-ff d8f9675f06b2ea1159847fc59d9963116acd786c
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.

@github-actions github-actions Bot removed the perf numbers missing perf pull request without a before and after summary line label Nov 1, 2026
@milescoviello

Copy link
Copy Markdown
Contributor Author

@CnRJay thanks for the review. On each point:

  1. Speed claim. The paired captures are in the description now (traces and digests, Super Meat Boy 3D, three runs per side). Frame p50 swings from 76 to 117 ms between runs on either side, so they show no frame-time difference, and I'm not claiming one. I'll retitle it as refactor(agc) and describe the measured CPU saving as what it is, not as a frame-time gain.
  2. Scope. Agreed: the lookup counts say the buffer create/bind/requirements/destroy calls are where the saving is. I'll narrow this PR to the DeviceFunctions entries for those calls and the Buffer::Buffer / BindExactBuffer sites. The per-present, overlay and framebuffer conversions come out; if they're worth doing, that's a separate cleanup with its own case.
  3. perf(agc): take the texture detiler's Vulkan entry points from the device table #10764. Yes, this branch carries perf(agc): take the texture detiler's Vulkan entry points from the device table #10764's commits. It depends on perf(agc): take the texture detiler's Vulkan entry points from the device table #10764 and goes after it; I'll put that in the Depends-on line and describe only this PR's own commit.
  4. Resolved fallback. I'll add a test that fills the table and checks each converted member against vkGetDeviceProcAddr of the name it is resolved with, so a mismatched member/name pair fails.

I'll post the narrowed head here with the Linux, validation-layer and Windows VM runs.

AI-assisted: yes (Claude Code)

@milescoviello
milescoviello force-pushed the perf/device-functions-hot-calls branch from 8a3e219 to 8b7a2ae Compare November 1, 2026 21:13
@milescoviello milescoviello changed the title perf(agc): resolve the hot Vulkan device calls through the device function table refactor(agc): create, bind and free buffers through the device function table Nov 1, 2026
@milescoviello

Copy link
Copy Markdown
Contributor Author

@CnRJay the narrowed head is up: 8b7a2ae407, retitled refactor(agc): create, bind and free buffers through the device function table. On each point:

  1. No speed claim. The description no longer claims a frame-time or CPU saving for this commit. The Black Ops II lookup counts stay, only as the reason for picking these calls.
  2. Scope. The commit adds the 8 buffer and memory entries to DeviceFunctions and resolves them in BindExactBuffer, Buffer / DeviceBuffer construction and release, BufferPool's constructor and MemoryAccounting::Allocate / Free: 5 files, +102/−23. The per-present, overlay and framebuffer conversions are out.
  3. perf(agc): take the texture detiler's Vulkan entry points from the device table #10764. Depends on perf(agc): take the texture detiler's Vulkan entry points from the device table #10764, merge it first. The first three commits are perf(agc): take the texture detiler's Vulkan entry points from the device table #10764's, rebased onto main 0e9dc7bc4c with identical patches (git range-diff shows = for all three). This PR's change is the last commit only.
  4. Resolved fallback. New TableFill test: it fills a table through FillDeviceFunctions from the mock's vkGetDeviceProcAddr and checks each of the 8 new members against the mock function of its name. A mutant that fills destroyBuffer from "vkDestroyBufferView" (35e1d136a0) fails it 3 of 3 on Windows: the device function table's member for vkDestroyBuffer was not filled from that name.

Runs on this head:

  • Linux (RTX 4070 Ti, NVIDIA 615.71.09): merged with main 5bae1a4bc2 (bfb5e10bbc, clean), a full cmake --build build of every target succeeds. On that merge and at the head, agc_buffer_pool (3 entries), the three agc_memory_accounting* tests and agc_deferred_memory_accounting pass: 8 of 8 on the merge, and 8 of 8 in each of 3 runs at the head.
  • Khronos validation layer 1.4.363, the same 8 tests, perf(agc): take the texture detiler's Vulkan entry points from the device table #10764 alone (52ca9f0137) against this head: 8 of 8 on both, one device created on each, no validation IDs on either.
  • Windows 11 VM (GT 1030): the same 8 tests, 8 of 8 in each of 3 runs on this head and on main 0e9dc7bc4c.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the perf Performance change label Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: build failed

PR head 8b7a2ae merged onto main f2d874c · tested 2026-11-01 21:35 UTC · 4 min

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 ❌ failed
Tests not run
build: first errors
[5140/7007] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_host_import_retire_tests.dir/tests/HostImportFailure.cpp.o
[5141/7007] Linking CXX executable tests/agc_pipeline_binary_store_tests
FAILED: tests/agc_pipeline_binary_store_tests 
: && /usr/bin/g++ -O3 -DNDEBUG -Wl,--no-as-needed -fPIE -pie core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/tests/PipelineBinaryStore.cpp.o core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o -o tests/agc_pipeline_binary_store_tests  -Wl,-rpath,/home/ben/anyps5-gpu-ci/data/trees/pr-11920/build/core/libs/libs/unpatched  core/libs/prx/libSceAgcDriver/libshader_recompiler_agc_driver.a  core/libs/libs/unpatched/libc.prx  3rdparty/glslang/SPIRV/libSPIRV.a  3rdparty/glslang/glslang/libglslang.a  3rdparty/SPIRV-Tools/source/opt/libSPIRV-Tools-opt.a  3rdparty/SPIRV-Tools/source/libSPIRV-Tools.a  -lrt && :
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o: in function `AgcDriver::Graphics::PipelineBinaryStore::restoreFile(VkComputePipelineCreateInfo const&, std::span<std::byte const, 18446744073709551615ul>, VkPipeline_T**, std::filesystem::__cxx11::path const&) const':
PipelineBinaryStore.cpp:(.text+0x3adc): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineBinaryStore.cpp:(.text+0x3b47): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o: in function `AgcDriver::Graphics::PipelineBinaryStore::CreateComputePipeline(VkComputePipelineCreateInfo const&, std::span<unsigned int const, 18446744073709551615ul>, std::span<unsigned int const, 18446744073709551615ul>, VkPipeline_T**) const':
PipelineBinaryStore.cpp:(.text+0x5f7c): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineBinaryStore.cpp:(.text+0x63d2): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
collect2: error: ld returned 1 exit status
[5142/7007] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_queue_failure_tests.dir/tests/AllocationFailure.cpp.o
[5143/7007] Linking CXX executable tests/agc_placeholder_images_tests
[5144/7007] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_buffer_pool_tests.dir/tests/BufferPool.cpp.o
[5145/7007] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_driver_graphics_tests.dir/tests/LastRecordIndices.cpp.o
[5146/7007] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_shared_write_tests.dir/tests/SharedWrites.cpp.o
Reproduce
git fetch origin 8b7a2ae40798e2ac065c5bc060e26577c872fd96 f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff 8b7a2ae40798e2ac065c5bc060e26577c872fd96
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.

@milescoviello

Copy link
Copy Markdown
Contributor Author

On the NVIDIA CI's build failure above: the target that fails to link, agc_pipeline_binary_store_tests, exists only in the main the CI merged onto, f2d874c. It came with 0c572f1c25 ("persist costly compute pipeline binaries"). main has since reverted that in d6f1eccfe2 (#13931), so the target isn't in current main 5bae1a4bc2. On that main the merge (bfb5e10bbc) builds every target and the focused tests pass, as in the comment above.

The link error itself comes from #10764's commit: DeviceProcLookups() moves into the driver library. A test target that compiles PipelineBinaryStore.cpp on its own, without linking libSceAgcDriver, can't resolve it, the same as the pipeline cache allocation tests that #10764 relinks. If the binary store comes back, its test target needs the same target_link_libraries(... libSceAgcDriver). I'll check for it whenever this branch is rebased.

@TechLevelZero could the CI run this head again on current main?

AI-assisted: yes (Claude Code)

@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ AMD GPU test: build failed

PR head 8b7a2ae merged onto main f2d874c · tested 2026-11-01 22:04 UTC · 23 min

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 ❌ failed
Tests not run
build: first errors
[4690/7005] Linking CXX executable tests/agc_shader_replay_requests_tests
[4691/7005] Linking CXX executable tests/agc_pipeline_binary_store_tests
FAILED: tests/agc_pipeline_binary_store_tests 
: && /usr/bin/g++ -O3 -DNDEBUG -Wl,--no-as-needed -fPIE -pie core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/tests/PipelineBinaryStore.cpp.o core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o -o tests/agc_pipeline_binary_store_tests  -Wl,-rpath,/home/ben/anyps5-gpu-ci/data/trees/pr-11920/build/core/libs/libs/unpatched  core/libs/prx/libSceAgcDriver/libshader_recompiler_agc_driver.a  core/libs/libs/unpatched/libc.prx  3rdparty/glslang/SPIRV/libSPIRV.a  3rdparty/glslang/glslang/libglslang.a  3rdparty/SPIRV-Tools/source/opt/libSPIRV-Tools-opt.a  3rdparty/SPIRV-Tools/source/libSPIRV-Tools.a  -lrt && :
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o: in function `AgcDriver::Graphics::PipelineBinaryStore::restoreFile(VkComputePipelineCreateInfo const&, std::span<std::byte const, 18446744073709551615ul>, VkPipeline_T**, std::filesystem::__cxx11::path const&) const':
PipelineBinaryStore.cpp:(.text+0x3adc): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineBinaryStore.cpp:(.text+0x3b47): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_pipeline_binary_store_tests.dir/Graphics/src/PipelineBinaryStore.cpp.o: in function `AgcDriver::Graphics::PipelineBinaryStore::CreateComputePipeline(VkComputePipelineCreateInfo const&, std::span<unsigned int const, 18446744073709551615ul>, std::span<unsigned int const, 18446744073709551615ul>, VkPipeline_T**) const':
PipelineBinaryStore.cpp:(.text+0x5f7c): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
/usr/bin/ld: PipelineBinaryStore.cpp:(.text+0x63d2): undefined reference to `AgcDriver::Graphics::DeviceProcLookups()'
collect2: error: ld returned 1 exit status
[4692/7005] Generating generated/prx/libSceAgcDriver/Graphics/shaders/SampleOrderRGBA32_spv.h
/home/ben/anyps5-gpu-ci/data/trees/pr-11920/src/core/libs/prx/libSceAgcDriver/Graphics/shaders/SampleOrder.comp
[4693/7005] Generating generated/prx/libSceAgcDriver/Graphics/shaders/SampleOrderStencilBits_spv.h
/home/ben/anyps5-gpu-ci/data/trees/pr-11920/src/core/libs/prx/libSceAgcDriver/Graphics/shaders/SampleOrder.frag
[4694/7005] Generating generated/prx/libSceAgcDriver/Graphics/shaders/MultisampleReadbackUint_spv.h
Reproduce
git fetch origin 8b7a2ae40798e2ac065c5bc060e26577c872fd96 f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff 8b7a2ae40798e2ac065c5bc060e26577c872fd96
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.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@milescoviello
milescoviello force-pushed the perf/device-functions-hot-calls branch from 8b7a2ae to 44504d6 Compare November 2, 2026 08:57
@milescoviello

Copy link
Copy Markdown
Contributor Author

Rebased onto main again, since #6959, #9287 and #9445 conflicted with it. The conflict was in tests/BufferPool.cpp: I kept main's image mocks and this PR's mockUnnamed.

  • main: 88e804b0a7
  • head: 44504d6dc2
  • merged: the same as head, because main is an ancestor of the head, so the merge preview is the head tree.

Checks on that tree, Ubuntu 26.04.1, RTX GPU, NVIDIA 615.71.09:

  • Full build: cmake --build build, all targets, passes. The focused ctest set (buffer pool, pipeline cache allocation, typed fill clear, agc_driver_graphics) passed 10 of 10.
  • Branch tests: 212 tests in 138 executables, run 3 times, 100% passed each time. They cover agc_buffer_pool* and the agc_driver_* graphics, texture, detile, image, depth, buffer, CMASK, dispatch, draw, present, flip, resource and guest-buffer tests.
  • Khronos validation, main vs head: run with VK_LAYER_KHRONOS_validation (1.4.363) on the buffer pool and memory accounting tests. Both sides passed 8 of 8 and created 1 Vulkan device. Neither side reported any VUID, and no VUID is new in the head.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@TechLevelZero

TechLevelZero commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 44504d6 merged onto main 1d91f29 · tested 2026-11-02 20:52 UTC · 22 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,622 passed · 4 failed (0 new, 2 also fail on main, 2 unstable on main) · 44 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,670 of 3,544 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 (981 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_image_sample_unnormalized 35.2 s, ⚠️ agc_driver_graphics_maps_fallback 30.4 s, ⚠️ agc_driver_native_depth_clears 30.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 1 of the last 10 main runs
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_image_table
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_native_depth_clears: Timeout in the parallel run; also passed only on retry in 19 other runs in the last 7 days
Validation IDs already present on main (4 IDs in 510 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (510 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 502 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_prepared_exports
Skipped (44)
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_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_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 configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: 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: 
Reproduce
git fetch origin 44504d6dc27469917ea5c975fb01e91cf1a8b49d 1d91f2966d0eef82a021628a7aa8e78e615ac807
git checkout 1d91f2966d0eef82a021628a7aa8e78e615ac807 && git merge --no-ff 44504d6dc27469917ea5c975fb01e91cf1a8b49d
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.

…ion table

Buffer, DeviceBuffer and BindExactBuffer looked vkCreateBuffer,
vkGetBufferMemoryRequirements, vkBindBufferMemory, vkDestroyBuffer and
the memory calls up by name on every buffer; they now take the device's
function table entries. The other call sites stay as they are.

Co-authored-by: BiladeiroSupremo <128841645+BiladeiroSupremo@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xXPBSXx

xXPBSXx commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

#15440 removes libSceAgcDriver from the link line of agc_pipeline_cache_allocation_tests in tests/cmake/agc_pipeline_cache_allocation_tests.cmake (+10/-1 in two files). With it, the test executable and the shared driver library both define RecompilerSwitches, and the nightly sanitizer run 41573880531 reports an ASan odr-violation for the five agc_pipeline_cache_allocation_* tests. The link came into main with 2781d72 (#10764).

This PR has the same line with libSceAgcDriver in the link list. When it is rebased onto main, the line should stay without libSceAgcDriver; the test then needs DeviceProcLookups() from the stub that #15440 adds in tests/PipelineCacheFailures.cpp. The suggested order is #15440 first, which is independent of this PR. Could you confirm the order and add Depends on: #15440 to the checklist?

AI-assisted (Claude Code).

@milescoviello

Copy link
Copy Markdown
Contributor Author

@xXPBSXx confirmed: #15440 first, and I've added Depends on: #15440 to the checklist.

The PR's current head still has the link line, from the two test-link commits that reached main through #10764. My local rebase onto current main no longer touches tests/cmake/agc_pipeline_cache_allocation_tests.cmake: the diff is only the five buffer files (Context.hpp, BufferPool.cpp, MemoryAccounting.cpp, Resources.cpp and tests/BufferPool.cpp). I'll push it once the full build and the area tests pass here, then rebase onto #15440 when it merges. I'll check that agc_pipeline_cache_allocation_* still links and passes with your DeviceProcLookups() stub, since this PR moves buffer creation onto the device function table.

AI-assisted: yes (Claude Code)

@milescoviello
milescoviello force-pushed the perf/device-functions-hot-calls branch from 44504d6 to 860450b Compare November 3, 2026 12:24
@milescoviello

Copy link
Copy Markdown
Contributor Author

Rebased onto main abe492bfea, since it conflicted with main again. The head is now 860450ba7f, one commit.

  • Conflict: tests/BufferPool.cpp's mock device. main added typeBits and this PR added lookups and anyName. I kept all three; nothing else needed changes.
  • Full build of 860450ba7f (Linux, GCC 15.2, Makefiles): ok.
  • Tests: the 15 tests matching BufferPool|buffer_pool|memory_accounting|device_functions|pipeline_cache_alloc pass: agc_buffer_pool*, agc_*memory_accounting*, agc_pipeline_store_lazy_buffer_pool and the five agc_pipeline_cache_allocation_*.
  • The diff against main is the five buffer files only. The test-link commits from perf(agc): take the texture detiler's Vulkan entry points from the device table #10764 are in main now, and Depends on: #15440 stays as agreed above.

One thing I hit on main itself, not this PR: a parallel cmake --build build -j 8 with Makefiles can race on core/libs/libs/libc.prx. Two rules patch its NIDs at once and it fails with invalid ELF section table range. A rebuild then stops on No rule to make target 'core/libs/libs/libc.prx' from the libSceFreeTypeOl/OptOl targets. Building guest_division_prx_library first avoids it.

AI-assisted: yes (Claude Code)

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — approved

The PR adds 8 buffer and memory entries to DeviceFunctions and resolves the hot Buffer / DeviceBuffer / BindExactBuffer calls through the table; it merges cleanly, builds, passes, and its new tests catch the regressions they target.

What I ran

Head 860450ba7f34b65cf1353d529ac8ef7b37c3dccd, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 9bbbb24811667ede59329e345f4fb4613bdba579 (Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe / Mesa 26.1.6).

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...860450ba7f34b65cf1353d529ac8ef7b37c3dccd
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_buffer_pool|memory_accounting"
# negative controls (see below), each followed by
ninja -C build -j32 -l32
ctest --test-dir build --output-on-failure -R "^agc_buffer_pool$"
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Build (script, merged tree) ok
Selected tests (script) 2157 ran, 2036 passed, 114 expected skips, 0 new failures, 0 timeouts; 7 known failures that also fail on main
Vulkan validation (script, main vs merge) 770 tests, layer loaded in 769, none missing, 0 tests with new VUIDs
agc_buffer_pool*, agc_*memory_accounting*, agc_deferred_memory_accounting 8/8 passed
Worktree after controls back to the merged tree (git status --porcelain empty), agc_buffer_pool passes again

Negative control

  1. I restored Resources.cpp, BufferPool.cpp and MemoryAccounting.cpp from main and kept the merged Context.hpp so the test still compiles. agc_buffer_pool failed in TableFill:

    output
    FAIL: the device function table's member for vkCreateBuffer was not filled from that name
    FAIL: the device function table's member for vkDestroyBuffer was not filled from that name
    
  2. I kept the merged Resources.cpp (which has the table fill) and changed only its 4 bindBufferMemory call sites back to context.Function<PFN_vkBindBufferMemory>. TableLookups failed:

    output
    FAIL: a host and a device buffer cycle of new sizes looked up 4 Vulkan functions by name while the device's function table holds them
    
  3. I restored only BufferPool.cpp and MemoryAccounting.cpp from main. The test passed (see the non-blocking note below).

I then restored the merged files, rebuilt, and confirmed the worktree is clean and the test passes.

Findings

Blocking

None.

Non-blocking

  • The MemoryAccounting and BufferPool-constructor conversions have no test coverage. core/libs/prx/libSceAgcDriver/Graphics/src/MemoryAccounting.cpp:54 and :74 and the BufferPool constructor (core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp:43) can be reverted without failing TableLookups (control 3). The pool's own allocations go through the members it captured once in its constructor, so the cycle never reaches MemoryAccounting::Allocate/Free(context, …) through the table. This doesn't affect correctness: TableFill checks that the members are filled from the right names. But the description reads as if TableLookups covers these sites. I suggest narrowing that wording, or extending the cycle to cover a non-pooled allocate/free.
  • IsDeferredMemoryFree still sees the same pointer after the change. I checked this because MemoryAccounting::Free compares the free function against deferredFreeMemory (core/libs/prx/libSceAgcDriver/Graphics/src/MemoryAccounting.cpp:60). VulkanDevice installs DeferDestructionToIdle's resolver (core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2312) before FillDeviceFunctions runs (:2372). The table therefore holds the same deferring vkFreeMemory/vkDestroyBuffer that Function would return, so the pointer check behaves as on main. No action needed. I'm noting it because a future reorder of those two lines would break this silently.
  • The checklist's dependency doesn't match the diff. The Depends on: #15440 line describes a link-line change, but the current diff no longer touches tests/cmake/agc_pipeline_cache_allocation_tests.cmake. The PR merges and builds on main without #15440, so the dependency now looks like merge order only. Saying so would help the maintainer. The merge-order agreement with #13796 that the author mentioned in the discussion is also not on the current Depends-on line.

Not verified

  • No hardware GPU: I ran nothing on NVIDIA or AMD. The validation comparison is the script's lavapipe run.
  • I did not measure the lookup or CPU-time savings. The PR no longer claims a speed change.
  • Windows/MinGW build.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 860450b merged onto main 4f41f4c · tested 2026-11-03 13:10 UTC · 34 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,690 passed · 9 failed (0 new, 7 also fail on main, 2 unstable on main) · 58 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,757 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 (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_image_sample_unnormalized 38.0 s, ⚠️ agc_driver_stream_copy 37.4 s, ⚠️ public_headers 36.9 s, ⚠️ agc_driver_sample_multisample_target 36.3 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 7 of the last 9 main runs
agc_driver_store_over_untracked: failed in 1 of the last 9 main runs
Failing on main too (7, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
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 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (58)
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_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
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: DisplayW
Reproduce
git fetch origin 860450ba7f34b65cf1353d529ac8ef7b37c3dccd 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 860450ba7f34b65cf1353d529ac8ef7b37c3dccd
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.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 860450b merged onto main 4f41f4c · tested 2026-11-03 13:35 UTC · 29 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,703 passed · 6 failed (0 new, 2 also fail on main, 4 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,757 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 (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.3 s
Unstable on main (4, 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
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_image_table
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 860450ba7f34b65cf1353d529ac8ef7b37c3dccd 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 860450ba7f34b65cf1353d529ac8ef7b37c3dccd
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.

…device table

The device function table now carries vkAllocateMemory and vkFreeMemory, so
memory accounting no longer asks deviceProc for them and the image memory
hooks never saw an allocation. The first sharing check then failed its
allocation lookup and every slab test exited 1 instead of passing or
skipping. The hooks now give the context a copy of the table without those
two entries, so both resolve through the hooks while every other entry stays
on the table.
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 784ef8c merged onto main b11c7bf · tested 2026-11-04 19:34 UTC · 33 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,788 passed · 3 failed (0 new, 3 also fail on main) · 49 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,840 of 3,894 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 (981 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 114.3 s
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 (13 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 tests): agc_driver, agc_driver_address_draw_space_reuse, 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, and 541 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08739 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08741 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
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
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (49)
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_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
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 av
Reproduce
git fetch origin 784ef8ca61f2efe4f26c43b6900c4327de7363c4 b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 784ef8ca61f2efe4f26c43b6900c4327de7363c4
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 784ef8c merged onto main b11c7bf · tested 2026-11-04 19:56 UTC · 45 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,771 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 60 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,840 of 3,894 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 (981 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s, ⚠️ public_headers 62.3 s, ⚠️ agc_driver_image_sample_unnormalized 36.5 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 8 of the last 10 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_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (8 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 tests): agc_driver, agc_driver_address_draw_space_reuse, 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, and 541 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
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (60)
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_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
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_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
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 platf
Reproduce
git fetch origin 784ef8ca61f2efe4f26c43b6900c4327de7363c4 b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 784ef8ca61f2efe4f26c43b6900c4327de7363c4
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.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Merge preview against a newer main: head 784ef8ca61 merged onto main 8fa2f2f888 (d41028cfc5, clean merge, no conflicts). Linux, GCC 15.2, build/ tree with tests on, RTX 4070 Ti.

  • Focused tests: all 25 matching BufferPool|buffer_pool|memory_accounting|device_functions|pipeline_cache_alloc|image_memory (7 executables) pass.
  • Full build: the full cmake --build of the merge passes. One prerequisite: on a clean Unix Makefiles tree, main itself stops at freetype_outline_border_patched with No rule to make target 'core/libs/libs/libSceFreeTypeOl.prx'. That target depends on patched PRX files whose rule lives in core/libs, a different directory, which the Makefile generator cannot see. Building the libs target first works around it. It is unrelated to this PR.

AI-assisted: yes (Claude Code)

This branch has not been deployed

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

Labels

agc libSceAgc* build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants