feat(tools): replay pipeline journals without a title #25559
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25559"
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-22T09:03:52Z.
What
Add
agc_pipeline_journal_replayto compile a saved pipeline journal without booting a title. It uses a normal headless device and the existing journal compute hook. The replay tool gets the journal fingerprint from the Vulkan device properties already recorded by the driver.The command preflights magic/runtime ABI/source/device headers, delegates format validation to the journal runtime, copies only the journal into a newly created private cache, bounds graphics/compute recipes separately, and fails if replay builds no useful pipelines or reports rejected/failed/corrupt records. It emits JSON totals and flushed per-compute begin/end records with stable identity, SPIR-V content hash, word count, status and wall time, so a supervising process timeout leaves the last module identifiable.
Arguments after the paths are graphics limit, compute limit and worker count. The cache root must not exist. The cache root should be below a directory you control throughout replay. A preflight failure before journal staging removes the freshly created cache root so you can reuse the path. Limits are 0..4096 per kind and 1..32 workers; input is limited to 1 GiB. Use an external process timeout for a hard deadline. An active Vulkan compiler call is synchronous and cannot be cancelled safely through the journal cancellation hook. The target is
EXCLUDE_FROM_ALL, matching the existing replay tools.Tested
Current head
38d2ae6bbac4. The CMake relocation preserves both replay tests. On Linux/RADV both passed with Khronos validation active and zero errors. On hosted Windows, the existing-root test passed and the device-backed cache lifecycle case skipped. The Windows changed-library run reported zero failures across 6,392 selected cases. Linux/RADV validation · Hosted Windows resultChecked-in CLI tests at
50ffd8d0a6fc. Both tests passed on Linux with Radeon RX 6650 XT/RADV and zero Vulkan validation errors. The positive case recorded one recipe and one shader module, then verified one successfully replayed compute pipeline and matching journal bytes. The existing-root test passed with Vulkan unavailable and the device-backed test skipped. The changed-test selector resolved both CTest registrations to the fixture, and all 57 selector tests passed. Exact-head resultsCache cleanup qualification at
e7de0674b479. Linux RX 6650 XT checks covered a device fingerprint mismatch and a staging write failure, then successful replay into the same path. Staged bytes matched the input, one graphics and one compute pipeline built, and Vulkan validation reported zero errors. The separate existing-root test preserved the caller's files.Earlier staging checks at
2c16678aebf7. The Linux staging checks passed for exact bytes across multiple chunks, short and excess input cleanup, and an oversized input rejected before cache creation. A synthetic replay on the RX 6650 XT staged byte-identical data, built one graphics and one compute pipeline, and reported zero Vulkan validation errors. Staging review resultsCurrent Windows Unicode correction —
726e7b3d75bda39e0c446aa3450d43a944309a38: the Windows worker reproduced a Unicode-path crash at the previous head and supplied the tested fix (Windows report). The tool now takes native wide command-line paths throughwmainon Windows (-municodeon MinGW); the shared argument handler validates numeric arguments as ASCII. This follows the existingagc_pm4_replayentry-point pattern. No driver/library API changes.e83839c042plus the previous PR head, the same source/device-matching Crab PPSA20423 journal loads695 recipes/767 modules and replays256 graphics+11 compute. ASCII paths pass, while Cyrillic input/cache paths crash. The exact correction now committed here was tested privately as9f94d72193: ASCII and Cyrillic cases both exit0 with identical counts; existing-root rejection stays exit1;0VUID. This tests the Windows branch, independently of the Linux Unicode checks. The measured elapsed times are not a performance comparison.b1b0d4c75c7581efbb5ca174f9fdc1fcd496e36das the previous qualification; isolated explicit tool/seeder build. All14 replay CLI regressions plus seeding pass; four focused RX6650XT/RADV26.3.1 driver CTests pass with7 validation-layer insertions,0VUID and0skips. Seven additional numeric rejection cases pass. SDK and fixture hashes unchanged. The whole functional GPU harness used Linux FIFO; no FPS/loading claim.526b7b19d019daa6b832372f7e12bebad437e317; conventions and whitespace checks pass. The previous-head Windows CI failure wasguest_sleep_wake(exit0xc0000409), whose cause has not been established here; fresh CI will run for this head.New Linux logs/JUnit, Windows receipts, source patch and provenance, archive SHA256
09b88f2ad4dfa9a5fca4ab88d0cdbc78104f417bd56f65f1e1dcff4cffb0634c. Downloaded and verified all39 payload hashes. No journals, shader inputs, caches, SDK binaries or game data included.Current feedback qualification —
9acd199d0735fa57484ef88c822b3a52cf0d4364: address Dean's nonblocking feedback. The client no longer pins journal format 19. It retains magic/runtime ABI/source/device checks; the linked journal runtime validates the format. Windows cache setup now uses_wputenv_s(L"ANYPS5_SHADER_CACHE_DIR", root.wstring().c_str()).b1b0d4c75c7581efbb5ca174f9fdc1fcd496e36d. No library/API change or full SDK rebuild, and no root/q source or bank use.VUID-errors, preserved CTest properties. All native/GPU preparation, execution and cleanup used FIFO and the performance/build lease. Initial driver CTest setup could not write root-owned generated logs, so no driver tests executed in that attempt; after correcting ownership only the four driver cases were rerun. The failure and repair evidence are retained, with no source/binary change.Current logs, JUnit, source patch, provider hashes and harnesses, SHA-256
5158d0554d9f6c2dc5905eee06c8509c26b950eea6b11dba2d21db7dae6c23a1. Downloaded again and all 44 payload hashes verified, including the completed passing conventions log. No journals, caches, SDK binaries, shader inputs or game data are included. The earlier evidence below remains pinned tob72cf1eand its original SDK.Initial qualification (historical
b72cf1esource):7.3.5-arch1-1, GCC 16.2.1, Release. Sourceb72cf1e5eaa06c, based on main8f88598130cb94.bd4eb5b7c5d60d58b4b44c7d881ef6b5f1179e37; its AGC driver and recompiler source trees match the branch base. Selected SDK hashes matched its manifest. This is not a fresh full SDK rebuild. Windows is not yet tested.26.3.1-arch1.2; validation layer1.4.363versus headers335. Final logs contain 7 validation-layer insertions, zero missing-layer reports and zeroVUID-errors. All native/GPU harness preparation, execution and cleanup used the shared Linux FIFO and performance/build lease. The journal requires the shader cache enabled, so each process usesANYPS5_NO_SHADER_CACHE=0with a fresh private root; the original cache is never used as a writable runtime.CompileOnlynegative case proving that its journal wait performs zero work. The tool therefore uses a normal headless device.tools/check_conventions.py --base origin/mainandgit diff --checkpassed. Standard overlap check: automated exit 2 because 40 peer branches conflict with main; manually compared all 40 reported shared CMake diffs at their exact heads. None adds the new command/source/target or changes its insertion anchor; no implementation overlap or dependency found. The receipt and compared diffs are attached in the evidence Gist.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T09:22:33Z.
Review: APPROVED
Reviewed — looks good
The changed source and target configuration at head
b72cf1e5eaa06cb1bab914829d433da29bb10795show no verified blocking defect; the reported qualification results are author-reported, not runs performed in this review.What I ran
Read the prepared description, commit summary, diff, manifest, and both changed files. No build or executable checks were run.
Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests or builds were run. Windows behavior and other hardware configurations were not verified. The reported Arch Linux checks and their evidence were not independently inspected.
files.jsonwas not available as a review document; the manifest and review-folder listing show both changed files included and read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T12:11:47Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the review supports merging based on the code inspected.
What I ran
Reviewed head
9acd199d0735fa57484ef88c822b3a52cf0d4364using the prepared diff andrepo_read.pyto inspect the changed source and relevant replay implementation. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The manifest lists two changed files, both marked included. I read both files:
core/libs/prx/libSceAgcDriver/CMakeLists.txtandcore/libs/prx/libSceAgcDriver/tools/PipelineJournalReplay.cpp. I also read relevant portions ofcore/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp. No changed files were excluded in the manifest. Build behavior, CLI regressions, GPU behavior, and the Windows branch were not independently verified; the description reports Windows was not tested.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T14:27:36Z.
Review: APPROVED
Reviewed — looks good
Nothing in the inspected changes blocks merging; the code and supplied qualification evidence support the stated replay behavior.
What I ran
Reviewed head
726e7b3d75bda39e0c446aa3450d43a944309a38. No build or tests were run in this review. I read the complete diff and both changed files, then inspected the journal replay implementation, Vulkan device initialization and compute replay, and the existing Windows replay entry-point pattern.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the Windows or Linux builds, CLI regressions, GPU CTests, or physical-console behavior. The author reports Windows and Linux qualification in the PR description; this review did not independently confirm it. The review folder listed both changed files as included, and I read all their added lines. No changed files were excluded in the manifest.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by throny on 2026-11-22T15:52:19Z.
Review: COMMENTED
Review: ✅ reads the journal the driver writes, handles bad input safely; GPU run not done here
Basis: code read
Checked
HeadermatchesFileHeaderinPipelineJournal.cpp(magic0x4c4a5041, format, runtimeAbi, sourceVersion, device; 32 bytes), and the device check uses the samePipelineJournalDeviceFingerprintasVulkanDevice. Format mismatches are left to the runtime reader, which drops the journal; the tool then exits 2.payloadBytes, checks the hash and stops at the first bad record, so a torn tail only raisesdropped. Arguments are parsed with full-matchfrom_charsand range checks.EntryDirectory(), starts the replay itself, and waits for and destroys it before the device, as the driver does.Findings
PipelineJournalReplay.cpp:152:replayedGraphics <= graphics/replayedCompute <= computeare always true, because the runtime already trims to the limits. They are harmless but guard nothing.EXCLUDE_FROM_ALL, like the other replay tools, so CI never compiles it.Suggested action: merge after a GPU run confirms replay
AI-assisted review (Claude Code) · head
726e7b3d75· basemain23b8772462Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:04:56Z.
Review: COMMENTED
The replay executable is available in the macOS build, but its physical-properties lookup uses
dlopen("libvulkan.so.1")on every non-Windows host. The Vulkan device in this same branch useslibvulkan.1.dylibon macOS, so device creation can succeed while the replay command rejects the properties lookup. Please share the driver's loader path or use its existing instance function lookup.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T17:35:34Z.
Review: COMMENTED
Actionable comments
e2d680a7-ada3-4894-bdb9-8544f25de2a5Reviewing files that changed from the base of the PR and between
0e31514b2dand1e8560a802.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tools/PipelineJournalReplay.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:39:48Z.
Review: COMMENTED
The current head resolves my earlier macOS loader finding.
PipelineJournalReplaynow reads the fingerprint fromVulkanDevice, which computes it from the physical properties already loaded for that device. The separate Linux-only loader lookup is gone. I verified the change in source at1e8560a802. A macOS run remains unverified here.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T17:58:34Z.
Review: COMMENTED
Actionable comments
daf783f4-e7af-482d-8ecb-dc71b76e902dReviewing files that changed from the base of the PR and between
1e8560a802and2c16678aeb.core/libs/prx/libSceAgcDriver/tools/PipelineJournalReplay.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T18:00:04Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at
2c16678aebf7143ec55dbe98cd6cf6041d77d523has no verified blocking defects; the replay tool’s checks and delegation to the journal runtime are consistent with the inspected code.What I ran
Read the prepared review artifacts and targeted source ranges at the pinned head. No merge-preview check was run. No build or tests were run; author-reported results are not independent checks.
Results
Negative control
Not run; no tests were run during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No build, tests, Windows execution, or physical GPU behavior was independently verified. All four files listed under
reviewedwere inspected;files.jsonlists no excluded files. The new tool source was available in full; existing source files were read at targeted ranges.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T18:21:26Z.
Review: COMMENTED
The new staging code copies from the stream whose header was checked and removes its temporary file on failure. The command still creates the requested cache root before checking the device fingerprint and before staging the journal. Either failure leaves the root behind, so retrying the same command after correcting the input or GPU fails immediately with
private cache root already exists. Can those preflight failures leave the requested path available for retry?Source review at
2c16678aeb. The updated Linux replay build is queued.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T19:42:39Z.
Review: COMMENTED
The latest revision records ownership only after it creates the cache root, and shuts down the disk cache before removing that root when staging fails. It keeps staged roots available for inspection when replay fails later. Could the tool test assert those two outcomes and also check that a pre-existing root is left intact? The pipeline journal tests cover the journal library and do not invoke this CLI failure handling.
On Linux lavapipe, the earlier
1e8560a802merge and its pinned main both passedagc_driver_gcn_scalar_buffer_baseandagc_pipeline_journalwith shader caching disabled and validation layer 1.4.369 inserted. Neither log showed a missing-layer message orVUID-error. I checked the currente7de0674b4cleanup in source. Exact-head CLI execution is pending.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T20:00:48Z.
Review: COMMENTED
Actionable comments
9ce425ae-76b4-4df2-a128-ab024a52c28aReviewing files that changed from the base of the PR and between
e7de0674b4and5b1abc15e4.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayCli.pycore/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayFixture.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T20:09:32Z.
Review: APPROVED
Reviewed — looks good
The change at head
5b1abc15e451ee3e0d68075d75e9802e7c4faeb1is supported by the source inspected, with no verified blocking defects.What I ran
Read the prepared description, commits, manifest, diff, and included changed files. Used
repo_read.pyat the pinned head to inspect the replay tool, the changed device accessor, and relevant journal replay behavior. No build or test was run.Results
Negative control
Not run; no tests were run in this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
The new command validates the journal header and device fingerprint, stages the journal, waits for replay, and reports totals before returning success or failure (PipelineJournalReplay.cpp, pinned to this head). The new device accessor uses the same fingerprint helper used by the driver's journal replay path (VulkanDevice.cpp, pinned to this head, accessor).
Not verified
No build, CLI regression, GPU replay, Windows run, or Vulkan validation was performed. The description's reported checks were not independently verified.
VulkanDevice.cppwas read at the changed accessor and relevant caller, not in full.files.jsonlists no excluded files; the changed C++ source file omitted fromfiles/was inspected through the pinned reader.To get this to a good state
No action required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T20:32:23Z.
Review: COMMENTED
The new command-line fixtures cover a pre-existing cache root, a device mismatch, a staged write failure, and preserving the input after replay fails. Could the fixture also emit a journal with one valid replayable recipe and assert a successful CLI exit and nonzero pipeline count? That would tie the process-level checks to the advertised successful replay path.
Source review at
5b1abc15e4. The head trial-merges onto700fae9438. The new CLI cases are queued.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T22:38:48Z.
Review: COMMENTED
Actionable comments
809179a1-c8ae-4c46-8c9f-d7d4d21e606fReviewing files that changed from the base of the PR and between
5b1abc15e4and50ffd8d0a6.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayCli.pycore/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayFixture.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T01:10:35Z.
Review: APPROVED
Reviewed — looks good
The change adds bounded pipeline journal replay using the runtime’s format validation and device fingerprint; I found no verified blocking defect.
What I ran
Reviewed head
50ffd8d0a6fcaa0b50f4b1e3071750201483e7eausing the prepared diff and files, plus targeted source reads throughrepo_read.py. No build or test was run in the reviewer environment. The description’s Linux and Windows results are author-reported, not results I ran.Results
Negative control
Not run; the negative cases require the compiled replay executable and fixture.
Findings
Blocking
None.
Non-blocking
None.
Sources
core/libs/prx/libSceAgcDriver/CMakeLists.txt,core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp,core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp,core/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayCli.py,core/libs/prx/libSceAgcDriver/tests/PipelineJournalReplayFixture.cpp, andcore/libs/prx/libSceAgcDriver/tools/PipelineJournalReplay.cpp. No files were excluded by the bundle’s rules. The fullVulkanDevice.cppwas too large for the bundle; I read the changed accessor and its existing replay caller through the pinned reader.Not verified
I did not run builds, CLI tests, or hardware checks. Unchanged portions of
VulkanDevice.cppwere not read. Windows and GPU behavior are based only on the author-reported evidence.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T10:40:38Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes show no blocking defects and the inspected evidence supports merging.
What I ran
Reviewed head
38d2ae6bbac43ad0b2bcf8a11fca0c7b86126e91in a read-only source review; no build or executable tests were run. Toolchain: not invoked.Results
Negative control
Not run; this review made no changes to the code under test.
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior claims were checked against the prepared diff and source at the reviewed commit: replay CLI, replay runtime, and CLI test registration.
Not verified
No build, CLI execution, or hardware behavior was independently verified. All six changed paths listed under
files.json→reviewedwere inspected; five were available in the review folder, and the relevant changed lines of the largerVulkanDevice.cppwere read throughrepo_read.py.files.jsonlists no excluded paths. Test results in the PR description are author-reported.To get this to a good state
No follow-up is required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.