perf(agc): skip the resource-cache key and lookup for address-based draws #2657

Merged
oneandonlydean merged 1 commit from upstream-pr/2657 into main 2026-10-10 14:15:32 +00:00
oneandonlydean commented 2026-10-10 10:15:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T10:15:13Z.


What

A draw whose stages bind a BDA table or a fault buffer (ShaderResources::NeverReusable) no longer builds a resource-cache content key or probes the shared resource cache. It counts as uncacheable.

Such a build needs completion work (NeedsCompletion), so noteReusable never keeps it, and the cache never holds an entry the draw could hit. The key and the probe were pure cost.

Tested

  • Linux (CachyOS, x86-64, GCC, RTX 4090), Release with BUILD_TESTING=ON: ctest -R agc passes 318/319. The one failure, agc_driver_dcc_keys_first_write, fails the same way on current main.
  • agc_driver_graphics_tests (tests/BdaResources.cpp):
    • an address-based build and a fault-buffer build are NeverReusable and not Reusable;
    • a build with neither is not refused.
  • Astro Bot (PPSA21564), measured on our fork: in the hub, where nearly every draw is address-based, the key and probe were about 2.5% of the queue 0 worker.
  • On an earlier main-based testing branch, Space Station ran 0.432 / 0.451 fps against 0.455 / 0.448 without it, which is inside run-to-run noise. That branch was GPU-bound.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4810454572 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2657). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T10:15:13Z. --- ### What A draw whose stages bind a BDA table or a fault buffer (`ShaderResources::NeverReusable`) no longer builds a resource-cache content key or probes the shared resource cache. It counts as uncacheable. Such a build needs completion work (`NeedsCompletion`), so `noteReusable` never keeps it, and the cache never holds an entry the draw could hit. The key and the probe were pure cost. ### Tested - Linux (CachyOS, x86-64, GCC, RTX 4090), Release with `BUILD_TESTING=ON`: `ctest -R agc` passes 318/319. The one failure, `agc_driver_dcc_keys_first_write`, fails the same way on current `main`. - `agc_driver_graphics_tests` (tests/BdaResources.cpp): - an address-based build and a fault-buffer build are `NeverReusable` and not `Reusable`; - a build with neither is not refused. - Astro Bot (PPSA21564), measured on our fork: in the hub, where nearly every draw is address-based, the key and probe were about 2.5% of the queue 0 worker. - On an earlier `main`-based testing branch, Space Station ran 0.432 / 0.451 fps against 0.455 / 0.448 without it, which is inside run-to-run noise. That branch was GPU-bound. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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: none - [x] AI-assisted: yes (Claude Code)
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!2657
No description provided.