fix(agc): target storage flush waits by writer lane #13920

Open
Celegans12 wants to merge 5 commits from upstream-pr/13920 into main
Celegans12 commented 2026-10-31 12:42:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-31T12:42:12Z.


What

Stacked on #13863; please review the last commit only. #8887 has merged into main, including Jan Šlégl's stored-layer, DCC/mip and shadow-range changes. Its read-trapped-layer correction includes all pending layers when write-back widens to the whole image.

Select each lane's original writer roots for a storage flush, wait their FIFO prefixes and dependency closure, and reselect ranges after callbacks. Address-based publication leases are included; only exact stamped own-write notes are excluded. Submitting another lane for progress does not promote it to a wait target. Keep the parent's return reconciliation and borrow refusal; async routing remains default off.

Compose #12070 exclusions with lane roots, preserve #8707/#13499 range coverage and #10382 read-only lease distinctions. Preserve #7464 label ordering, #10064 partial 3D views and #13858 address-based lease behavior. No game/FPS claim.

Tested

Based on main 92b4c42543 plus #13863 (rebased 2026-11-15; the commit applies unchanged on top of the merged #12070). Windows 11 / MinGW-w64 GCC 15.2.0, Release with -DBUILD_TESTING=ON: 14 lane-wait, storage-flush, ordered-flush, copied-writer and barrier cases, including main's new agc_driver_storage_flush_ordering_no_import, passed three times on RTX 3080 Laptop / 621.14 with validation 1.4.363, the lane cases on a second compute queue. No VUIDs, hazards or skips. agc_driver_storage_flush_lane_wait mutes the VUID-VkDeviceCreateInfo-pNext-pNext ID that older validation layers print at device creation, as in #13863.

Not tested on this head: Linux, macOS read traps, native Linux async, titles, console behavior or performance. The read-trap correction is from #8887; its macOS behavior remains unverified here.

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: #13863
  • Fixes: none
  • Unblocks: PPSA26344 #675
  • GPUs tested: NVIDIA RTX 3080 Laptop, 621.14, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097594906 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13920). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-31T12:42:12Z. --- ### What Stacked on #13863; please review the last commit only. #8887 has merged into main, including Jan Šlégl's stored-layer, DCC/mip and shadow-range changes. Its read-trapped-layer correction includes all pending layers when write-back widens to the whole image. Select each lane's original writer roots for a storage flush, wait their FIFO prefixes and dependency closure, and reselect ranges after callbacks. Address-based publication leases are included; only exact stamped own-write notes are excluded. Submitting another lane for progress does not promote it to a wait target. Keep the parent's return reconciliation and borrow refusal; async routing remains default off. Compose #12070 exclusions with lane roots, preserve #8707/#13499 range coverage and #10382 read-only lease distinctions. Preserve #7464 label ordering, #10064 partial 3D views and #13858 address-based lease behavior. No game/FPS claim. ### Tested Based on `main` 92b4c42543 plus #13863 (rebased 2026-11-15; the commit applies unchanged on top of the merged #12070). Windows 11 / MinGW-w64 GCC 15.2.0, Release with `-DBUILD_TESTING=ON`: 14 lane-wait, storage-flush, ordered-flush, copied-writer and barrier cases, including main's new `agc_driver_storage_flush_ordering_no_import`, passed three times on RTX 3080 Laptop / 621.14 with validation 1.4.363, the lane cases on a second compute queue. No VUIDs, hazards or skips. `agc_driver_storage_flush_lane_wait` mutes the `VUID-VkDeviceCreateInfo-pNext-pNext` ID that older validation layers print at device creation, as in #13863. Not tested on this head: Linux, macOS read traps, native Linux async, titles, console behavior or performance. The read-trap correction is from #8887; its macOS behavior remains unverified here. ### 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: #13863 - [x] Fixes: none - [x] Unblocks: PPSA26344 #675 - [x] GPUs tested: NVIDIA RTX 3080 Laptop, 621.14, Windows 11 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 12:47:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T12:47:49Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The source diff is clean on head 9c903d1870ea58fe98b2002599ef04348371a243, but the AGC validation evidence does not identify matching test runs for this PR head and its main baseline.

What I ran

Base: 60bdb061356db736928eee431cd8bd4c9ba68036; head: 9c903d1870ea58fe98b2002599ef04348371a243. The head stayed unchanged during the final precheck. The exact head merges cleanly with the current base in the pairwise preview; the stack helper separately reports a dependency-cycle parsing error, so I did not treat its overall stack result as a clean dependency validation.

Environment: Debian GNU/Linux 12, Python 3.11.2, GCC/G++ 12.2.0. I did not build or run GPU tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13920
git diff --check 819986503ab11b824a5dbb58db59aeda932e0910 9c903d1870ea58fe98b2002599ef04348371a243

I reviewed the last commit's writer-lane selection, dependency closure, open-batch submission, address-based leases, note exclusions, and the gated flush cases. The current head has the same source tree as the earlier 330ef981 snapshot checked during this review; the earlier precheck was discarded because GitHub moved the head while it ran. The stable rerun covers 9c903d….

Results

Check Result
Diff check Passed
Conventions and PR template Passed
Merge preview Target head is clean against base; stack checker separately reports a dependency-cycle parse error involving #8887, so dependency status needs manual interpretation.
AGC focused GPU tests The PR reports runs, but the listed short SHAs (049619c2, d50e1cef) do not identify the current PR head (9c903d…) or current base (60bdb…); the report does not map those runs to the required same-test base/change pair.
Hosted CI Conventions, eligibility, and labels passed. Windows was in progress; Linux and specialized jobs were skipped.
Unedited precheck output
All conventions checks passed.

Negative control

Assertion Change against the code under test Result
Removing the lane-targeting fix makes the unrelated-async-work case fail The PR author reports that the identical parent fixture fails the new storage-flush test Author-reported only; not independently run here because the focused C++ test needs a build and GPU runtime.

Findings

Blocking

  • The repository requires AGC changes to run the same focused tests on main and the change with validation layers, no shader cache, and Vulkan required, then compare the logs for new VUIDs. The current Tested section does not identify a run at head 9c903d… paired with the current base 60bdb…; its abbreviated SHAs refer to other commits. Please add the exact base/head SHAs, commands, and paired validation results, including confirmation that the validation layer loaded and no new VUIDs appeared. The rule is in CONTRIBUTING.md at base 60bdb061.

Non-blocking

None found in the last-commit source review.

Not verified

No local build, C++ tests, Vulkan validation run, or physical-console behavior was tested. The focused GPU test evidence in the PR is author-reported and is not tied clearly to the current exact head/base pair.

To get this to a good state

Please add the exact base and PR head for the matched focused AGC runs and their validation-layer results. I will rerun the same source checks against any new head and reassess the evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722763280 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13920#pullrequestreview-5722763280). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T12:47:49Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The source diff is clean on head `9c903d1870ea58fe98b2002599ef04348371a243`, but the AGC validation evidence does not identify matching test runs for this PR head and its `main` baseline. ## What I ran Base: `60bdb061356db736928eee431cd8bd4c9ba68036`; head: `9c903d1870ea58fe98b2002599ef04348371a243`. The head stayed unchanged during the final precheck. The exact head merges cleanly with the current base in the pairwise preview; the stack helper separately reports a dependency-cycle parsing error, so I did not treat its overall stack result as a clean dependency validation. Environment: Debian GNU/Linux 12, Python 3.11.2, GCC/G++ 12.2.0. I did not build or run GPU tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13920 git diff --check 819986503ab11b824a5dbb58db59aeda932e0910 9c903d1870ea58fe98b2002599ef04348371a243 ``` I reviewed the last commit's writer-lane selection, dependency closure, open-batch submission, address-based leases, note exclusions, and the gated flush cases. The current head has the same source tree as the earlier `330ef981` snapshot checked during this review; the earlier precheck was discarded because GitHub moved the head while it ran. The stable rerun covers `9c903d…`. ## Results | Check | Result | |---|---| | Diff check | Passed | | Conventions and PR template | Passed | | Merge preview | Target head is clean against base; stack checker separately reports a dependency-cycle parse error involving `#8887`, so dependency status needs manual interpretation. | | AGC focused GPU tests | The PR reports runs, but the listed short SHAs (`049619c2`, `d50e1cef`) do not identify the current PR head (`9c903d…`) or current base (`60bdb…`); the report does not map those runs to the required same-test base/change pair. | | Hosted CI | Conventions, eligibility, and labels passed. Windows was in progress; Linux and specialized jobs were skipped. | <details><summary>Unedited precheck output</summary> ```text All conventions checks passed. ``` </details> ## Negative control | Assertion | Change against the code under test | Result | |---|---|---| | Removing the lane-targeting fix makes the unrelated-async-work case fail | The PR author reports that the identical parent fixture fails the new storage-flush test | Author-reported only; not independently run here because the focused C++ test needs a build and GPU runtime. | ## Findings ### Blocking - The repository requires AGC changes to run the same focused tests on `main` and the change with validation layers, no shader cache, and Vulkan required, then compare the logs for new VUIDs. The current `Tested` section does not identify a run at head `9c903d…` paired with the current base `60bdb…`; its abbreviated SHAs refer to other commits. Please add the exact base/head SHAs, commands, and paired validation results, including confirmation that the validation layer loaded and no new VUIDs appeared. The rule is in [CONTRIBUTING.md at base `60bdb061`](https://github.com/boykopovar/AnyPS5/blob/60bdb061356db736928eee431cd8bd4c9ba68036/CONTRIBUTING.md#L70). ### Non-blocking None found in the last-commit source review. ## Not verified No local build, C++ tests, Vulkan validation run, or physical-console behavior was tested. The focused GPU test evidence in the PR is author-reported and is not tied clearly to the current exact head/base pair. ## To get this to a good state Please add the exact base and PR head for the matched focused AGC runs and their validation-layer results. I will rerun the same source checks against any new head and reassess the evidence.
XairRrR commented 2026-11-02 23:10:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:10:33Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (5cb015caaa): head 461f765146ba85de0f40c2c6a5802e6d4117549a conflicts in

  • core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744741274 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13920#pullrequestreview-5744741274). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:10:33Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (5cb015caaaaf83f8ee431414ee6a457b5b307d49): head 461f765146ba85de0f40c2c6a5802e6d4117549a conflicts in - `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=2239 head=461f765146ba85de0f40c2c6a5802e6d4117549a -->
MarcZX10 commented 2026-11-15 15:00:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T15:00:10Z.

Review: COMMENTED


Reviewed — no blocking findings

The last commit’s storage flush wait changes show no verified blocking defect; no checks were run in this review.

What I ran

Read the prepared diff and targeted source context at head bf9702dc58df4d5078c2637233e4a8aeddd3facc. The author reports Windows 11 / MinGW-w64 and RTX 3080 Laptop test runs in the PR description; I did not run those tests.

Read: review/description.md, review/commits.md, review/manifest.json, review/diff.patch, review/README.md, core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp, core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp, core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp, and core/libs/prx/libSceAgcDriver/tests/execution/StorageFlushLaneWait.cpp.

Results

Check Result Note
Targeted source review passed Last commit’s lane-targeted storage flush logic inspected
Tests not run Author-reported runs were not repeated
Full PR review not run Earlier commits were outside the requested scope

Findings

Blocking

None verified in the reviewed last-commit changes.

Non-blocking

None.

Not verified

The earlier four commits in this PR were not reviewed. Other changed files and behavior outside the last commit’s storage flush wait changes were not verified. Tests, build checks, and platform or console behavior were not run or confirmed by this review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5911379427 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13920#pullrequestreview-5911379427). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T15:00:10Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The last commit’s storage flush wait changes show no verified blocking defect; no checks were run in this review. ## What I ran Read the prepared diff and targeted source context at head `bf9702dc58df4d5078c2637233e4a8aeddd3facc`. The author reports Windows 11 / MinGW-w64 and RTX 3080 Laptop test runs in the PR description; I did not run those tests. Read: `review/description.md`, `review/commits.md`, `review/manifest.json`, `review/diff.patch`, `review/README.md`, `core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`, `core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp`, and `core/libs/prx/libSceAgcDriver/tests/execution/StorageFlushLaneWait.cpp`. ## Results | Check | Result | Note | |---|---|---| | Targeted source review | passed | Last commit’s lane-targeted storage flush logic inspected | | Tests | not run | Author-reported runs were not repeated | | Full PR review | not run | Earlier commits were outside the requested scope | ## Findings ### Blocking None verified in the reviewed last-commit changes. ### Non-blocking None. ## Not verified The earlier four commits in this PR were not reviewed. Other changed files and behavior outside the last commit’s storage flush wait changes were not verified. Tests, build checks, and platform or console behavior were not run or confirmed by this review. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:50:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:50:03Z.

Review: COMMENTED


The trial merge onto c1601e56d5 conflicts in both queue and storage paths. The current #13863 head is not an ancestor of this revision, so please pin the intended parent when resolving those files. In the writer-wait delta, keep the case where a completion creates a new overlapping writer as well as the case that leaves the unrelated lane pending. A single writer cannot verify both dependency closure and narrow waiting.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6180014036 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13920#pullrequestreview-6180014036). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:50:03Z. **Review:** COMMENTED --- The trial merge onto `c1601e56d5` conflicts in both queue and storage paths. The current #13863 head is not an ancestor of this revision, so please pin the intended parent when resolving those files. In the writer-wait delta, keep the case where a completion creates a new overlapping writer as well as the case that leaves the unrelated lane pending. A single writer cannot verify both dependency closure and narrow waiting. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/13920:upstream-pr/13920'
git switch 'upstream-pr/13920'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/13920'
git switch 'upstream-pr/13920'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/13920'
git switch 'upstream-pr/13920'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/13920'
git switch 'main'
git merge --squash 'upstream-pr/13920'
git switch 'main'
git merge --ff-only 'upstream-pr/13920'
git switch 'main'
git merge 'upstream-pr/13920'
git push origin 'main'
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!13920
No description provided.