feat(agc): capture graphics shader requests without address selectors #14794
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14794"
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 JJenkx on 2026-11-01T17:58:44Z.
What
Adds opt-in
APS5_DUMP_GRAPHICS_SHADERS=1to save graphics-stage requests during draw capture, using the existingshader_<address>.reqserialization, address filter and once-per-process deduplication. Existing draw-entry reuse and asynchronous finishing are disabled only while this capture option is enabled, matching the targeted diagnostic options. Normal runs keep their existing behavior.While profiling Overcooked AYCE (PPSA01528), the dominant fragment shader took roughly 11 ms per frame, but its guest code address changed between launches. A target address from the previous run therefore captured nothing. This option captures requests without needing a previous launch's addresses;
APS5_DUMP_SHADERScan still narrow them if addresses are already known. It is a developer diagnostic, not a performance optimization.Overlap:
tools/pr_overlap.py --branchchecked 1,960 open PRs. #12478 independently changes the sameuseDrawEntriescondition: preserve both!bypassedand!dumpGraphicswhen combining them. No dependency is required. The tool could not integrate 47 older branches already conflicting with main; shared-file diffs were retained and screened for graphics-dump changes. Existing dump code in the heap/refactor stacks remains the address-targeted/failed-request path; none adds this all-graphics option. These combined stacks are not qualified here.Tested
Main integration (2026-11-05): exact merge head
e88fd6e41f265a30336bc3387de0905968690b83, parents previous public head6b7d6d8b195b40c7f34e634cdc8778d81e13963fand main6d173c1a19788ff69d43b3d0ca62833e312ef939. The branch push was a normal fast-forward, retaining all prior history. Stable topic patch ID and every authored added/deleted line are unchanged. Main supplies the already-merged #15375 wrapper-owner build-selection fix and #15855 sampled-depth allocation call correction; all 26 independent dependency clones match prescribed gitlinks.Linux Release, GCC 16.2.1, bundled SPIRV-Tools: rebuilt
libSceAgcDriverand the realagc_driver_draw_cache_reuse_testsfixture. Both the fixture and its CMake registrations are byte-identical to the previous public head. The generated CMake graph resolvesavplayer_http_patched_modulesto its own wrapper target, not a guest client. The 25 owner-selection and 33 target-resolution fixture tests pass, as do conventions and whitespace checks. No GPU fixture was executed for this main integration.Shared main check still failing: the public-header audit on pinned main and this unchanged header tree reports five missing
WKSecurityOrigindeclarations. Separate repair #16010 restores them and passes its own full audit and targeted GCC/MinGW header checks. It is awaiting maintainer merge/rerun; its WebKit change is not included here. This report does not claim all required CI is green.Source/patch continuity, provider pins, actual builds, CPU/helper logs, generated owner resolution and retained check failure, SHA-256
ac1a304b209e3c15d2564b490ca286f95fa19ddd151a840ae322ad232574ac30; downloaded bytes and all 33 manifest files verified. The archive also pins the existing shared-fix Windows receipts to their own sources. No new final-head Windows, GPU, title, performance or full-suite result is claimed.Historical qualification (original source pins):
Test-precision follow-up
6b7d6d8b195b(production source unchanged from4c8c5de482): the repeated-request guard now compares with the timestamp read back from the filesystem after setting the sentinel, and checks that it is at least 30 seconds old. This preserves rewrite detection on filesystems/APIs that round the requested timestamp.4c8c5de482production SDK passes four invocations (default draw-cache, dump disabled, all graphics, filtered). 0 skipped invocations,0 VUIDs,actual validation insertion in two instances per invocation; executable/library hashes and loader bindings unchanged.4c8c5de482found the two enabled dump tests failing the timestamp comparison. Actual corrected-head Windows qualification now passes the default DrawCacheReuse group plus the three dump groups three times each (12/12, zero skips/VUIDs), with actual Khronos instance/device insertion on Windows 11/RX 6700 XT. This is not a NVIDIA retest, new paired-main baseline, title/speed or full-suite claim.Timestamp probe, patch, exact build/run commands and Linux fixture logs, SHA-256
e6dd4467d0db634031b3e91f45f6807a8d7ad290f3b5fc1cffb4890f2f2421f6.Linux, AMD Radeon RX 6650 XT, RADV Mesa 26.2.6, kernel 7.2.11, Khronos validation 1.4.363.
Same focused CTest selection on main
f2d874c1fdccand main plus this change, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, and actualVK_LAYER_KHRONOS_validationinsertion:git diff --checkpass.Download synthetic test evidence, SHA-256
f959e02f9478df76ff7a7ed586a99b5d8b6721d5ba4d25d76aafe552cb0180ae; downloaded again and verified all 11 inner files. No proprietary game requests/assets are published.Native diagnostic: Overcooked AYCE PPSA01528 01.015.000 reached the first kitchen; 265s/310s compositor and X11 screenshots directly reviewed. Scheduled ordinary close, native/observer/harness exit 0 after 333.7s, 540 request files (8.53 MB), original inputs/saves and 799-file SDK bank unchanged, kernel import limit restored and no private game processes remain. The dominant fragment request passes both direct recompilation and prepared resource capture/materialization offline. Requests remain private. This run is not an FPS comparison because capture deliberately disables draw fast paths.
Independent reports on this head:
6b7d6d8b19merged ontomain1d91f29: 2,681 passed · 3 failed (0 new, 3 also fail on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1); validation: ✅ no new validation IDs vs main (986 tests run on the GPU).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T18:01:13Z.
Review: COMMENTED
Reviewed — no blocking findings
The opt-in capture path is connected to draw-stage materialization, preserves the existing address filter, and has focused registered tests; I found no source-level blocker.
What I ran
Reviewed head
4c8c5de4826433db6eac5f121cde2242de570acbagainst basef2d874c1fdccf781c0fa5d86619bb5dd8894b958; its merge preview against currentmainis clean. Environment: Linux x86-64, GCC 12.2.0, Python 3.11.2. I reviewed all changed hunks and test registration. I did not build or run the GPU tests; the runs in the PR description are author-reported.Results
main.Draw.cpp; their current main-based previews are clean.Raw check output
git diff --checkexited successfully and printed nothing. The precheck convention result was:The precheck could not launch the workspace-only ABI and test-quality helpers from its isolated checkout (
tools/pr_abi_audit.pyandtools/pr_test_quality.pyare absent from this PR tree). Its diff, convention and main merge-preview checks passed; it reported the helper launch errors separately.The pairwise merge preview reported:
The PR’s CTest registrations set
ANYPS5_NO_SHADER_CACHE=1; graphics and filtered modes also setAPS5_DUMP_GRAPHICS_SHADERS=1. The separate disabled mode does not set that option.Negative control
Not run locally: the new assertions require a compiled Vulkan test executable. The PR reports that both enabled-capture tests fail on
mainbecause requests are absent and pass on this head; I did not reproduce that control.Findings
Blocking
None found in the reviewed changes.
Non-blocking
!bypassedguard conflicts with this PR’s!dumpGraphicsguard on the sameDraw.cppcondition. The PR description already identifies the overlap; when resolving it, retain both conditions. No update is needed while both PRs remain based on the samemain.Sources
dumpGraphicsdisables draw-entry reuse at this headdumpRequestpath!bypassedguardNot verified
I did not compile or run the C++/Vulkan tests, verify the reported request archive independently, or run on other GPUs or a console. Hosted checks remain queued.
To get this to a good state
No change is requested for this head. Once the hosted checks finish, I can recheck them; if #12478 lands first, I will verify that the combined guard retains both conditions.