Skip to content

perf(agc): read depth planes into storage images in a compute pass - #12120

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
Meh7an:perf/agc-depth-transfer-passes
Nov 3, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
Meh7an:perf/agc-depth-transfer-passes

Conversation

@Meh7an

@Meh7an Meh7an commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

A depth surface's plane and the 32-bit color storage image that holds its texels are copied into each other whenever a shader reads or writes the plane as a storage image. On main (#11685) that is one vkCmdCopyImage between the depth aspect and the color image where VK_KHR_maintenance8 allows it, else a copy through a staging buffer. On an RTX 2080 Ti the copy costs about 1.4 ms per 4K plane. Sonic Origins Plus does two per frame on its main menu, 2.88 ms of GPU time per frame.

Where the device has VK_KHR_push_descriptor, this PR reads a D32 plane into the storage image in a compute pass instead (DepthToStorage.comp):

  • The pass fetches the depth aspect through a sampled view (OpImageFetch, no sampler) and stores the bits unchanged through an r32ui view of the storage image (StorageTexture::AtomicView).
  • It takes copyPlane's rectangles as push constants, one dispatch each, so partial unit stores (StoreDepthPlane) use it too.
  • Its two views are pushed (vkCmdPushDescriptorSetKHR), so a recorded pass holds no descriptor set. The pipeline and its layouts are made once per device on first use and released in ClearDepthSurfaces. Each surface keeps its depth-aspect view until it is released.

VulkanDevice enables VK_KHR_push_descriptor when the device has it, and the graphics Context carries it as pushDescriptors. The new agc_embedded_shader CMake function compiles a Graphics/shaders source into an embedded SPIR-V header.

Copies back into the depth plane keep main's copy. A fragment shader's depth write can't stand in for it: on the 2080 Ti it flushed subnormals to ±0 and turned every NaN into -inf, and without VK_EXT_depth_range_unrestricted it clamped to [0, 1]. Finite values outside [0, 1] survived with the extension only because the driver didn't clamp them: with a [0, 1] viewport the spec leaves them undefined, and a ±FLT_MAX viewport, which would make them defined, broke the store-back test on this driver. The round-trip results are under Tested.

These keep main's copies too: D16 planes, the stencil plane, multisampled surfaces, TakeStorage and the layered copies (LayeredDepthStorage::Copy). So does every plane when APS5_NO_DEPTH_TRANSFER_PASS=1 is set; the variable has its row in ENVIRONMENT.md. The copies still take #11685's direct path where it applies, and APS5_NO_DIRECT_DEPTH_COPY=1 still forces the staging buffer.

What the pass keeps, by device configuration:

  • With or without VK_EXT_depth_range_unrestricted: the pass gives back exactly what main's copy gives back, word for word. It reads the 32-bit texel without a sampler and stores its bits, and the spec defines no conversion for that read.
  • Tested on the 2080 Ti, in both configurations: all 16 test words come back unchanged through the pass and through the copy. Those are 0.25, 1, ±0, -0.5, 2.0, three subnormals, FLT_MAX, ±inf, and quiet and signalling NaNs with payloads.
  • Not claimed for other GPUs: NaN payloads and subnormals. The spec says nothing about flushing them on an image read; on a GPU that changes them, the round-trip test fails rather than passing silently.

Tests:

  • agc_driver_depth_storage stores the 16 words into a D32 plane and a D32S8 plane, then reads them back twice, copies only and with the pass. It requires word-for-word equal results and that the pass ran. It requires 0.25, 1 and +0 back in every configuration, and -0.5 and 2.0 back where the depth range is unrestricted. It reports which of the other words the copy changed: none on this GPU. Its device enables VK_KHR_push_descriptor when the queue can draw, and VK_EXT_depth_range_unrestricted unless --restricted-depth is given. The existing whole-plane data and stencil checks run through the pass as well.
  • New agc_driver_depth_storage_copies runs it with APS5_NO_DEPTH_TRANSFER_PASS=1 and requires zero passes, with the data and stencil checks unchanged. New agc_driver_depth_storage_restricted_depth runs it without the extension.
  • agc_driver_depth_plane_partial_store (partial stores) runs in three modes. The default requires the pass where the device has VK_KHR_push_descriptor. The new agc_driver_depth_plane_partial_store_image_copy (--image-copy) turns the pass off and requires direct copies where VK_KHR_maintenance8 is enabled. --buffer-copy turns both off.
  • DepthSurface gains SetDepthTransferPasses and DepthTransferPassCount for these tests, like feat(agc): copy depth planes to and from color storage images directly where maintenance8 allows #11685's SetDirectDepthCopy and DirectDepthCopyCount.

No open PR reads depth planes in a compute pass or enables VK_KHR_push_descriptor. tools/pr_overlap.py finds no other open PR that changes the same code. It could not compare 92 PRs that conflict with main and share a file with this one, and none of their diffs adds push descriptors or changes copyPlane or DirectDepthCopy.

Tested

Rebased onto main 2227f13 (57d63ac). The round trips and S3K numbers below were measured on main c02d287, with this change as 05addcdbd1. The 120 commits between them change eight lines of the files this PR touches, in CMakeLists.txt and VulkanDevice.cpp, and nothing in the transfer path. On the rebased head the validation run below gives 18/18 again, with no VUID- line and no missing-layer line, and ctest passes 2815 of 2815.

Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K.

Round trips. These ran with a temporary build that could also turn on the fragment depth write, which the review asked about. They store the 16 words into a D32 plane and a D32S8 plane through the store-back, then read them back through a storage view. Both formats gave the same results.

Path VK_EXT_depth_range_unrestricted enabled not enabled (--restricted-depth)
main's copies, direct and through the staging buffer all 16 words kept all 16 words kept
compute pass, depth to storage (this PR) all 16 words kept all 16 words kept
fragment depth write, storage to depth, [0, 1] viewport (dropped) ±0, -0.5, 2.0, FLT_MAX and ±inf kept; subnormals flushed to ±0; every NaN came back as -inf ±0 kept; clamped to [0, 1]; subnormals flushed; NaN came back as 0
fragment depth write with a ±FLT_MAX viewport (dropped) the existing store-back test failed not valid without the extension

S3K. Sonic Origins Plus (PPSA05324) on the Sonic 3 & Knuckles page of the main menu, main's defaults. main c02d287 against main with this PR (05addcdbd1), both built from the same tree; nothing else is applied. Each build got a warm-up boot and one APS5_PROFILE_GPU=1 boot. Then came two interleaved traced rounds (main, PR, main, PR; APS5_TRACE_SECONDS=200:15, six title FPS readings each).

main this PR
[gputime] copy class per present (2 transfers, 63.3 MiB) 2.76 ms 1.68 ms
[gputime] GPU time per present, all ranges, the same six blocks on the page 52.95 ms 51.90 ms
GPU busy per present (ms, round 1 / round 2) 53.6 / 62.1 52.6 / 60.7
frame p50 / p90 / p99 (ms), round 1 58.3 / 65.6 / 82.2 59.2 / 64.0 / 82.2
frame p50 / p90 / p99 (ms), round 2 63.9 / 72.2 / 88.0 64.5 / 74.1 / 94.4
title FPS, median of six readings (round 1 / round 2) 17.15 / 17.10 17.74 / 16.02
  • Of the two transfers per frame, one goes from the depth plane to its storage image and now runs in the pass. The other goes back and keeps main's copy, about 1.5 ms of the remaining 1.68 ms.
  • The frame times and title FPS move within the noise of these runs: other load averaged 5.1% CPU, with a 57.8% CPU peak and an 18.2% GPU peak.
  • All four traces show Driver.Draw.shader_compile_and_link inside the window, main's included, so the rounds compare like with like.
  • All four traces dropped events once the queue worker's event buffer filled. The phase totals still cover the whole window, and the frame and GPU times in the summary lines don't come from those events.

Tests.

  • ctest on main c02d287 plus this PR: 2776 of 2777 pass. The failure, agc_driver_mesh_barycentric_emulation, was main's own and passes on the rebased head.
  • ctest --test-dir build -R "depth_plane_partial_store|depth_storage|depth_plane_sampling|depth_copy|native_depth" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: 15/15 on main and 18/18 on this PR. The three extra tests are agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_storage_copies and agc_driver_depth_storage_restricted_depth. Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line. On this PR, the three depth_storage runs report that the pass matches the copy and that the copy changed none of the 16 words. The copies run reports zero passes.

All four traces are attached, one zip per round with the main and PR traces.

depth-to-storage-s3k-c02d-round1.zip
depth-to-storage-s3k-c02d-round2.zip

Sonic 3 & Knuckles page, round 1, main

seconds 200:15 from present 4373: 250 presents, frame p50 58.3 / p90 65.6 / p99 82.2 / max 82.7 ms, GPU busy 53.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit c02d287, dropped: yes

