perf(agc): stop counting the lease of a build that never stores through BDA as a writer #10382

Merged
Celegans12 merged 1 commit from upstream-pr/10382 into main 2026-11-02 10:22:45 +00:00
Celegans12 commented 2026-10-23 20:20:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-23T20:20:24Z.


What

Skip read-only BDA leases in writer queries; preserve read/write-after-read ordering and real writers. APS5_NO_READ_ONLY_LEASE_SKIP=1 restores counting. #8887 remains separate.

Tested

Based on main 67bfc04ab1. Windows 11, GCC 15.2.0, Release -DBUILD_TESTING=ON, SPIR-V Tools OFF.

Windows: 32 Vulkan passes; Linux/lavapipe: 8. Normal modes and agc_driver_read_only_lease_writer_counted/agc_driver_linear_target_draw_bindings_counted pass; no new VUID signatures. Linux retains the old-layer maintenance8 warning; write-watch/writer-in-flight subcases are unavailable.

LinearTargetDrawBindings sets APS5_RELEASE_ON_UNLOCK=1; watched-branch coverage is unproven. Earlier main controls fail as recorded; not rerun. No title/performance run.

Historical captures

The Oct24 PPSA26344 menu comparison was inside run spread. These excerpts select worker/phase entries; all context and retained values are unchanged. Full records/traces.

{"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"worker_busy_pct":{"queue worker 0x0":61.336},"top_phases_ms_per_frame":{"Driver.Packet":363.867,"Shader.PrepareArtifact":329.176},"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz"}
{"commit":"6454d3e28838","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":12517.761},"presents":60,"frame_ms":{"p50":132.147,"p90":433.555,"p99":3023.111,"max":3023.111},"gpu_busy_ms_per_present":84.484,"worker_busy_pct":{"queue worker 0x0":55.484},"top_phases_ms_per_frame":{"Driver.Packet":362.956,"Shader.PrepareArtifact":397.331},"trace_dropped":false,"trace":"aps5-trace-6454d3e28838-7740.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: PPSA26344 #675
  • GPUs tested: RTX 3080 Laptop, 610.62, Windows 11; lavapipe LLVM22.1.8, Windows 11; Mesa25.2.8/LLVM20.1.2, Ubuntu24.04
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4988753194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10382). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-23T20:20:24Z. --- ### What Skip read-only BDA leases in writer queries; preserve read/write-after-read ordering and real writers. `APS5_NO_READ_ONLY_LEASE_SKIP=1` restores counting. #8887 remains separate. ### Tested Based on `main` 67bfc04ab1. Windows 11, GCC 15.2.0, Release -DBUILD_TESTING=ON, SPIR-V Tools OFF. Windows: 32 Vulkan passes; Linux/lavapipe: 8. Normal modes and `agc_driver_read_only_lease_writer_counted`/`agc_driver_linear_target_draw_bindings_counted` pass; no new VUID signatures. Linux retains the old-layer maintenance8 warning; write-watch/writer-in-flight subcases are unavailable. LinearTargetDrawBindings sets `APS5_RELEASE_ON_UNLOCK=1`; watched-branch coverage is unproven. Earlier main controls fail as recorded; not rerun. No title/performance run. #### Historical captures The Oct24 PPSA26344 menu comparison was inside run spread. These excerpts select worker/phase entries; all context and retained values are unchanged. [Full records/traces](https://github.com/Celegans12/AnyPS5/tree/bringup-media/traces/title-2026-10-24). ```json {"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"worker_busy_pct":{"queue worker 0x0":61.336},"top_phases_ms_per_frame":{"Driver.Packet":363.867,"Shader.PrepareArtifact":329.176},"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz"} {"commit":"6454d3e28838","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":12517.761},"presents":60,"frame_ms":{"p50":132.147,"p90":433.555,"p99":3023.111,"max":3023.111},"gpu_busy_ms_per_present":84.484,"worker_busy_pct":{"queue worker 0x0":55.484},"top_phases_ms_per_frame":{"Driver.Packet":362.956,"Shader.PrepareArtifact":397.331},"trace_dropped":false,"trace":"aps5-trace-6454d3e28838-7740.json.gz"} ``` ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: none - [x] Fixes: none - [x] Unblocks: PPSA26344 #675 - [x] GPUs tested: RTX 3080 Laptop, 610.62, Windows 11; lavapipe LLVM22.1.8, Windows 11; Mesa25.2.8/LLVM20.1.2, Ubuntu24.04 - [x] AI-assisted: yes
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!10382
No description provided.