perf(agc): filter absent depth surface addresses before scanning #4646
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4646"
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 Scramblrrrr on 2026-10-12T17:37:56Z.
What
Image-table draws can query thousands of texture addresses while hundreds of depth surfaces are retained. An address that never belonged to a depth or stencil plane scans the surface vector on every lookup. A Windows 007 worker profile identified these failed scans as a CPU hot spot during loading.
Keep a conservative set of
(device, address)keys for created depth and stencil planes. An absent key returns before the preliminary scan and GPU lock; possible matches retain the existing lookup, extent, format, sampling, and fast-clear behavior. Admit keys before construction, so failed construction leaves only a harmless false positive. Clearing a device removes its keys while preserving depth-plane copy cleanup. The set owns no surface or texture pointers.The existing recorder depth-proof fixture checks a miss before surface creation, then the successful lookup and fast proof. A focused CTest selector runs this coverage independently and returns skip77 if null descriptors are unavailable.
Tested
1c5e62878ab01af05d5a75bd94146228f5dea9d4, including merged #425 and #3816. Headc3ef8bc9ed4208fada2203e8f04b8aca35aa7ccb; only the two original PR commits carried.agc_depth_surface_lookup0.55s, full mockedagc_driver_graphics4.68s, nativeagc_driver_depth_fast_clear0.52s andagc_driver_depth_plane_sampling0.56s: 4/4 pass, total6.55s, no skips.git diff --checkpass. The new preliminary lookup introduced by #425 is guarded before its scan; plane-copy cleanup and initialization remain.34b85f2a8. Its current scene remains slow and partially black; this PR is not a rendering cure or a demonstrated FPS improvement. Exact runtime heads/configuration and ongoing cross-tests are on #2523. Title code, profiles, screenshots and dumps stay local.This is separate from #1199/#1430 depth fast proofs and #4448 storage-import/comparison policy. Open #4683 overlaps surface creation and device cleanup. A separate combined branch was validated on its earlier main base, but its plane ownership changes are not included here and compatibility with #454 retirement remains under review.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-12T23:00:59Z.
Acknowledged #4683 overlap. #4683 carries current depth/stencil plane contents between different pairings and chooses the plane's latest owner; #4646 only filters addresses that could never match a surface. They do not implement the same behavior and neither depends on the other.
The combined lookup must keep the conservative address admission before construction, remove device keys on teardown, and apply the negative-address check before any fallback surface scan in the new plane lookup. #4683's owner updates and aspect-copy/fast-clear handling must remain intact. This is source-level overlap analysis, not combined native/game validation. Both heads currently report MERGEABLE; #4646 remains draft, with no007 FPS claim.
AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-12T23:04:09Z.
Combined source branch is prepared on current main43e3a70f8143f014f621c48abbdb137fffd7346e: https://github.com/Scramblrrrr/AnyPS5/tree/codex/depth-filter-plane-pairing-current-main , head9d5d0f94965dd100a52015abf78bec34349ddaf1. This retains both #4646 commits and author-preserved #4683 head35c4b5cde, resolving only DepthSurface.cpp conflicts. Negative admission check now lives at the start of planeSurface; both addresses are admitted before a newly created surface is constructed, and device cleanup keeps both key and owner-map removals. All #4683 pairing/copy tests and #4646 recorder lookup/CLI coverage remain. Source/diff-check/conventions pass. Not built/staged; native combined validation will follow after the separate007 test ends. No game/FPS claim, no competing PR. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-12T23:16:06Z.
Combined Windows validation completed for9d5d0f94965dd100a52015abf78bec34349ddaf1 on main43e3a70f8143f014f621c48abbdb137fffd7346e: both #4646 commits plus author-preserved #4683 35c4b5cde. Fresh graphics/recorder target builds, RTX5070Ti/GCC15.2/Release/toolsOFF.
Full mocked agc_driver_graphics PASS4.67s and native agc_depth_surface_lookup PASS0.55s,2/2 in5.56s, no skip. Production-only negative restores DepthSurface.cpp from preceding814a830e2 (filter kept, pairing fix removed), fixtures/CMake unchanged: graphics FAIL "a depth plane paired with another stencil plane must carry its depth over", native lookup control PASS,2-test total5.16s. Restore/touch/rebuild positive: graphics4.84s/native lookup0.35s,2/2 PASS5.24s. Source clean/diff-check/conventions pass. All both PRs' fixture/registration changes retained; address guard is in the common planeSurface helper before lookup/fallback scan, keys admitted before construction and cleared by device.
Branch: https://github.com/Scramblrrrr/AnyPS5/tree/codex/depth-filter-plane-pairing-current-main . This is combined PR compatibility/native validation, not a game cross-test or real-GPU readback of pairing copies. None of these generic build artifacts were staged into007; its ongoing runtime stack remains separate. No FPS claim. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-13T00:18:15Z.
Rebase completed and pushed:
c3ef8bc9edon main1c5e62878ab01af05d5a75bd94146228f5dea9d4, retaining only this PR's two commits. Preserved #425 plane-copy cleanup/clear initialization; the negative address guard now runs in the preliminary locked lookup before its vector scan/GPU lock. The new memory-value HTILE clear from #3816 is retained unchanged.Windows11/GCC15.2/RTX5070Ti/Release: fresh four-target build. Focused native depth lookup0.55s, full mocked graphics4.68s, native depth fast clear0.52s and native depth-plane sampling0.56s,4/4 PASS6.55s, no skips. Source clean, diff/conventions pass. Validation ran after the separate007 game ended; no native tests/builds concurrent with that game. PR description rewritten for this base/result. None of these generic build libraries staged into007. No FPS/rendering cure claimed. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:38:45Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed