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

Merged
Tehshortbus merged 1 commit from upstream-pr/12813 into main 2026-11-05 08:50:03 +00:00
Tehshortbus commented 2026-10-29 10:52:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tehshortbus on 2026-10-29T10:52:56Z.


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 #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

  • 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: #7085, #8484, #11920 (merge order only: this rebases onto each as it lands)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 615.78.08, CachyOS Linux (kernel 7.3.0-4-cachyos)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5066683292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12813). Originally posted by [Tehshortbus](https://github.com/Tehshortbus) on 2026-10-29T10:52:56Z. --- ### 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 #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. - **Affected (3), all older, so this lands after them** (**Depends on** below). Whichever of them merges, I rebase this onto it and switch the two lines to `APS5_LOG_CHARS_OUT_DEBUG` where they end up: - #7085 replaces the `vkCmdPipelineBarrier` call on the line before `upload submit` with `imageBarrier`; - #8484 moves both lines, unchanged, into an `if (batch)` block; - #11920 resolves the same `vkCmdPipelineBarrier` call through the device function table. - **Not affected (32):** merging with this PR gives the same `Texture.cpp` result as merging with `main`, either the same conflicts as with `main` (#1368, #1395, #4448, #5609, #6187, #6188, #6192, #6197, #6209, #6280, #6481, #6960, #6971, #7256, #7604, #10064) or none in this file (#6977, #7514, #7642, #8246, #9432, #9508, #9891, #9892, #9893, #9895, #10193, #10249, #10472, #11280, #12070, #12662). 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 - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #7085, #8484, #11920 (merge order only: this rebases onto each as it lands) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 615.78.08, CachyOS Linux (kernel 7.3.0-4-cachyos) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
BunnyFl commented 2026-11-03 04:51:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-03T04:51:56Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5747410191 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12813#pullrequestreview-5747410191). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-03T04:51:56Z. **Review:** APPROVED --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12813
No description provided.