{"commit":"c02d287bd0eb","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4373,"ms":15052.654},"presents":250,"frame_ms":{"p50":58.279,"p90":65.626,"p99":82.192,"max":82.663},"gpu_busy_ms_per_present":53.633,"worker_busy_pct":{"queue worker 0x0":97.349},"top_phases_ms_per_frame":{"Driver.Packet":57.742,"Graphics.Draw":46.63,"Driver.Packet.draw":44.825,"Driver.Draw":44.135,"Graphics.Draw.draw_and_resource_release":38.531,"Driver.Draw.shader_compile_and_link":27.402,"VideoOut.Flip":22.641,"Driver.Present":22.551},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.78,"events_lost":412503,"totals_full":false},"draw committer":{"events_full_after_s":12.591,"events_lost":50581,"totals_full":false}},"trace":"aps5-trace-c02d287bd0eb-25464.json.gz"}

Sonic 3 & Knuckles page, round 1, this PR

seconds 200:15 from present 4517: 248 presents, frame p50 59.2 / p90 64.0 / p99 82.2 / max 86.7 ms, GPU busy 52.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 05addcdbd111, dropped: yes

{"commit":"05addcdbd111","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4517,"ms":15035.38},"presents":248,"frame_ms":{"p50":59.151,"p90":64.026,"p99":82.243,"max":86.691},"gpu_busy_ms_per_present":52.563,"worker_busy_pct":{"queue worker 0x0":97.386},"top_phases_ms_per_frame":{"Driver.Packet":58.162,"Graphics.Draw":46.448,"Driver.Packet.draw":45.247,"Driver.Draw":44.514,"Graphics.Draw.draw_and_resource_release":38.293,"Driver.Draw.shader_compile_and_link":27.879,"VideoOut.Flip":21.614,"Driver.Present":21.506},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.69,"events_lost":434140,"totals_full":false},"draw committer":{"events_full_after_s":12.691,"events_lost":49445,"totals_full":false}},"trace":"aps5-trace-05addcdbd111-12292.json.gz"}

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 Pro 10.0.26300
  • AI-assisted: yes

@github-actions github-actions Bot added the perf Performance change label Oct 27, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

I independently ran the repository-required tools/trace_digest.py on both round-2 captures from the attached trace archive. These are the full outputs for the main and PR captures, respectively. The round-2 summary lines match those in the report. Note that both captures report dropped event tracks; summary frame and GPU totals are still reported by the tool.

Main (e0cd1259a95e)

**seconds 200:15** from present 3994: 239 presents, frame p50 60.3 / p90 78.3 / p99 89.0 / max 89.9 ms, GPU busy 60.7 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e0cd1259a95e, dropped: yes

```json
{"commit":"e0cd1259a95e","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3994,"ms":15059.319},"presents":239,"frame_ms":{"p50":60.291,"p90":78.266,"p99":88.968,"max":89.923},"gpu_busy_ms_per_present":60.686,"worker_busy_pct":{"queue worker 0x0":97.41},"top_phases_ms_per_frame":{"Driver.Packet":60.517,"Graphics.Draw":47.651,"Driver.Packet.draw":46.15,"Driver.Draw":45.398,"Graphics.Draw.draw_and_resource_release":39.316,"VideoOut.Flip":37.046,"Driver.Present":36.972,"VideoOut.Flip.present":36.846},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.047,"events_lost":397558,"totals_full":false},"draw committer":{"events_full_after_s":13.41,"events_lost":33817,"totals_full":false}},"trace":"aps5-trace-e0cd1259a95e-33216.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 4161: 89.9 ms at 10631 ms: batch (gpu) 88.0, VideoOut.Flip (presenter) 53.6, VideoOut.Flip.present (presenter) 53.3, Driver.Present (presenter) 53.3
  • present 3994: 89.9 ms at 0 ms: Driver.Packet (queue worker 0x0) 64.9, batch (gpu) 59.2, Driver.Packet.draw (queue worker 0x0) 57.5, Driver.Draw (queue worker 0x0) 56.8
  • present 4022: 89.0 ms at 2009 ms: Driver.Packet (queue worker 0x0) 63.1, batch (gpu) 61.2, Driver.Packet.draw (queue worker 0x0) 55.5, Graphics.Draw (draw committer) 55.4
  • present 4018: 86.6 ms at 1720 ms: batch (gpu) 61.4, Driver.Packet (queue worker 0x0) 58.5, Graphics.Draw (draw committer) 54.0, Driver.Packet.draw (queue worker 0x0) 51.3
  • present 4008: 86.5 ms at 1014 ms: Driver.Packet (queue worker 0x0) 61.6, batch (gpu) 59.7, Driver.Packet.draw (queue worker 0x0) 54.1, Graphics.Draw (draw committer) 53.9

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 0.0 (0 %) 62.7 0.5 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 14.9 (24 %) 0.0 (0 %) 48.1 49.4 Driver.Packet 14.6, Driver.EndSubmission 0.3
draw committer 27.7 (44 %) 0.2 (0 %) 35.1 36.0 Graphics.Draw 26.2, Recorder.Submit 1.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.9 (1 %) 36.3 (58 %) 25.8 0.0 VideoOut.Flip 37.0, Driver.Present 0.1
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.9 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
gpu 60.6 (96 %) 0.0 (0 %) 2.4 0.0 batch 60.6

Largest slices (ms per frame, inclusive, all threads): batch 60.6, VideoOut.Flip 37.0, Driver.Present 37.0, VideoOut.Flip.present 36.8, Driver.Present.render_fence_wait 36.0, Vulkan.Retire 36.0, Vulkan.Retire.wait 36.0, Graphics.Draw 26.2, Graphics.Draw.draw_and_resource_release 22.1, Driver.Packet 14.6

Longest waits

  • Driver.Present.render_fence_wait (presenter) 58.3 ms at 9563 ms, present 4144
  • Driver.Present.render_fence_wait (presenter) 56.3 ms at 12800 ms, present 4196
  • Driver.Present.render_fence_wait (presenter) 54.1 ms at 8756 ms, present 4131
  • Driver.Present.render_fence_wait (presenter) 52.8 ms at 8629 ms, present 4129
  • Driver.Present.render_fence_wait (presenter) 52.7 ms at 10632 ms, present 4161
  • Driver.Present.render_fence_wait (presenter) 52.6 ms at 12860 ms, present 4197
  • Driver.Present.render_fence_wait (presenter) 52.4 ms at 9505 ms, present 4143
  • Driver.Present.render_fence_wait (presenter) 52.0 ms at 10572 ms, present 4160
  • Driver.Present.render_fence_wait (presenter) 51.6 ms at 11755 ms, present 4179
  • Driver.Present.render_fence_wait (presenter) 51.3 ms at 9632 ms, present 4145

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

  • batch 2191: 12.1 ms at 2673 ms, present 4031: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 2248: 11.8 ms at 2739 ms, present 4032: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 13637: 11.4 ms at 14708 ms, present 4227: GPU no ranges; recorded by no CPU slices
  • batch 6051: 11.3 ms at 6708 ms, present 4098: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 2885: 11.3 ms at 3407 ms, present 4043: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5

### PR (`88bf0fd0654a`)

```text
**seconds 200:15** from present 4399: 245 presents, frame p50 60.4 / p90 64.3 / p99 82.1 / max 89.7 ms, GPU busy 60.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88bf0fd0654a, dropped: yes

```json
{"commit":"88bf0fd0654a","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4399,"ms":15003.238},"presents":245,"frame_ms":{"p50":60.433,"p90":64.331,"p99":82.109,"max":89.67},"gpu_busy_ms_per_present":60.001,"worker_busy_pct":{"queue worker 0x0":97.177},"top_phases_ms_per_frame":{"Driver.Packet":58.635,"Graphics.Draw":46.156,"Driver.Packet.draw":44.922,"Driver.Draw":44.19,"Graphics.Draw.draw_and_resource_release":37.959,"VideoOut.Flip":30.616,"Driver.Present":30.509,"VideoOut.Flip.present":30.402},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.525,"events_lost":444053,"totals_full":false},"draw committer":{"events_full_after_s":12.798,"events_lost":44954,"totals_full":false}},"trace":"aps5-trace-88bf0fd0654a-32060.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 4399: 89.7 ms at 0 ms: batch (gpu) 77.5, Driver.Packet (queue worker 0x0) 61.8, Driver.Packet.draw (queue worker 0x0) 54.5, Driver.Draw (queue worker 0x0) 53.8
  • present 4559: 85.1 ms at 9753 ms: batch (gpu) 84.2, VideoOut.Flip (presenter) 53.8, VideoOut.Flip.present (presenter) 53.7, Driver.Present (presenter) 53.7
  • present 4591: 82.1 ms at 11744 ms: batch (gpu) 81.4, VideoOut.Flip (presenter) 48.7, VideoOut.Flip.present (presenter) 48.3, Driver.Present (presenter) 48.3
  • present 4605: 69.6 ms at 12623 ms: batch (gpu) 68.9, VideoOut.Flip (presenter) 42.4, VideoOut.Flip.present (presenter) 41.6, Driver.Present (presenter) 41.6
  • present 4537: 69.1 ms at 8407 ms: batch (gpu) 68.6, Graphics.Draw (draw committer) 35.1, VideoOut.Flip (presenter) 32.4, VideoOut.Flip.present (presenter) 32.2

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 0.0 (0 %) 60.9 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 12.7 (21 %) 0.0 (0 %) 48.5 45.7 Driver.Packet 12.4, Driver.EndSubmission 0.3
draw committer 25.6 (42 %) 0.3 (0 %) 35.3 34.5 Graphics.Draw 24.0, Recorder.Submit 1.1
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.9 (1 %) 29.8 (49 %) 30.5 0.0 VideoOut.Flip 30.6, Driver.Present 0.1
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 61.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 60.0 (98 %) 0.0 (0 %) 1.2 0.0 batch 60.0

Largest slices (ms per frame, inclusive, all threads): batch 60.0, VideoOut.Flip 30.6, Driver.Present 30.5, VideoOut.Flip.present 30.4, Driver.Present.render_fence_wait 29.6, Vulkan.Retire 29.6, Vulkan.Retire.wait 29.6, Graphics.Draw 24.0, Graphics.Draw.draw_and_resource_release 19.8, Driver.Packet 12.4

Longest waits

  • Driver.Present.render_fence_wait (presenter) 51.1 ms at 9756 ms, present 4559
  • Driver.Present.render_fence_wait (presenter) 50.8 ms at 9382 ms, present 4553
  • Driver.Present.render_fence_wait (presenter) 50.8 ms at 11626 ms, present 4589
  • Driver.Present.render_fence_wait (presenter) 50.7 ms at 11249 ms, present 4583
  • Driver.Present.render_fence_wait (presenter) 50.3 ms at 11501 ms, present 4587
  • Driver.Present.render_fence_wait (presenter) 48.3 ms at 11439 ms, present 4586
  • Driver.Present.render_fence_wait (presenter) 47.8 ms at 11373 ms, present 4585
  • Driver.Present.render_fence_wait (presenter) 47.6 ms at 11564 ms, present 4588
  • Driver.Present.render_fence_wait (presenter) 47.5 ms at 11685 ms, present 4590
  • Driver.Present.render_fence_wait (presenter) 47.3 ms at 11745 ms, present 4591

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

  • batch 13361: 13.6 ms at 13976 ms, present 4626: GPU no ranges; recorded by no CPU slices
  • batch 5534: 13.5 ms at 5785 ms, present 4493: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 3427: 13.3 ms at 3604 ms, present 4457: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 8462: 13.3 ms at 8843 ms, present 4544: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 2847: 13.3 ms at 3003 ms, present 4448: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5

@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 15015 core/libs/prx/libSceAgcDriver/CMakeLists.txt L812
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L516, L4475
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp L267
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L1331, L3420
core/libs/prx/libSceAgcDriver/tests/execution/DepthPlanePartialStore.cpp L130-132, L335-337
docs/dev/ENVIRONMENT.md L254

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 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1896 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7689 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8707 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9012 docs/dev/ENVIRONMENT.md
PR 9020 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9674 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9676 docs/dev/ENVIRONMENT.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9852 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 9891 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9892 docs/dev/debt/libSceAgcDriver.md
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 10233 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10867 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10894 docs/dev/ENVIRONMENT.md
PR 10920 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cpp
PR 11265 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 11351 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 11998 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/DepthPlanePartialStore.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12323 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 12565 docs/dev/debt/libSceAgcDriver.md
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12848 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12895 docs/dev/ENVIRONMENT.md
PR 12904 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 12930 docs/dev/ENVIRONMENT.md
PR 12970 docs/dev/ENVIRONMENT.md
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13262 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13486 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13707 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13793 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13809 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14085 docs/dev/debt/libSceAgcDriver.md
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14235 docs/dev/ENVIRONMENT.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 14264 docs/dev/ENVIRONMENT.md
PR 14299 docs/dev/ENVIRONMENT.md
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/ENVIRONMENT.md
PR 15136 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15169 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15295 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Meh7an thanks for the traces and the clear write-up. Two changes at 2c401e3198 before this is on by default.

  1. Storage-to-depth values that the shader pass can't represent are no longer copied as they were. depthTransferPass (DepthSurface.cpp:80-82, used at line 1453) gates on format and push descriptors only. FromStorage fixes the viewport depth to 0..1, and StorageToDepth.frag sends whatever word is in the storage image through gl_FragDepth. The storage alias admits depth-bit and integer views, so those values don't have to come from rasterized depth, and VulkanDevice.cpp:1497-1498 enables VK_EXT_depth_range_unrestricted where it exists. As I read the spec, unrestricted floating-point depth with depthClampEnable off isn't unconditionally clamped either, so "every depth the rasterizer writes is in [0, 1]" doesn't carry the argument. Please either keep main's copy for values the pass can't reproduce exactly, or leave the pass opt-in until the equivalence is shown. Please also replace the blanket range claim with an argument for each device configuration, and add enabled-versus-copy round-trip checks for finite -0.5 and 2.0 on a device with unrestricted depth range, plus signed zero, subnormals and NaN where they apply, with the bit-preservation expectation stated only as far as it holds. Falling back on unrestricted devices would cover the finite case but shouldn't be described as covering every bit pattern. I found this by reading the code, not by seeing corrupted output.
  2. DepthStorage.cpp:367 requires DepthTransferPassCount() > 0 whenever pushDescriptors is available, but APS5_NO_DEPTH_TRANSFER_PASS stops every increment, so the test fails with the switch set. Please honor the switch in that assertion and run agc_driver_depth_storage both ways, checking zero passes in the off run while the data and stencil checks still pass. DepthPlanePartialStore already handles the switch that way.

Please keep the copy fallbacks and the existing data, partial-rectangle and stencil checks. Nothing here asks for a test that pins an unimplemented path to throw. The spec sections I used are https://docs.vulkan.org/spec/latest/chapters/fragops.html#fragops-depth-clamp and https://docs.vulkan.org/spec/latest/chapters/copies.html (the depth-copy range rule).

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I independently checked the two concerns raised in the discussion on exact head 2c401e31988c7b18308bade0e7ed3a81ba4ed0df. Both are confirmed from the code: the pass is selected for 32-bit depth/storage pairs without constraining stored values, while the store-back shader writes the integer payload as gl_FragDepth; and agc_driver_depth_storage asserts a pass ran even when APS5_NO_DEPTH_TRANSFER_PASS disables them. I also ran glslangValidator -V --target-env vulkan1.1 on both new shaders successfully, and rechecked git diff --check, current-main merge preview, the attached round-2 digest output, and the author's reported validation results. I am requesting changes for the two concrete issues below; the 16/16 focused GPU test result does not cover the arbitrary-bit round trip or the opt-out test configuration.


bool depthTransferPass(const Context& context, VkFormat depthFormat, VkFormat colorFormat) {
if (!context.pushDescriptors || !depthTransferPasses.load(std::memory_order_relaxed)) return false;
return aspectCopyBytes(depthFormat, VK_IMAGE_ASPECT_DEPTH_BIT) == 4 && singleComponent(colorFormat, 4);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The dispatch is enabled for every D32 + 32-bit single-component pair, but this does not restrict values already present in the storage alias. StorageToDepth.frag interprets each uint payload as a float and writes it through gl_FragDepth; finite out-of-range values, signed zero, subnormals, and NaNs therefore do not have demonstrated bit-preserving equivalence to CopyPlane on all device-feature/format paths. Please keep the copy path for values the pass cannot reproduce exactly, or leave this pass opt-in until the equivalence is established. Add enabled-vs-copy round-trip checks for representative out-of-range finite values and bit patterns where supported, and narrow the description to what those checks prove.

RunPairings(context, block);
ClearDepthSurfaces(context.device);
}
Require(!context.pushDescriptors || DepthTransferPassCount() > 0, "the device enables VK_KHR_push_descriptor but no depth plane transfer ran in shader passes");

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.

This assertion fails whenever APS5_NO_DEPTH_TRANSFER_PASS is present on a device with push descriptors: the environment switch disables the pass counter increments, but this test does not account for the switch. Please make the expectation conditional on the switch, then run agc_driver_depth_storage with the pass enabled and disabled, verifying zero passes in the latter run while the depth and stencil checks still pass.

@adriadam10 adriadam10 self-assigned this Oct 28, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreeing with the two points already raised at 2c401e3198, neither addressed yet:

  • DepthSurface.cpp:80-82: depthTransferPass gates on format and push descriptors only, while StorageToDepth.frag writes any stored word through gl_FragDepth and FromStorage fixes the viewport to 0..1. Values outside [0, 1] or NaN written through the storage alias are not kept bit for bit, and VK_EXT_depth_range_unrestricted is enabled where available. Either keep main's copy for values the pass can't reproduce exactly, or leave the pass opt-in until the equivalence is shown. Replace the blanket range claim with an argument per device configuration, and add enabled-versus-copy round-trip checks (-0.5, 2.0, signed zero, subnormals, NaN) stating bit preservation only as far as it holds.
  • DepthStorage.cpp:367 requires DepthTransferPassCount() > 0 whenever pushDescriptors is set, but APS5_NO_DEPTH_TRANSFER_PASS stops every increment, so the test fails with the switch. Honor the switch there (as DepthPlanePartialStore.cpp:135 does) and run agc_driver_depth_storage both ways, expecting zero passes in the off run.

Keep the copy fallbacks and the existing data, partial-rectangle and stencil checks.

@Meh7an
Meh7an force-pushed the perf/agc-depth-transfer-passes branch from 2c401e3 to 57d63ac Compare October 28, 2026 12:24
@Meh7an Meh7an changed the title perf(agc): transfer depth to and from storage images in shader passes perf(agc): read depth planes into storage images in a compute pass Oct 28, 2026
@Meh7an

Meh7an commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @adriadam10 thanks, both points were right. The PR is now 57d63ac, rebased onto main 2227f13, and its title and description changed with it.

1. Values the pass can't reproduce. I added enabled-versus-copy round trips to agc_driver_depth_storage. Each one stores 16 words into a D32 or D32S8 plane through the store-back and reads them back through a storage view: 0.25, 1, ±0, -0.5, 2.0, three subnormals, FLT_MAX, ±inf, and quiet and signalling NaNs with payloads. I ran them on an RTX 2080 Ti (driver 617.14) with VK_EXT_depth_range_unrestricted enabled and, through the new --restricted-depth run, without it:

  • main's copies, direct and through the staging buffer, brought back all 16 words in both configurations.
  • Reading the depth aspect in the compute pass brought back all 16 words in both configurations.
  • The fragment depth write did not. It flushed subnormals to ±0 and turned every NaN into -inf, and without the extension it clamped to [0, 1]. Finite values outside [0, 1] survived with the extension, but only because this driver did not clamp them: with the [0, 1] viewport the spec leaves them undefined. A ±FLT_MAX viewport, the spec's way to make them defined, broke the existing store-back test on this driver.

So the PR now keeps only the compute pass, for depth to storage. Storage to depth always uses main's copy, and the draw, its render pass, framebuffer and fragment shader are gone.

For each configuration: with or without the extension, the pass reads the 32-bit depth texel with OpImageFetch, without a sampler, and stores its bits unchanged. The spec defines no conversion for that read, and the tests show every word kept. I claim nothing beyond that for NaN payloads or subnormals on other GPUs. The test states its expectations only as far as they hold:

  • the pass must give back exactly what the copy gives back, word for word, in both configurations;
  • 0.25, 1 and +0 must come back everywhere;
  • -0.5 and 2.0 must come back where the depth range is unrestricted;
  • for signed zero, subnormals, ±inf and NaN, it reports which words the copy changed (none on this GPU) without asserting on them.

2. The switch in DepthStorage.cpp. The assertion now honors APS5_NO_DEPTH_TRANSFER_PASS. agc_driver_depth_storage_copies runs the test with the switch set and requires zero passes, with the data and stencil checks unchanged. agc_driver_depth_storage_restricted_depth runs it without the extension.

On the Sonic 3 & Knuckles menu page, the copy class drops from 2.76 to 1.68 ms per frame, measured against main c02d287 before the last rebase. One of its two transfers per frame now runs in the pass; the other is the copy back into the depth plane. The frame rate moves within noise. The numbers, the round-trip table and the traces are in the description.

@Meh7an
Meh7an requested a review from adriadam10 October 28, 2026 12:25
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Meh7an Thanks, dropping the storage-to-depth draw settles the range question, and the off-switch arm in agc_driver_depth_storage now checks what it should. One small thing is left, in the docs. main's depth-to-storage path copies the bits (vkCmdCopyImage or a buffer copy). The new pass moves each value through a shader float read (texelFetch then floatBitsToUint in DepthToStorage.comp), and the shader declares no DenormPreserve or SignedZeroInfNanPreserve mode. You said on the PR that nothing is claimed for NaN payloads or subnormals on other GPUs. Could you put that limit in docs/dev/debt/libSceAgcDriver.md, with APS5_NO_DEPTH_TRANSFER_PASS as the way back to the exact copy? Right now only ENVIRONMENT.md mentions the pass.

@adriadam10 we'll merge this once the request above is addressed and exact-head CI is green, unless you'd rather merge it yourself.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed exact head 57d63ac306f22ea71b02075e0d738113c4728aa5. The earlier test concerns are addressed in this head: RunRoundTrips compares the pass with the copy path across the signed-zero, out-of-range, subnormal, infinity and NaN words, and its pass-count assertion now permits APS5_NO_DEPTH_TRANSFER_PASS; the pass-off case is separately selectable. The remaining blocker is the behavior limit raised in the latest review: depthToStoragePass is enabled by default for eligible format/push-descriptor devices, while the test only requires exact input preservation for [0,1] values and for out-of-range values when unrestricted depth is available. Please add the still-unmeasured bit-preservation scope and the APS5_NO_DEPTH_TRANSFER_PASS fallback to docs/dev/debt/libSceAgcDriver.md as requested, so the default behavior and its limits are explicit. Current-main merge preview is clean; exact-head Windows workflow passes, product Linux/GPU jobs are skipped. I did not run local GPU tests.

@adriadam10
adriadam10 force-pushed the perf/agc-depth-transfer-passes branch from 57d63ac to f227dc3 Compare October 29, 2026 10:10
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 57d63ac merged onto main 52c09d5 · tested 2026-10-29 10:17 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,279 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 39 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,322 of 2,873 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 (896 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 2 of the last 4 main runs
Failing on main too (3, not counted against this PR)
agc_compute_pipeline_inspection
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 25 other runs in the last 7 days
Validated but not compared (3, not in the main baseline's validation pass)
agc_driver_depth_plane_partial_store_image_copy
agc_driver_depth_storage_copies
agc_driver_depth_storage_restricted_depth
Validation IDs already present on main (4 IDs in 436 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (436 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 428 more
VUID-vkCmdCopyImage-srcImage-01548 (10 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 2 more
VUID-vkCmdCopyImage-srcImage-01551 (10 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 2 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 57d63ac306f22ea71b02075e0d738113c4728aa5 52c09d567d2fa453494dd720fcf53a98149468e4
git checkout 52c09d567d2fa453494dd720fcf53a98149468e4 && git merge --no-ff 57d63ac306f22ea71b02075e0d738113c4728aa5
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.

Meh7an and others added 2 commits October 29, 2026 19:30
A D32 depth plane is copied into the 32-bit color storage image that holds its texels whenever a shader accesses the plane as a storage image: with vkCmdCopyImage where VK_KHR_maintenance8 allows it, else through a staging buffer. Where the device has VK_KHR_push_descriptor, which is now enabled when present (Context::pushDescriptors), DepthSurface reads the plane into the image in a compute pass instead. The pass fetches the depth aspect through a sampled view and stores the bits through an r32ui view, rectangle by rectangle, so partial unit stores use it too. Its two views are pushed, so a recorded pass holds no descriptor set, and the pass of each device is released in ClearDepthSurfaces.

Copies back into the depth plane keep the existing copies: a fragment shader's depth write flushes subnormals, does not keep NaN, and clamps to [0, 1] without VK_EXT_depth_range_unrestricted. D16, the stencil plane, multisampled surfaces and the layered copies keep the copies as well, as does APS5_NO_DEPTH_TRANSFER_PASS=1. agc_embedded_shader adds a Graphics/shaders source as an embedded SPIR-V header.
@adriadam10
adriadam10 force-pushed the perf/agc-depth-transfer-passes branch from f227dc3 to badf4cd Compare October 29, 2026 19:00
@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head badf4cd merged onto main bb04a4f · tested 2026-10-30 00:54 UTC · 30 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,313 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 40 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,359 of 2,918 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 (898 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 42.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 6 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 63 other runs in the last 7 days
Validated but not compared (3, not in the main baseline's validation pass)
agc_driver_depth_plane_partial_store_image_copy
agc_driver_depth_storage_copies
agc_driver_depth_storage_restricted_depth
Validation IDs already present on main (5 IDs in 433 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (433 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_array_layer_target, agc_driver_array_layer_target_cpu, agc_driver_bda_anchor_reads, and 425 more
VUID-vkCmdCopyImage-srcImage-01548 (10 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 2 more
VUID-vkCmdCopyImage-srcImage-01551 (10 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 2 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-vkCmdCopyBuffer-commonparent (1 test): agc_driver_depth_clear_hle
Skipped (40)
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_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_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
Reproduce
git fetch origin badf4cd6df76c8b7a39d8facac0274780b791e7a bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff badf4cd6df76c8b7a39d8facac0274780b791e7a
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.

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

An AMD RDNA 4 run on Windows of badf4cd6df as is, since the tests in the description ran on an RTX 2080 Ti. Its only conflict with current main is docs/dev/debt/libSceAgcDriver.md, so I built the head itself (base bb04a4f1ea).

Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32015.7029, amdvlk64), MSYS2 UCRT64 g++ 16.1.0, Release. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; with VK_LOADER_DEBUG=layer the loader logs Insert instance layer "VK_LAYER_KHRONOS_validation" in every run of every test below that creates a Vulkan instance. 3 runs:

  • The new agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_storage_copies and agc_driver_depth_storage_restricted_depth pass 3 of 3.
  • agc_driver_depth_storage, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_buffer_copy, agc_driver_depth_plane_partial_store_unimported and the three agc_driver_depth_plane_cpu_write_after_* tests also pass 3 of 3.
  • No VUID- line.

AI-assisted: yes (Claude Code)

# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
@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 d6e038b merged onto main f6232fc · tested 2026-11-03 07:15 UTC · 28 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,746 passed · 6 failed (0 new, 3 also fail on main, 3 unstable 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,801 of 3,743 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 (940 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s, ⚠️ agc_driver_lookup_log_fits_build 33.7 s
Unstable on main (3, 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_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 (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 528 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (528 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 520 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (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_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_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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
Reproduce
git fetch origin d6e038b9a2f96ca8f16eea2020789cb665b09079 f6232fcfda70644495273f6b8dd88cf0603463d6
git checkout f6232fcfda70644495273f6b8dd88cf0603463d6 && git merge --no-ff d6e038b9a2f96ca8f16eea2020789cb665b09079
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.

@RNK123

RNK123 commented Nov 3, 2026

Copy link
Copy Markdown

On RX 9060 XT / RADV, the D32 depth-to-storage shader pass matched the copy control for the exercised round trips, including the tested NaN payloads in unrestricted-depth mode; the round trip changed three subnormal inputs in both paths.

  • Main 4f41f4c375f5abb487dbd184fbc150f31994d762, PR head d6e038b9a2f96ca8f16eea2020789cb665b09079, merged tree c790efc0a059cb2aec2708cdab1651fbc35bde37. Four existing focused entries passed 3/3 each on both trees. The three new pass-disabled, restricted-depth and image-copy entries also passed 3/3 each on the candidate; no skips.
  • For both D32 and D32S8, the PR fixture compares its 16 input words after a copy round trip with those after a shader-pass round trip. In unrestricted-depth mode it reported that the copy round trip changed 0x00000001, 0x007fffff and 0x807fffff; the shader-pass result matched that copy result. The result does not identify which stage changed those words, and is not evidence of a PR regression. In restricted-depth mode other values, including NaNs, changed during the round trip, so that mode does not establish NaN-payload preservation through the pass.
  • Sensitivity check on the merged candidate, not pristine main: with the fixture unchanged, deliberately replacing shader output 0x7fc12345 with zero made the unrestricted agc_driver_depth_storage comparison fail 3/3; the pass-disabled control and restricted-depth arm still passed. Restoring the exact shader yielded 3/3 passes in each of the four focused repaired entries. This checks one deliberately injected data fault, not all floating-point behavior. The expected fault assertion left two Vulkan objects alive at teardown, producing VUID-vkDestroyDevice-device-05137 only in the intentionally failing runs.
  • CachyOS Linux 7.3.1-1-cachyos, GCC 16.2.1, Release, Radeon RX 9060 XT (1002:7590, RADV GFX1200), Mesa 26.2.5-arch3.1, Vulkan device API 1.4.354, loader and Khronos validation layer 1.4.363. GPU selection and actual Khronos layer insertion were logged in the normal runs; no VUID- or SYNC-HAZARD- there. An unrelated LSFG implicit-layer loader failure occurs on both trees.
  • No game, PS5 hardware, performance comparison or full test suite was run. The results apply to the values and device configuration exercised here.
Reproduction
cmake --build build-main --target agc_driver_depth_storage_tests agc_driver_depth_plane_partial_store_tests -j4
export ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer
export VK_LAYER_PATH="$HOME/.local/share/anyps5-tester/vk-layers/usr/share/vulkan/explicit_layer.d"
ctest --test-dir build-main -R '^(agc_driver_depth_storage|agc_driver_depth_plane_partial_store|agc_driver_depth_plane_partial_store_unimported|agc_driver_depth_plane_partial_store_buffer_copy)$' --timeout 90 -V

Repeat three times on each tree. On the candidate also run agc_driver_depth_storage_copies, agc_driver_depth_storage_restricted_depth and agc_driver_depth_plane_partial_store_image_copy three times. For the injected-fault check, replace the shader's 0x7fc12345 output with zero, rebuild, run the unrestricted, restricted and pass-disabled storage entries, then restore the shader and repeat.

AI-assisted independent hardware test run (gpt-6.1-terra, medium).

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

Labels

agc libSceAgc* build docs perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants