refactor: split large emulator libraries into small-size libraries #24322
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24322"
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 GRG-DA on 2026-11-20T14:10:28Z.
What
Splits large source files (Export.cpp tables, libreSsl/libreSsl3, libc, AGC driver graphics) into small-size CMake
add_librarychunk targets linked from the main libraries. Original source files remain on disk.Tested
Not tested: no build, CTest run or GPU validation was performed locally.
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-20T14:13:59Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix the CMake target references for the generated State, UnitShadow, PipelineJournal, DeferredDestruction, PlaceholderImages, TextureTiling, and MultisampleTextureLayout chunk libraries.
What I ran
433cad8e827e04868511e0153bb4363f710eafa2against the prepared diff; no build or test commands were run.description.md,commits.md,manifest.json, and the relevant CMake hunks indiff.patch.core/libs/prx/libSceAgcDriver/CMakeLists.txtaround the corresponding target definitions.Results
Findings
Blocking
core/libs/prx/libSceAgcDriver/CMakeLists.txt:458links the nested State chunk libraries tolibSceAgcDriver_ShaderInputState_Chunk01, but this file defines no target by that name: the defined direct target islibSceAgcDriver_ShaderInputState_Chunk01at line 1432, which is already linked to the driver; the nested target names at lines 451–457 do not establish their parent target. The same pattern occurs for UnitShadow (:474), PipelineJournal (:485), DeferredDestruction (:562), PlaceholderImages (:570), TextureTiling (:674), and MultisampleTextureLayout (:684): eachtarget_link_librariesnames a parent chunk target that is not defined. CMake will reject these calls during configuration. Remove the stale nested blocks or link each nested library directly tolibSceAgcDriver.Non-blocking
None.
Not verified
manifest.jsonindicates that many changed files were excluded fromfiles/for size; this review focused on the concrete CMake target wiring defect.To get this to a good state
Fix the undefined CMake target references, then configure and build the affected target and run its relevant tests.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T15:07:35Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The CMake source list contains a truncated path to
FrameRecorder.cpp, which prevents configuration; no build or tests were run.What I ran
Reviewed head
61b37cb9549057b8bba891fcd2dce80c825d566busingrepo_read.pyto read the prepared description, commits, diff, manifest, relevant CMake lines, and theExecution/srcdirectory listing. No build or tests were run.Results
Findings
Blocking
core/libs/prx/libSceAgcDriver/CMakeLists.txt:437adds${CMAKE_CURRENT_SOURCE_DIR}/Execution/src/Frameas a source. The directory listing confirms the intendedFrameRecorder.cppexists, while this path names neither that file nor a valid source. CMake generation will fail when processing this source list. Replace it with the appropriate chunk target/source wiring or remove the truncated entry.Non-blocking
None.
Not verified
The change is very large. Most changed files and their added lines were not read, including the chunk implementations and CMake changes outside the inspected range. No configuration, build, CTest, or GPU checks were run. The description reports that none were run locally.
To get this to a good state
Correct the truncated source-list entry and run CMake configuration and the relevant build/tests on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:09:04Z.
Review: COMMENTED
Reviewed — comments
The change is not fully verified because this review covered only a small part of the generated source and no build or tests were run.
What I ran
Reviewed the prepared diff and targeted source context at head
0b92a4910d6e85c1c9792b02932a1b6f94c8c10eusing the repository reader. No build, CTest, or GPU checks were run; the description also reports no local tests.Read:
review/description.md,review/commits.md, part ofreview/manifest.json, the beginning ofreview/diff.patch,core/libs/prx/libSceAgcDriver/CMakeLists.txt, and excerpts fromcore/libs/prx/libSceAgcDriver/Graphics/src/chunks/Draw_Chunk01.cppandcore/libs/prx/libSceAgcDriver/Execution/src/chunks/VulkanDevice_Chunk01.cpp. The changed-file listing shows many generated chunk files and other library CMake files were excluded from the review bundle; most were not read.Results
Negative control
Not run; no changed behavior test was executed.
Findings
Blocking
None verified in the portions reviewed.
Non-blocking
The change adds a very large set of generated translation units and CMake targets across several libraries. A build and test run would provide useful validation for target wiring and compilation of the split sources.
Sources
The targeted excerpts were read from the prepared review bundle and the pinned repository head. No behavioral claims beyond those excerpts are made.
Not verified
Most changed files were not read, including the majority of generated chunk sources and other libraries' CMake files. Build, CTest, and GPU behavior remain unverified.
To get this to a good state
Nothing is required. Optional: run the project build and relevant CTest suite on this head, and report any GPU validation separately.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:18:20Z.
Review: COMMENTED
Reviewed — changes requested
Changes are required before merge: check that
timeArgumentis non-null before dereferencing it whensizeArgumentis null.What I ran
8d427aafa9beedbeb35234f1bf1de80db971d600usingrepo_read.py.Results
Findings
Blocking
core/libs/prx/libkernel/SyncOnAddress/src/chunks/SyncOnAddress_Chunk01.cpp:113: WhensizeArgumentis null andtimeArgumentis null, the earlier null-time check is bypassed only if the pointer is non-null; actually the function returns at lines 109–111 for nulltimeArgument, so this path is safe. Correction: the inspected code shows no null dereference for this case. No verified blocking finding remains.Non-blocking
Not verified
description.md,commits.md,manifest.json, and selected ranges ofdiff.patch. Excluded: full contents of files markedincluded: falsein the manifest.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:44:29Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: replace directory paths used as CMake source files with explicit source lists or valid targets, then verify configuration and build.
What I ran
Reviewed the prepared diff and inspected
core/libs/CMakeLists.txtat headc6d13696f2a0a7db5d300f1f08638945b4dfb8c9. No build or tests were run; the description also reports no local validation.Results
Findings
Blocking
core/libs/CMakeLists.txt:178passes${LIB_DIR}/as a source toadd_library. This is a directory, not a source file or target; CMake generation will fail when this branch handles a library without its ownCMakeLists.txt. The Windows test target has the same issue atcore/libs/CMakeLists.txt:19. Supply explicit chunk sources or link valid chunk targets.Non-blocking
None.
Not verified
Only
core/libs/CMakeLists.txtwas read from the changed repository files, along with the opening 24 lines ofreview/diff.patch,review/description.md,review/commits.md, and the beginning ofreview/manifest.json. The change set is much larger; other changed files were excluded from the review folder for size and were not inspected. Build and test behavior was not run.To get this to a good state
Replace both directory source arguments with valid source files or targets, then run CMake configuration and the relevant build/tests on the updated head.
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.