Skip to content

test(agc): account for unknown pending DCC key writes - #5883

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
AnzouBelilita:fix/agc-recorder-pending-write-proof-test
Oct 27, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
AnzouBelilita:fix/agc-recorder-pending-write-proof-test

Conversation

@AnzouBelilita

@AnzouBelilita AnzouBelilita commented Oct 14, 2026 •

Copy link
Copy Markdown

What

Update the recorder key-proof test to match the current pending-DCC-write behavior. A generic pending write has no known key value, so ProvedClearKeys must synchronize before it can cache a stable proof. Known pending key fills are already covered by pendingKeyStoreTests.

The old assertion expected repeated unstable scans for an unknown pending write; on current main that expectation fails because PendingStoreKeys correctly waits when it cannot infer the value. This is the same baseline recorder-test failure noted in #5497; this PR changes only the stale test expectation, not the pending-fill implementation.

Tested

Checklist

@Dextroid17

Copy link
Copy Markdown
Contributor

I ran this on Linux because my #6155 depends on it (its test run stops at your (9) check without your change).

Setup: main ab9a476 with this PR's change (one hunk in Recorder.cpp) applied; the PR head is 478 commits behind current main. Default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), ANYPS5_NO_SHADER_CACHE=1, lavapipe (Mesa 26.2.4 llvmpipe, LLVM 23.1.1). agc_driver_recorder_tests with no arguments, 3 runs each:

So on lavapipe the new expectations match main's current behaviour and clear the (9) stop. Whether synchronizing before caching a proof is the intended behaviour I did not check. I did not check the RX 580 run or Windows.

The red conventions check has 4 errors. I reproduced all 4 locally with main's tools/check_conventions.py against the same base (f343489), passing this PR's title and body:

  • Recorder.cpp:1171: the new // An unknown pending write cannot supply DCC keys... line counts as a code comment, which needs a change to docs/dev/TechnicalDebt.md or docs/dev/debt/ in the same PR. With only that line deleted, the checker no longer reports it.
  • 'What', 'Tested' and 'Checklist' are reported missing because the checker only matches ### headings with those exact names, and the description uses ## and "Tested locally". With ### What and ### Tested, those two clear. The checker then wants a ### Checklist section with no unticked boxes, "Depends on" filled with #N or none, and "AI-assisted" answered yes or no; the template's checklist covers this.

The template checks only run locally when --title or --body is passed, which may be why a plain local run passed.

AI-assisted: yes

This was referenced Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6971 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7048 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7604 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8484 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10333 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10442 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10773 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11485 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked on Linux (lavapipe, PR merged onto current main): agc_driver_recorder_tests now gets past check (9) but still exits 1 at "AGC graphics: second draw observed overwritten input", so the test is not green with this PR alone (same as @Dextroid17 reported; they say it needs the MarkWritten calls from #6155). The target is EXCLUDE_FROM_ALL and not in ctest, so CI will not show it either.

  • Land the fix for the later failure together with this one (or make this PR depend on #6155 and list it under "Depends on"), so the recorder test passes end to end.
  • core/libs/prx/libSceAgcDriver/tests/Recorder.cpp:1327: the new // line counts as a code comment and the conventions check requires a TechnicalDebt change for it; drop the comment.
  • PR body: the headings must be ### What, ### Tested and ### Checklist (the checklist fully ticked, "Depends on" filled, "AI-assisted" yes/no); the conventions job is red on these.

@MarcZX10

Copy link
Copy Markdown
Contributor

One dependency-order detail from the recorder work: #6155 currently lists #5883 as its dependency, while the review here suggests waiting for #6155 to clear the later recorder failure. Reversing that edge would make the two PRs depend on each other. The exact composition of current heads (#5883 + #6155 + #6642) passed agc_driver_recorder 3/3 on both RTX 3070 and lavapipe, as documented in #6642. Please coordinate the intended merge order or combined change with maintainers; the composition result supports the combined behavior, but does not resolve the current dependency cycle.

@blawesom

Copy link
Copy Markdown
Contributor

Addressed the code-comment request in a cherry-pickable follow-up at blawesom/AnyPS5:fix/5883-drop-comment (a09c951008, on top of this head 1b3f2e0982) — no branch rewrite needed.

Landed

  • core/libs/prx/libSceAgcDriver/tests/Recorder.cpp:1171: dropped the // An unknown pending write cannot supply DCC keys, … comment per the review. Verified python3 tools/check_conventions.py --base origin/main passes afterwards (before the drop it reported exactly Recorder.cpp:1171: error: [comment] Comments are only for technical debt…). agc_driver_recorder_tests still builds clean (cmake --build … --target agc_driver_recorder_tests → Built target).

Body and dependency ask

  • PR body headings are already ### What / ### Tested / ### Checklist with the checklist ticked and Depends on filled — the review's item 3 is satisfied on the current body as far as I can check independently (I couldn't run check_conventions.py --body … cleanly due to a CLI flag collision on my side, so verified heading structure by direct read).
  • Dependency cycle (#5883 ↔ #6155) is a maintainer-level coordination call, not code I can unilaterally change. MarcZX10's earlier note already routes it to maintainers — leaving that decision open.

Not run: GPU-side validation (this change deletes one comment line; no behavior is affected).

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1b3f2e098260 against merge base 28b6f1987917. Recommend approval for the test-only expectation update.

A generic unknown pending write cannot provide DCC key bytes, so ProvedClearKeys synchronizes before creating and reusing a proof. The revised assertions match that behavior: nonzero generation, one scan, no unstable scan and an incremented proof count. Production code is unchanged.

Validation: Built the exact baseline recorder target on Windows with GCC 15.3 and RTX 5070 Ti, driver 616.92, with Vulkan required. The full recorder executable fails at the old assertion. Applying only the PR's sole test-file patch, rebuilding and rerunning the same executable succeeds. This validates the test-only behavioral delta. The narrower --pending-key-stores-only smoke test also passes, but does not reach the changed assertion.

Scope: No Linux/lavapipe or RX580 reproduction. Shader-cache settings and a Vulkan validation-layer comparison are not established by the saved report; hosted product jobs were skipped.

@oneandonlydean oneandonlydean self-assigned this Oct 26, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

I'm picking this up to get it into main. On an RTX 4090, the full agc_driver_recorder_tests run on current main still stops at (9) a scan under a pending write was kept, and this is the change that fixes that expectation. The later failure from the review is covered by #6155, which has since merged. I'll bring the branch up to date with main, include the comment removal from blawesom's follow-up (a09c951), and rerun the full recorder run on real hardware before merging. @AnzouBelilita thanks for the fix, your commit stays as is.

@oneandonlydean
oneandonlydean dismissed adriadam10’s stale review October 27, 2026 02:41

Addressed: #6155 (the MarkWritten change) has merged and is in this branch, and on the current head 1665fb4 the full agc_driver_recorder_tests run on Linux passes (rc 0: "Recorder read tracking and label tests passed"). On main ce6b15b the same run fails at check (9) "a scan under a pending write was kept" (rc 1). The code comment is removed and the description is updated. Exact-head CI 40418258202 is green.

@oneandonlydean
oneandonlydean merged commit 5b161a6 into boykopovar:main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants