fix(agc): check pending DCC writers before proof reuse #6676
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6676"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T03:55:58Z.
What
An unchanged host write-watch generation is not sufficient to reuse a DCC-key proof when the recorder has an unsignaled GPU writer for the same metadata range. The proof fast path now checks the recorder's pending-write state before returning cached keys. If a pending writer is present, the existing key-read path resolves it before a fresh proof is stored.
The recorder regression now checks that the old proof cannot bypass an unknown pending key writer, that resolving the writer produces a fresh stable proof, and that the proof is reused afterwards. This follows up on the failing
keyProofTestsassertion reported during review of #6642.Tested
agc_driver_recorder_testssuccessfully. A clean rebuild after the rebase fails before reaching the changed code atSrtDescriptorEvaluation.cpp:183(read.read->Flags<MemoryFlags>(), missing dependent-template disambiguation). This file is outside this PR. The target therefore is not currently reproducible in this clean build environment.python3 tools/check_conventions.py --base upstream/main: passed after rebasing onto5d9dcc42d.git diff --check: passed.agc_driver_recorder_testswith lavapipe. The key-proof test was skipped because this Linux environment has no guest write-watch support; the full run later failed atthe refresh's store of the results did not reach guest memory. Therefore the regression itself was not exercised locally and still needs a run on a write-watch-capable system.Checklist
main; no other open PR implements the same behaviorImported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-16T04:16:03Z.
Review: CHANGES_REQUESTED
I ran the no-argument
agc_driver_recorder_testswith this head (46ddfb117, on main5d9dcc42d) on an RTX 5080, a Radeon 610M (RADV) and lavapipe, 3 runs each. The rewritten key-proof check passes on all of them. It also passes withDccMetadata.cppreverted to main, so the test does not fail without the code change.The old assertion broke with #4554. A first-parent bisect from this PR's earlier base
f8c2f0724to5d9dcc42don a Radeon 680M gives8bf10e51fas the first merge where(9) a scan under a pending write was keptfails. That change makestextureClearKeyscallWaitForKeyWritersbefore reading, so the scan under a pending writer already waits and is stable on main. The test update matches main's current behaviour. Is there a sequence where an old proof is reused under a pending writer on current main? A test for it would need to fail withDccMetadata.cppreverted.With either variant the suite then stops in
resourceReadTestsatsecond draw observed overwritten inputon all three devices, so #6642 still cannot register the full run.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T04:17:31Z.
Thanks for the detailed current-main check. I can't currently demonstrate a pending-writer sequence where the old proof is reused while is unchanged, and the revised test does not distinguish the production change from current main. I'll withdraw this patch rather than keep an unproven change open.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T04:17:39Z.
Correction to my withdrawal note: I meant that I cannot demonstrate a pending-writer sequence where the old proof is reused while DccMetadata.cpp remains unchanged. The revised test also does not distinguish this production change from current main. I am withdrawing the patch.
Pull request closed