Skip to content

chore(agc): log the storage upload submit and done lines only with APS5_DEBUG_LOG - #12813

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Tehshortbus:chore/storage-upload-log
Nov 5, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Tehshortbus:chore/storage-upload-log

Conversation

@Tehshortbus

@Tehshortbus Tehshortbus commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

The synchronous upload in Texture.cpp printed StorageTexture upload submit and StorageTexture upload done unconditionally, around the blocking submit of every storage image upload. Both now use APS5_LOG_CHARS_OUT_DEBUG, as the matching writeback lines do since #12244, so they are compiled out unless APS5_DEBUG_LOG is defined. +2/−2, no behaviour change.

Tested

CachyOS Linux (kernel 7.3.0-4-cachyos), GCC 16.2.1, Release, NVIDIA GeForce RTX 4070 SUPER (615.78.08).

  • Focused tests: main f99d7fece3 and this change on it (6eec740e13), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build-tests -V -R '^(agc_driver_prepared_shaders_indirect|agc_driver_recorder|agc_driver_array_layer_target_cpu|agc_driver_depth_plane_partial_store_buffer_copy|agc_driver_image_table_cache|agc_recorder_cube|agc_storage_split_writeback|agc_driver_bc_block_copy|agc_driver_vertex_target_range_copied|agc_slice_dirty|agc_driver_staged_clear_sampled_read_draw_pipeline|agc_driver_depth_surface_from_storage)$'. These are the twelve tests that print the lines in a full agc_ run on main (1,110 of 1,110 pass there). After rebasing onto 365ad48546 (head 93568c8644; Texture.cpp is unchanged on main in between), the same twelve pass again with no VUID- line and no StorageTexture upload line.

    main this change
    tests 12/12 pass 12/12 pass
    VUID- lines 0 0
    was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
    StorageTexture upload lines 286 0
  • PPSA26344 (02.002.000), main f99d7fece3 and this change, one run each from launch, with anyps5-entitlements.ini listing the add-on label the title needs. Both runs stop about 116 s in on AGC: Ghost of Yōtei (PPSA26344) stops on a draw that blends unclamped normalized color into two color targets #12796, which this does not touch:

    StorageTexture upload lines stdout lines
    main 856 978 (88 % of them)
    this change 0 122

    GTA V (PPSA04264) takes no synchronous storage upload, so its logs have none of these lines on either build.

  • python3 tools/check_conventions.py --base origin/main and git diff --check pass.

Overlap and merge order: I merged each pull request tools/pr_overlap.py lists with this PR, and separately with main, and compared the conflicts in Texture.cpp, the only file this PR changes.

Not checked: a build with APS5_DEBUG_LOG defined (the macro's debug branch is unchanged and already used elsewhere), and Windows or other GPUs.

Checklist

🤖 Generated with Claude Code

…S5_DEBUG_LOG

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oneandonlydean oneandonlydean self-assigned this Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13486 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 14943 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 15529 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp

@Tehshortbus

Copy link
Copy Markdown
Contributor Author

Checked the overlap report by hand. This needs no Depends on:

AI-assisted: yes (Claude Code)

@Tehshortbus

Copy link
Copy Markdown
Contributor Author

A correction and a complete answer to the overlap report, since my first reply only searched the diffs for the two lines and missed #7085.

I merged each of the 35 listed pull requests with this PR, and separately with main 365ad48546, and compared the conflicts in core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp, the only file this PR changes.

Affected by this PR (3). All three are older, so this lands after them, recorded in Depends on. Whichever of them merges, I rebase this onto it and switch the two lines to APS5_LOG_CHARS_OUT_DEBUG where they end up:

Not affected (32). Merging with this PR gives the same Texture.cpp result as merging with main:

AI-assisted: yes (Claude Code)

@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 93568c8 merged onto main 88e804b · tested 2026-11-02 11:53 UTC · 21 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,497 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 45 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,546 of 3,234 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 (970 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 2 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 495 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (495 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 487 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-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
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_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 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_o
Reproduce
git fetch origin 93568c86443b91876dabcf7a0eac76d23972016e 88e804b0a7df1f1ac373a9e2f72fb378d925fdd4
git checkout 88e804b0a7df1f1ac373a9e2f72fb378d925fdd4 && git merge --no-ff 93568c86443b91876dabcf7a0eac76d23972016e
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.

@Tehshortbus

Copy link
Copy Markdown
Contributor Author

On the NVIDIA GPU test result for 93568c8: I couldn't reproduce the agc_driver_depth_clear_hle failure. Same merge as the report (main ba5b533 + 93568c8, merge c664bf62a0), RTX 4070 SUPER (615.78.08), CachyOS Linux, Release, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

  • 3 runs through ctest -R '^agc_driver_depth_clear_hle$' -V and 20 runs of the test executable alone: 23 of 23 pass, with no VUID-vkCmdCopyBuffer-commonparent line and no crash.
  • This PR only switches the two StorageTexture upload submit/done lines to APS5_LOG_CHARS_OUT_DEBUG. Their arguments are string literals, and in a build without APS5_DEBUG_LOG the macro is ((void)0). The only runtime difference is two fewer stdout writes around the synchronous upload's submit.
  • In the report's rerun log (10-rerun.log), the crash comes after the test creates a second VulkanDevice (device 0x70a34016f1a0). The next vkCmdCopyBuffer uses a source and destination buffer made on the first device (0x59a29c84a990), the validation layer can't find them, and the process crashes. Here the run also creates the second device, but no copy crosses devices.

So this looks like a buffer that outlives or crosses its device in the test's driver-submit cases, and the timing on that machine decides whether it's reused. It doesn't look like an effect of this change. I haven't found the buffer yet; the order of upload completion is my best lead.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the agc libSceAgc* label Oct 29, 2026
@Tehshortbus

Copy link
Copy Markdown
Contributor Author

The overlap report was updated today with 12 pull requests my earlier reply didn't cover. I merged each with this PR (on main d6401d794e) and separately with main, and compared core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:

No code change.

AI-assisted: yes (Claude Code)

@BunnyFl BunnyFl 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.

Still applies to current main f6232fcfda: both lines are unconditional APS5_LOG_CHARS_OUT at core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:3186 and :3188. APS5_LOG_CHARS_OUT_DEBUG (core/libs/prx/libc/include/general/LogMacros.hpp:123, :126) prints only with APS5_DEBUG_LOG and is ((void)0) otherwise, so the submit/wait between them is unchanged.

Windows 11, WinLibs GCC 15.2.0: the merged Texture.cpp compiles with no warnings. I didn't run a storage-upload test; nothing outside the two log lines changes.

@oneandonlydean
oneandonlydean merged commit 18d793f into boykopovar:main Nov 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants