feat(agc): log each pipeline build before the driver call behind APS5_LOG_PIPELINE_BUILD_START #21960
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21960"
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 muhmuhkuh on 2026-11-16T23:12:28Z.
What
The slow-build line of a pipeline is written after the driver call returns. A crash inside the driver's shader compiler therefore leaves no line that names the pipeline.
With
APS5_LOG_PIPELINE_BUILD_STARTset, graphics pipelines, graphics pipeline libraries (including the prebuild of libraries) and compute pipelines write one flushed[pipecache] build startline to stderr before the driver call. The line holds the kind of build, a hash of the building thread and, for each stage, the stage number, the stage's module identity (DescribedPipelineIdentity), its SPIR-V size in words and an FNV-1a fingerprint of its words. Compute pipelines are logged at the dispatch pipeline creation and at the split compute pipeline creation; the pipeline journal replay is not logged.Without the variable nothing changes: the check is one cached environment read at each call site. The variable is listed in
docs/dev/ENVIRONMENT.md.Overlap with open pull requests: none found. The diffs of the 27 open PRs that touch
Graphics/src/Pipeline.cppwere searched forLOG_PIPELINE_BUILD_START,PipelineBuildStartandbuild startin added lines.Tested
Windows 11 Pro (10.0.26200), NVIDIA GeForce RTX 3080 Ti, driver 610.88, MinGW GCC 15.2 (UCRT, POSIX threads, SEH), Release, validation layer on (
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation). Built on the same machine onmainbc84729655and on this change at the same base. The five files this change touches are the same on the posting base8332b52dbf, so the tests were not repeated there.agc_pipeline_journal(and its long-path, extended-path variants through the same test body): the graphics line and the compute line equal the expected text built independently in the test (thread, stage, module identity, size, fingerprint), and two modules with different words get different fingerprints. All 52ctestentries that runagc_driver_graphics_testspass onmainand on this change.agc_pipeline_journalfails with "the graphics build start line does not name the thread and each stage's module, size and fingerprint".ctestentry that runsagc_driver_recorder_tests(151): all pass onmain, on this change with the variable unset, and on this change with the variable set. With the variable set the logs hold 43build start graphicslines; with it unset, none. No compute line appears in these tests, so the compute call sites are covered by the line check only, not by a run.VUID-lines in all three runs. The loader log shows the validation layer inserted in every run; the phrasewas not found but was requested by env var VK_INSTANCE_LAYERS: 0 occurrences.Checklist
main(8332b52dbfat posting time); 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)🤖 Generated with Claude Code
Summary by CodeRabbit
APS5_LOG_PIPELINE_BUILD_STARTenvironment variable, which enables pipeline build-start logging.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:04:08Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
990d0ce375a6dee270cd66062c7c5a08028986c1. No commands or tests were run. The description reports Windows 11 and NVIDIA validation runs; those results were not independently verified.Results
Findings
Blocking
None.
Non-blocking
Not verified
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppandcore/libs/prx/libSceAgcDriver/tests/Graphics.cppwere read throughrepo_read.py; their full files were excluded from the review folder because they were too large. The other changed files read werecore/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp,core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp, anddocs/dev/ENVIRONMENT.md.To get this to a good state
Nothing is required. Optionally clarify that the environment check is cached after its first call, rather than suggesting the environment read itself occurs at each call site.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T08:26:23Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this draft review; the optional point below clarifies where the logging currently covers multiple Vulkan pipeline calls.
What I ran
Reviewed head
59933a9ecd69a735489361301847e7781e03f2aeusing the prepared diff andrepo_read.py. No commands or tests were run in this review; the test results in the PR description are author-reported.Results
Negative control
Not run in this review. The PR description reports a mutation test that failed as expected after changing the FNV prime.
Findings
Blocking
None.
Non-blocking
LinkPipelineFromLibraries, which can make multiple Vulkan pipeline creation calls; the non-library path can also make follow-up calls for alternate alpha and depth-bias variants. If the intent is one line before every driver call, add logging at those calls. The existing line still records the shader stages before the first call. Pipeline.cppSources
Reviewed the diff and changed-file contents at the pinned head. The changed lines in
Pipeline.cppplace the graphics log before the library-link call and the direct creation call; the library-link implementation can create multiple pipeline parts. Pipeline.cpp PipelineLibrary.cppNot verified
No checks were run in this review. Read all changed lines in
VulkanDevice.cpp,Pipeline.hpp,Pipeline.cpp,tests/Graphics.cpp, anddocs/dev/ENVIRONMENT.md. No changed files were excluded from review.To get this to a good state
Nothing is required. Optionally emit a line before each additional Vulkan pipeline creation call if per-call logging is intended.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-29T08:27:36Z.
Review: COMMENTED
Actionable comments posted: 1
afbd2b12-bd52-4931-a5e7-c40a25ba1040Reviewing files that changed from the base of the PR and between
1f56d72520and59933a9ecd.core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/ENVIRONMENT.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T08:53:33Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the checks and source inspected support merging.
What I ran
Reviewed head
2c13fdb3106753af6fc9a8dd5184c832a043efc6against the prepared diff. I did not run tests or a build. Author-reported test results are summarized below.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read the full changed text available for
Graphics/include/Pipeline.hpp,Graphics/src/Pipeline.cpp, anddocs/dev/ENVIRONMENT.md; the changed hunks ofExecution/src/VulkanDevice.cppandtests/Graphics.cpp; and the prepared description, commits, manifest, and diff. The full text ofVulkanDevice.cppandtests/Graphics.cppwas excluded as too large, so unchanged behavior and callers outside the inspected ranges were not verified. I did not run the reported Windows/Vulkan test suites or verify Linux, other AGC tests, or title behavior.To get this to a good state
Nothing is required.