fix(agc): collect upload generation after host import #10696

Merged
Amoenus merged 4 commits from upstream-pr/10696 into main 2026-10-27 01:59:40 +00:00
Amoenus commented 2026-10-24 18:22:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-24T18:22:18Z.


What

Collect the storage upload generation again after successful HostImportFor, before stamping the uploaded units.

ImportWatched can collect newer stamps during import setup. Saving the earlier generation makes a newly uploaded array look changed at its next partial refresh: the requested first layer uploads again, while untouched last-layer units remain behind and prevent the refresh proof. The original DepthPlanePartialStore fixture catches this on Windows with both GPU vendors.

The two-line correction retains the original fixture and proof/pending/alias guards. Investigation and requested controls: #10664.

Fast-clear images retain the generation used to prove their clear value. Advancing it after import setup could hide a CPU write made after that proof; the uncompressed path instead reads from the import after the new collection. Original fixture author’s review confirms the distinction and no overlapping fix. Thanks to @janzezno and @MarcZX10 for narrowing the provenance and @MaxLikesCode for independent reproduction.

Tested

Normal merge refresh to current frozen main 48c160c58b589157ebd94ebd53736a182f8303bf; exact validated/published head 7191aef0047c81dd4b99727aaf5ba63d6648f76a. Published af4b99cca49d8b49b9725e2bf42e0b9ab6fdb380 remains an ancestor and is archived locally. The two-line topic delta is identical; no force push. Full native libraries (370 patched PRXs), relinker and real DepthPlanePartialStore fixture build on both sources; executable/native hashes are stable across each matrix. Conventions and whitespace pass.

Windows11 Enterprise26200, WinLibs GCC15.2r7/UCRT Release. 24 fresh focused GPU processes: imported proof fails3/3 per GPU on literal main and passes3/3 per GPU on this head; the unimported control passes3/3 per GPU on both sources. Six retained main assertion failures; candidate12/12 pass. Same original fixture, with the known imported small-plane conditional omission retained; the partial-array proof is exercised, while unimported controls complete. No weakened assertions or diagnostic code in the submission.

NVIDIA RTX5080/621.01 (32.0.16.2101) and AMD Radeon Graphics/32.0.21045.16010 (Vulkan26.10.1), actual device identity and loaded Khronos1.4.363 verified per process. Required Vulkan, app shader cache/journal disabled and verbose serial CTest. Zero VUIDs, validation errors/warnings, whole-process skips or timeouts on either source; longest candidate 0.635s. Prior CPU, broad-suite, independent-vendor and title evidence below retains its own source pins.

Cppcheck then clang-tidy complete without parser/configuration failure or timeout. Seven previously reviewed advisory notices remain in unchanged-main code outside the correction; source contexts checked. Not static-clean; no automatic fixes.

Exact main/change pins, artifacts, all24 verbose logs and analysis. This confirms the correction remains needed after main's linear-target completion changes. No new Sonic-unblock, performance, full default-suite or Linux result is claimed.

Earlier source-pinned evidence and independent contributor reports

Windows11 Enterprise26200, WinLibs GCC15.2r7/UCRT Release. Full native libraries/relinker and real selected fixtures build on both pinned revisions.

  • Current pair: literal main 30be9b428b / refreshed head af4b99cca4, 19 processes each. Imported proof fails3/3 per GPU on main and passes3/3 per GPU with the fix. Unimported controls pass3/3 per GPU on both. Seven affected write-watch CPU checks pass on both. Main includes #9159, which does not supersede this correction.
  • Same-machine RTX5080 and AMD Radeon Graphics, actual device identity and loaded Khronos1.4.363 verified. Required Vulkan, cacheoff and verbose serial CTest. No VUID, validation error/warning, whole-process skip or timeout; max0.717s main/0.660s fix.
  • Conditional coverage: imported registrations omit the earlier small-plane guest-write subcase, while exercising the array-proof assertion. Unimported controls finish without conditional omissions. The original fixture is byte-identical on main/fix. The older report's blanket assertion-coverage wording is corrected in place.
  • Earlier broader main 29f539a5f3 / fix 8afdc2e10a:37 processes each (36GPU,1CPU), main31pass/6proof failures, fix37pass. This separately pinned matrix covers depth/copy/storage, MSAA/FMASK/retirement, journal, pixel interlock, guest layers, last writer, relocation, pooled range and shader-cache roundtrip. PipelineJournal enables its isolated temporary cache internally.
  • Requested outer-layer initialization control:8/8pass. Original-fixture walk tracing confirms newer stored stamps precede driver import; diagnostic branches are excluded here.
  • Refreshed-head Cppcheck/clang-tidy:53.522 analyzer-seconds, seven previously reviewed notices in unchanged-main code outside the correction, no parser error/timeout; advisory, not static-clean. Current conventions pass.

Current paired pins, complete focused logs and coverage scope. The same Gist retains the earlier broader matrix and requested controls. Published history through3a28164803 is preserved by a normal merge. Main50757b01c6 subsequently adds only FreeType CID metadata; those AGC/write-watch/fixture/policy sources are unchanged. No Sonic-unblock, speedup or unchanged-main50757 execution claim.

Independent reported checks (separate from our local runs):

  • janzezno: exact head3a28164803/base5357acd697, Linux/RADV AMD RX7900GRE;39/39selected depth/storage/import checks pass on both, no VUID, layer loaded. Both proof registrations also pass5repeats on the head. The baseline passes there, so this is Linux non-regression evidence, not reproduction of the Windows failure.
  • MaxLikesCode: Windows11Pro26200/RTX4090/617.42 with Khronos; main2fade7ef4e ordinary fails3/3,unimported passes3/3. With3a28164803 merged onto that main, both pass3/3; no VUID. That main already includes #9159. Our separate local main30be/fixaf4b comparison above now confirms the same failure/pass pattern on both GPU vendors.
  • Jishnuraj07: Windows11Pro26200/RTX5060/617.42, head af4b99cca4 merged onto main 75227c7cdc. Imported proof fails3/3 on main and passes3/3 with the PR; unimported control passes3/3 on both. Reported60-test texture/depth/import/plane sweep:58pass/2fail main,59pass/1fail change; common agc_host_import_cut_lifetime failure (#10746) retained. Khronos1.4.363, required Vulkan/cacheoff/verbose CTest; no missing-layer line or VUID reported. This is the contributor’s report, not a fresh run or raw-log audit by us.
  • Bram910: Windows11/desktop RTX3080/Ryzen7950X, WinLibs GCC15.2r7 Release, main 57f506f811 with this PR alone. Reported imported proof fails3/3 on main, passes3/3 plus10 consecutive with the PR; unimported control keeps passing. Reported full2310-test suite has no new failures beyond #10746, with a one-off agc_driver_depth_clear_hle failure under load that passes5/5 alone and on rerun; its main-side status was not checked. Contributor report, not a raw-log audit or rerun by us.
  • brummilab: Discrete AMD RX6600XT/32.0.21045.16010, Windows11Pro26300, head af4b99cca merged onto main7a25f8762. Reported original partial-store proof fails3/3 on main and passes3/3 with the PR. Validated44-test sweep: main41pass/2fail/1skip; change42pass/1fail/1skip;42 loaded-layer logs,0VUID. Common #10746 failure and sparse-import skip retained. Contributor report; not a rerun or raw-log audit by us.
  • SeaSunPT: NVIDIA RTX5070Ti/610.88, Windows11Pro26200, head af4b99cca merged onto maina7a2eece4. Reported68-test storage/depth set repeated3times: main67/68 each, change68/68 each; the main failure is the original partial-store proof. Khronos1.4.363, required Vulkan/cache-off/verbose CTest; no missing-layer line or VUID. Reported full-suite2374/2375 passes, with the same #10746 failure on main too. Contributor report; not a rerun or raw-log audit by us.

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; silent stubs are listed in technical debt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #10664
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX5080, driver621.01/32.0.16.2101; AMD Radeon(TM) Graphics, driver32.0.21045.16010 (Vulkan26.10.1); both Windows11 Enterprise26200.
  • AI-assisted: yes (Codex); author responsible
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4997972628 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10696). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-24T18:22:18Z. --- ### What Collect the storage upload generation again after successful `HostImportFor`, before stamping the uploaded units. `ImportWatched` can collect newer stamps during import setup. Saving the earlier generation makes a newly uploaded array look changed at its next partial refresh: the requested first layer uploads again, while untouched last-layer units remain behind and prevent the refresh proof. The original `DepthPlanePartialStore` fixture catches this on Windows with both GPU vendors. The two-line correction retains the original fixture and proof/pending/alias guards. Investigation and requested controls: #10664. Fast-clear images retain the generation used to prove their clear value. Advancing it after import setup could hide a CPU write made after that proof; the uncompressed path instead reads from the import after the new collection. [Original fixture author’s review](https://github.com/boykopovar/AnyPS5/issues/10664#issuecomment-6387884502) confirms the distinction and no overlapping fix. Thanks to @janzezno and @MarcZX10 for narrowing the provenance and @MaxLikesCode for independent reproduction. ### Tested Normal merge refresh to current frozen main `48c160c58b589157ebd94ebd53736a182f8303bf`; exact validated/published head `7191aef0047c81dd4b99727aaf5ba63d6648f76a`. Published `af4b99cca49d8b49b9725e2bf42e0b9ab6fdb380` remains an ancestor and is archived locally. The two-line topic delta is identical; no force push. Full native libraries (370 patched PRXs), relinker and real `DepthPlanePartialStore` fixture build on both sources; executable/native hashes are stable across each matrix. Conventions and whitespace pass. Windows11 Enterprise26200, WinLibs GCC15.2r7/UCRT Release. **24 fresh focused GPU processes:** imported proof fails3/3 per GPU on literal main and passes3/3 per GPU on this head; the unimported control passes3/3 per GPU on both sources. Six retained main assertion failures; candidate12/12 pass. Same original fixture, with the known imported small-plane conditional omission retained; the partial-array proof is exercised, while unimported controls complete. No weakened assertions or diagnostic code in the submission. NVIDIA RTX5080/621.01 (32.0.16.2101) and AMD Radeon Graphics/32.0.21045.16010 (Vulkan26.10.1), actual device identity and loaded Khronos1.4.363 verified per process. Required Vulkan, app shader cache/journal disabled and verbose serial CTest. Zero VUIDs, validation errors/warnings, whole-process skips or timeouts on either source; longest candidate 0.635s. Prior CPU, broad-suite, independent-vendor and title evidence below retains its own source pins. Cppcheck then clang-tidy complete without parser/configuration failure or timeout. Seven previously reviewed advisory notices remain in unchanged-main code outside the correction; source contexts checked. Not static-clean; no automatic fixes. [Exact main/change pins, artifacts, all24 verbose logs and analysis](https://gist.github.com/Amoenus/86b381e46b96f09c6c89d64dc3076264#file-current-main48c-qualification-v1-json). This confirms the correction remains needed after main's linear-target completion changes. No new Sonic-unblock, performance, full default-suite or Linux result is claimed. <details> <summary>Earlier source-pinned evidence and independent contributor reports</summary> Windows11 Enterprise26200, WinLibs GCC15.2r7/UCRT Release. Full native libraries/relinker and real selected fixtures build on both pinned revisions. - Current pair: literal main `30be9b428b` / refreshed head `af4b99cca4`, 19 processes each. Imported proof fails3/3 per GPU on main and passes3/3 per GPU with the fix. Unimported controls pass3/3 per GPU on both. Seven affected write-watch CPU checks pass on both. Main includes #9159, which does not supersede this correction. - Same-machine RTX5080 and AMD Radeon Graphics, actual device identity and loaded Khronos1.4.363 verified. Required Vulkan, cacheoff and verbose serial CTest. No VUID, validation error/warning, whole-process skip or timeout; max0.717s main/0.660s fix. - Conditional coverage: imported registrations omit the earlier small-plane guest-write subcase, while exercising the array-proof assertion. Unimported controls finish without conditional omissions. The original fixture is byte-identical on main/fix. The older report's blanket assertion-coverage wording is corrected in place. - Earlier broader main `29f539a5f3` / fix `8afdc2e10a`:37 processes each (36GPU,1CPU), main31pass/6proof failures, fix37pass. This separately pinned matrix covers depth/copy/storage, MSAA/FMASK/retirement, journal, pixel interlock, guest layers, last writer, relocation, pooled range and shader-cache roundtrip. PipelineJournal enables its isolated temporary cache internally. - Requested outer-layer initialization control:8/8pass. Original-fixture walk tracing confirms newer stored stamps precede driver import; diagnostic branches are excluded here. - Refreshed-head Cppcheck/clang-tidy:53.522 analyzer-seconds, seven previously reviewed notices in unchanged-main code outside the correction, no parser error/timeout; advisory, not static-clean. Current conventions pass. [Current paired pins, complete focused logs and coverage scope](https://gist.github.com/Amoenus/86b381e46b96f09c6c89d64dc3076264#file-current_main30be-md). The same Gist retains the earlier broader matrix and requested controls. Published history through3a28164803 is preserved by a normal merge. Main50757b01c6 subsequently adds only FreeType CID metadata; those AGC/write-watch/fixture/policy sources are unchanged. No Sonic-unblock, speedup or unchanged-main50757 execution claim. <!-- codex-independent-validation-10696-v1 --> Independent reported checks (separate from our local runs): - [janzezno](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6388301161): exact head3a28164803/base5357acd697, Linux/RADV AMD RX7900GRE;39/39selected depth/storage/import checks pass on both, no VUID, layer loaded. Both proof registrations also pass5repeats on the head. The baseline passes there, so this is Linux non-regression evidence, not reproduction of the Windows failure. - [MaxLikesCode](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6388332494): Windows11Pro26200/RTX4090/617.42 with Khronos; main2fade7ef4e ordinary fails3/3,unimported passes3/3. With3a28164803 merged onto that main, both pass3/3; no VUID. That main already includes #9159. Our separate local main30be/fixaf4b comparison above now confirms the same failure/pass pattern on both GPU vendors. - [Jishnuraj07](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6396867827): Windows11Pro26200/RTX5060/617.42, head `af4b99cca4` merged onto main `75227c7cdc`. Imported proof fails3/3 on main and passes3/3 with the PR; unimported control passes3/3 on both. Reported60-test texture/depth/import/plane sweep:58pass/2fail main,59pass/1fail change; common `agc_host_import_cut_lifetime` failure (#10746) retained. Khronos1.4.363, required Vulkan/cacheoff/verbose CTest; no missing-layer line or VUID reported. This is the contributor’s report, not a fresh run or raw-log audit by us. - [Bram910](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6397767124): Windows11/desktop RTX3080/Ryzen7950X, WinLibs GCC15.2r7 Release, main `57f506f811` with this PR alone. Reported imported proof fails3/3 on main, passes3/3 plus10 consecutive with the PR; unimported control keeps passing. Reported full2310-test suite has no new failures beyond #10746, with a one-off `agc_driver_depth_clear_hle` failure under load that passes5/5 alone and on rerun; its main-side status was not checked. Contributor report, not a raw-log audit or rerun by us. - [brummilab](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6401203412): Discrete AMD RX6600XT/32.0.21045.16010, Windows11Pro26300, head af4b99cca merged onto main7a25f8762. Reported original partial-store proof fails3/3 on main and passes3/3 with the PR. Validated44-test sweep: main41pass/2fail/1skip; change42pass/1fail/1skip;42 loaded-layer logs,0VUID. Common #10746 failure and sparse-import skip retained. Contributor report; not a rerun or raw-log audit by us. - [SeaSunPT](https://github.com/boykopovar/AnyPS5/pull/10696#issuecomment-6402565882): NVIDIA RTX5070Ti/610.88, Windows11Pro26200, head af4b99cca merged onto maina7a2eece4. Reported68-test storage/depth set repeated3times: main67/68 each, change68/68 each; the main failure is the original partial-store proof. Khronos1.4.363, required Vulkan/cache-off/verbose CTest; no missing-layer line or VUID. Reported full-suite2374/2375 passes, with the same #10746 failure on main too. Contributor report; not a rerun or raw-log audit by us. <!-- /codex-independent-validation-10696-v1 --> </details> ### 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 - [x] Unimplemented paths throw; silent stubs are listed in technical debt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #10664 - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX5080, driver621.01/32.0.16.2101; AMD Radeon(TM) Graphics, driver32.0.21045.16010 (Vulkan26.10.1); both Windows11 Enterprise26200. - [x] AI-assisted: yes (Codex); author responsible
MarcZX10 commented 2026-10-24 18:46:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T18:46:43Z.

Review: APPROVED


Reviewed exact head 3a28164803efab1d4cb1f4f79fe27d89df74d33e against current main (0ea0f25e1bfbf63e90bc28a3ca1bc4cd2a3972f6). The change advances now only after a successful HostImportFor in the uncompressed upload branch, before stampLayers(true) saves generations. It leaves the fast-clear path unchanged, so the generation used to prove its clear value is not refreshed after the proof; this matches the issue discussion. The exact head includes main 5357acd, and current main has no later changes to Texture.cpp. I reviewed the reported paired ordinary/unimported runs and validation evidence: 12/12 focused processes pass across the NVIDIA RTX 5080 and AMD Radeon iGPU, with the Khronos layer confirmed and no VUIDs. I verified git diff --check, current-main conventions, and a clean merge tree. I could not rerun AGC locally because this host CPU lacks the instruction extensions required by the test harness; the submitted physical-GPU runs cover the required comparison.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5639479457 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10696#pullrequestreview-5639479457). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T18:46:43Z. **Review:** APPROVED --- Reviewed exact head `3a28164803efab1d4cb1f4f79fe27d89df74d33e` against current `main` (`0ea0f25e1bfbf63e90bc28a3ca1bc4cd2a3972f6`). The change advances `now` only after a successful `HostImportFor` in the uncompressed upload branch, before `stampLayers(true)` saves generations. It leaves the fast-clear path unchanged, so the generation used to prove its clear value is not refreshed after the proof; this matches the issue discussion. The exact head includes main `5357acd`, and current main has no later changes to `Texture.cpp`. I reviewed the reported paired ordinary/unimported runs and validation evidence: 12/12 focused processes pass across the NVIDIA RTX 5080 and AMD Radeon iGPU, with the Khronos layer confirmed and no VUIDs. I verified `git diff --check`, current-main conventions, and a clean merge tree. I could not rerun AGC locally because this host CPU lacks the instruction extensions required by the test harness; the submitted physical-GPU runs cover the required comparison.
MarcZX10 commented 2026-10-24 20:39:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T20:39:34Z.

Review: APPROVED


Re-reviewed exact current head af4b99cca49d8b49b9725e2bf42e0b9ab6fdb380 after the normal merge update. The final production diff remains the two-line generation refresh after successful HostImportFor in the uncompressed branch; the fast-clear branch still retains the earlier proof generation. The refreshed report now includes a current-main (30be9b428b) versus refreshed-head (af4b99cca4) Windows comparison on both RTX 5080 and AMD Radeon Graphics: the imported proof failure is reported 3/3 per GPU on main and passes 3/3 per GPU with the change; the unimported control passes on both. The reported Khronos validation runs show no VUIDs. Independent Linux/RADV checks are non-regression evidence only. The focused GPU results are author-reported; I could not run the AGC suite locally. Hosted conventions/eligibility/labels pass; product jobs are skipped. I found no additional blocker in the updated diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5639896629 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10696#pullrequestreview-5639896629). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T20:39:34Z. **Review:** APPROVED --- Re-reviewed exact current head `af4b99cca49d8b49b9725e2bf42e0b9ab6fdb380` after the normal merge update. The final production diff remains the two-line generation refresh after successful `HostImportFor` in the uncompressed branch; the fast-clear branch still retains the earlier proof generation. The refreshed report now includes a current-main (`30be9b428b`) versus refreshed-head (`af4b99cca4`) Windows comparison on both RTX 5080 and AMD Radeon Graphics: the imported proof failure is reported 3/3 per GPU on main and passes 3/3 per GPU with the change; the unimported control passes on both. The reported Khronos validation runs show no VUIDs. Independent Linux/RADV checks are non-regression evidence only. The focused GPU results are author-reported; I could not run the AGC suite locally. Hosted conventions/eligibility/labels pass; product jobs are skipped. I found no additional blocker in the updated diff.
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!10696
No description provided.