feat(libSceGnmDriver): share mode-independent command writers #17711
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17711"
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 HenriksApsitis on 2026-11-09T11:47:08Z.
What
Make ten mode-independent command writers available from the normal
libSceGnmDriver, using the same implementation aslibSceGnmDriverForNeoMode.Related: #17581 (inFAMOUS Second Son, CUSA00223, bring-up #8214). Nine of these functions are among its 47 missing imports;
sceGnmUpdatePsShaderis the additional shared writer. This is a partial contribution, not a fix for the whole issue or a title-start claim. This PR does not claim to resolve the other reported blockers or establish title execution.0x1d). Each library keeps its own exported wrappers, so per-library source inventories remain correct. The normal wrappers use the established_nid_disambig1mechanism (as existing PosixForWebKit and Ajmi wrappers do), retaining the guest NIDs with distinct host symbols instead of violating the duplicate-export rule. Both pinned PS5 3.20 provider inventories list these ten names.The mode-independent reference is shadPS4 gnmdriver.cpp at a808e7626e3c7de8d0f0fda6a91f620b42f6c762, already used for the Neo implementation. Console packet equivalence remains unmeasured and is recorded in debt.
GuestGnmNeoShaders.cppis restored byte-for-byte to the pinned main version, as requested by @oneandonlydean.Tested
Current candidate:
b497248874b1b916802e001cc328a2b43b95c173; retains the integration of mainfa86dfcd3b0715edb4a0db2c552ae76a3df29111. This revision addresses @oneandonlydean's review by restoring HS acceptance/copy of 29 words and deferring the unmeasured 30-word packet discrepancy to debt. No console contract change is claimed.^(guest_gnm_|gnm_)tests.guest_gnm_neo_shadersand both shared-writer providers. No skips. Runs usedANYPS5_GPU='NVIDIA GeForce RTX 5070',ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer, and verbose CTest. Logs confirm NVIDIA selection and validation-layer insertion with noVUID-errors. Packet-only tests do not execute guest shaders.CommandWriters.hppmatches the original PR'sd20cbd0...helper bodies andGuestGnmNeoShaders.cppmatches pinned mainfa86dfcd3b...exactly. The safe guest-copy wrappers added during conflict resolution remain in both providers.python3 tools/check_conventions.py --base origin/mainandgit diff --check origin/main...HEADpassed against the committed candidate. Remote head and all six changed files were independently read back and byte-verified after pushing./home/hermes/work/anyps5-gnm-imports/logs/build-17711-hs-main-compat.log,ctest-17711-hs-main-compat.log,ctest-17711-hs-main-compat-committed.log. These are local evidence paths, not public attachments or repository files.Overlap:
python3 tools/pr_overlap.py --branch feat/gnm-shared-command-writers --head-repo HenriksApsitis/AnyPS5 --repo boykopovar/AnyPS5 --jobs 4 --base mainexamined 2,659 open PRs and compared 11 shared-file candidates. It exited 2, not clean: four branches conflict with main. Their live heads remain unchanged from the manual merge-base comparisons:fdc542d375e8df9bf9bf4ac1c141ff27fb9866c8: submission pacing, not these packet writers.9e142fb3703aa585df8a89cafb3b06f4fb895f68: compute/graphics ordering and CMake test registration.7133e14c341e4a2d01be7942fde546694b2949bf: flip-and-submit implementation/API and VideoOut test linkage.3aec109413b7a30a3db672cc09e90dd71dfb74f0: compiled-SDK-version access in Neo.None of these manually reviewed diffs duplicates the ten shared writer implementations or is required by them. That conclusion does not turn the automated exit 2 into a pass. The cross-library name/NID warnings are intentional normal-provider counterparts to Neo writers using host-name disambiguation. Full output is retained in
logs/overlap-17711-parent-final.log.Hosted CI on this new head is pending, not confirmed green. The preceding
c809b0ed...Windows run passed the GNM tests but failed onguest_icu_utf_conversionsandguest_relative_sleep_largetimeouts; it does not qualify this new head. This correction changes neither those timeouts nor test selection.Historical evidence only: the original contribution reproduced missing normal-provider linkage, and earlier raw/NID-patched dynamic-loader runs and public-header audits were performed on an earlier head. They have not been rerun as part of this qualification.
Not tested: console packet equivalence or the correct HS reservation/NOP length, Bloodborne, inFAMOUS or any other title, native Windows/macOS locally, or the complete runtime suite. Synthetic checks do not establish title compatibility.
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-21T06:16:35Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
d20cbd0eb3695d6c59e6a6a520a0ef40abf2c737. I read the prepared description, commits, manifest, diff, and all eight changed files included in the review folder. No commands or tests were run; runtime and build results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not independently run the tests, build, convention checks, or overlap checks described in the PR body. Console packet behavior and title compatibility remain unverified, as the author also notes. No changed files were excluded;
files.jsonwas not available as a review document, andlist_filesshowed all eight changed files as included.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T02:57:46Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the shared packet writers, provider wrappers, and HS reservation boundary check are consistent in the inspected code.
What I ran
Reviewed head
c809b0ed5e78ddc02ae4086fac8929d613fe9128. No commands or tests were run;repo_read.pywas unavailable as an executable in this read-only review environment. I read all nine changed files listed as included in the manifest through the pinned reader, along with the prepared description, commits, manifest, and diff. No files were excluded by rule in the manifest.Results
Findings
Blocking
None.
Non-blocking
Not verified
I did not run builds, tests, conventions, overlap checks, or console/title testing. I did not independently verify the author-reported CI or local logs. The manifest marks all nine changed files as included, and each was read;
files.jsonwas unavailable through the reader, so any additional rule-based exclusions are not verified.To get this to a good state
Nothing is required. Optional: rerun the hosted Windows suite to resolve the reported timeouts.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T08:02:31Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
b497248874b1b916802e001cc328a2b43b95c173from the prepared diff and reader-pinned source. No commands or tests were run; the test results in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
sceGnmUpdateHsShaderpreserves a 29-word accepted/copy extent while its final NOP declares a packet extent of 30 words. This can consume the following command as NOP payload. The PR documents the mismatch and defers changing behavior until console evidence is available (core/libs/prx/libSceGnmDriver/include/CommandWriters.hpp:122).Not verified
No tests were run in this review. Console packet equivalence, hosted CI on this head, and behavior outside the reviewed GNM writer paths were not verified. The description reports test runs, but these were not independently confirmed. Files read:
description.md,commits.md,manifest.json,diff.patch,core/libs/prx/libSceGnmDriver/CMakeLists.txt,core/libs/prx/libSceGnmDriver/Export.cpp,core/libs/prx/libSceGnmDriver/include/Api.hpp,core/libs/prx/libSceGnmDriver/include/CommandWriters.hpp,core/libs/prx/libSceGnmDriverForNeoMode/Export.cpp,core/libs/prx/libSceGnmDriverForNeoMode/include/Api.hpp,core/libs/tests/GuestGnmSharedWriters.cpp, anddocs/dev/debt/libSceGnmDriver.md. All nine changed files listed in the manifest were read;files.jsonwas not available through the reader.To get this to a good state
Nothing is required. Optional: retain the documented HS packet extent discrepancy as follow-up debt until console measurements support a separate behavior change.