fix(libSceGnmDriver): report type-0 packets and optionally wait at each submission #9676
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9676"
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 ntamas94 on 2026-10-22T07:45:12Z.
What
Two changes to the Gnm command-buffer path, found while bringing up Gang Beasts (CUSA04865, Unity, my own dump). Each commit stands alone.
Type-0 and type-1 packets in a command buffer. The Gnm lowering threw on any packet that was not type 3 with no more than the stream name; #9432 now drops type-2 filler. A type-0 packet (a register write by base index and count) or a type-1 packet now throws with its type, header and dword position. Neither is applied or skipped: a type-0 payload carries register state, and no title has shown what it carries here, so stepping over it would drop that state without a trace (Get-fix's and MarcZX10's question on the earlier version, which skipped it). Gang Beasts produces a header dword of 1 itself: it binds a 16-byte V# over an 8-byte
allocateFromCommandBufferblock, and its compute dispatch stores 1 at offset 8, which is the next packet's header. With the queue several milliseconds behind, that store lands after the title has rebuilt the buffer for the next frame (traced with a watch on that dword and timestamps on submits and dispatches). The title therefore needsAPS5_GNM_SUBMIT_WAIT_IDLE=1(2); with it the store lands before the rebuild and the throw does not fire. The error itself does not name that case, since a dword of 1 is also a valid type-0 write; the debt entry explains it.APS5_GNM_SUBMIT_WAIT_IDLE=1. EachsceGnmSubmitCommandBuffersandsceGnmSubmitAndFlipCommandBuffersafter the first waits for the work already queued, so the GPU trails the title by at most one submission. Without it, Gang Beasts' rebuilds of command buffers and descriptor tables race with work that has not run yet. Besides (1), this shows up as draws whose S# slot holds T# words, a V# slot holding an S#, and a sampler descriptor that reads as unnormalized with clamp mode 7. With the knob, runs of up to ten minutes through the menus, character select, loading and a full match had none of these, with no change in the menu frame rate (vsync-bound, 59.94 FPS). It is off by default, because a submission whose packets wait on a label the title writes only after a later submission would never finish. The wait is gated on work having been queued, not on the per-frame flag thatsceGnmSubmitDoneclears, so the first submission of a frame waits for the previous frame's work too (MarcZX10's review found the earlier gate skipped exactly that submission).APS5_SYNC_FLIP=1also removed the packet clobber in three menu runs. The knob has a row indocs/dev/ENVIRONMENT.md, and the debt file oflibSceGnmDriverdescribes both changes.This moves the Gnm commits of Get-fix/AnyPS5#3 (opened against
ps4/limbo-gpu) tomainon top of #9432, as Get-fix asked there. #9431 and #9432 are merged, and the branch has currentmainmerged in, so its diff againstmainis this PR's own change: the packet-type error, the submission wait,tests/Submit.cpp,include/CommandStream.hppand the debt and environment entries. #9432 landed with thelibSceGnmDriver.hppumbrella this branch had added, so this branch now usesmain's.Tested
Windows 11 Pro (10.0.26200), WinLibs GCC, NVIDIA GeForce RTX 2080 (driver 617.14), Release build with
BUILD_TESTING=ON, on this branch with currentmain(921621976c) merged in; #9431 and #9432 are merged:gnm_driver_packets(new, no GPU) walks a draw and a constant stream throughMergeEngines: type-2 filler is dropped from both streams and the NOPs come out unchanged; a type-1 header throws withtype 1,0x40000000,dword 2 of 4; a truncated type-3 packet throws. #9432'sguest_gnm_driver, whosetypeZerocase expects the throw, still passes.gnm_driver_submit_wait(new, GPU) submits a first frame whose work waits on a label the CPU writes, callssceGnmSubmitDone, then submits the next frame from another thread withAPS5_GNM_SUBMIT_WAIT_IDLEset: that call must still be blocked 500 ms later, return once the label is written, and find the first frame's work done. With the wait gated on the per-frame flag it fails (the first submission of the next frame did not wait for the work queued before sceGnmSubmitDone).gnm_driver_packets,gnm_driver_submit_wait,guest_gnm_driverand the 27video_out_flip_*tests pass on the merge head, three runs each;public_headersand its 64 compile batches pass.public_headersand its 64 compile batches pass.tools/check_test_registration.py build: both tests registered.APS5_GNM_SUBMIT_WAIT_IDLE=1: the menu, character select, a level (Wheel) with correct lighting and physics, the end of the match and the return to character select.tools/check_conventions.py --base main(921621976c) with this title and description: no findings.main921621976c(100% tests passed out of 24, the depth, display-buffer and graphics tests of this stack;mainhas neitherlibSceGnmDrivernor these tests) and this branch with thatmainmerged in (100% tests passed out of 3:gnm_driver_packets,gnm_driver_submit_wait,guest_gnm_driver) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andVK_LOADER_DEBUG=warn,error,ctest -V, on the NVIDIA GeForce RTX 2080, driver 617.14, Windows 11 (10.0.26200), Vulkan SDK 1.4.363.0: both logs carry the loader'sadding layers "VK_LAYER_KHRONOS_validation"line (60 and 2 times) and neither reportswas not found but was requested by env var VK_INSTANCE_LAYERS;VUID-ids onmain: 0, on this branch: 0, new on this branch: 0.Linux was not run locally.
Checklist
main; no other open PR implements the same functions (currentmain921621976cmerged in; searched open boykopovar/AnyPS5 PRs for Gnm packet types and submission waits on 2026-10-22)NotImplemented_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 fogydes on 2026-10-22T08:54:09Z.
Verified against the branch:
PacketAtdecodes the count field exactly as the driver's ownHeader()writes it (body dwords in bits [29:16] ascount - 1, sototal = ((header >> 16) & 0x3fff) + 2for type 0 and the shared type 3 path,total = 1for type 2, and an explicit throw for type 1 carrying header, dword index and stream length), the advance happens before the type-0continueso no step can be skipped or looped, and the truncation check dominates the payload walk. The wait reusesAgcDriverWaitIdle_nid_postfixunderg_submitMutexafter the first submission, gated behind a documented-as-presence env knob with the right entry indocs/dev/ENVIRONMENT.md. That's a real portability improvement over the bare type-1 message and gets type-0 payloads out of the parser's way like the Linux radeon walker the debt entry cites.The gap I'd want addressed before merge: the total-test count for this PR is zero and stays zero —
libSceGnmDriverhas no test target at all (noadd_test, no test sources in its CMakeLists), and the body acknowledges the claimed behavior is validated only by Gang Beasts runs. Every branch added here is host-testable without a GPU:PacketAt's four outcomes (type 0 step, type 2 step, type 1 throw, truncation throw), the CE/DE counter handling stepping, and the first-vs-subsequent wait gate includingg_frameStartedreset which makes the first submission of the next frame not wait — the "GPU trails by at most one submission" promise has a hole at exactly that frame boundary (previous frame's work can still be queued when SubmitDone resets the flag), and the debt entry describes the promise without the exception. Repo pattern exists (Guest*/agc_driver_*targets); a smalltest(…)addition forcing type 0/2 packets throughsceGnmSubmitCommandBufferswould pin the walk that this PR is really about.Minor: the PR contains two topics (the packet-walk fix and the wait knob) in one PR with both checklist topics ticked; the body discloses the pairing, but two commits being separable is the usual signal to land the
fixfirst and thefeatbehind it.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T08:55:53Z.
Review: CHANGES_REQUESTED
I independently checked the submission-wait path and confirmed a correctness gap in the new
APS5_GNM_SUBMIT_WAIT_IDLEbehavior.SubmitLockedwaits only wheng_frameStartedis true (line 233), butsceGnmSubmitDoneresets it to false without waiting (line 451). Therefore the first submission after everysceGnmSubmitDonebypasses the wait; if the title submits only once per frame, no submission ever takes the wait path and queued work can accumulate across frames. This contradicts the stated bounded-lag behavior and leaves the descriptor/command-buffer reuse race possible. Please track whether any work is outstanding independently of the per-frame initialization flag, wait before a new frame’s first submission when prior work remains, and add a focused regression for submit → submit-done → next-frame submit. The existing detailed comment on this PR also notes that the packet walker and pacing change currently have no automated tests; the new path needs coverage beyond the reported title run.The branch is also currently
CONFLICTINGwithmain; #9432, which this PR depends on, is itself conflicting. Please coordinate/rebase after resolving the dependency and rerun checks on the resulting merge commit. Existing CI shown here has conventions/intake/labels only; no product or relinker build is reported. The author’s Gang Beasts testing is useful evidence, but it does not cover the frame-boundary case above.Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-10-22T10:13:57Z.
Thanks, both of you. The frame-boundary gap is real and is fixed on the branch: the wait is now gated on work having been queued (
g_workQueued, set after every submission and left alone bysceGnmSubmitDone) instead of the per-frame flag, so the first submission of a frame waits for the previous frame's work as well.Tests, both registered:
gnm_driver_packets(no GPU) walks a draw and a constant stream throughMergeEnginesand checks a type-2 dword, a type-0 packet whose data looks like an EVENT_WRITE_EOP header, the type-1 throw with header and position, and truncated type-3 and type-0 packets;gnm_driver_submit_wait(GPU) gates a first frame's work on a label the CPU writes, callssceGnmSubmitDone, submits the next frame from another thread and checks that the call is still blocked 500 ms later and returns only once that work has run. Each fails with its part of the change reverted.PacketAtandMergeEnginesmoved into a header for that; no behaviour change there.On the two topics: I kept them in one PR because the title needs both and the second commit carries the knob only; if you prefer, I can split the
fixinto its own PR and base thefeaton it.The branch conflicts with
mainthrough #9432 and #9431 (Graphics/src/State.cpp); I will rebase once Get-fix has rebased them. Paired validation-layer run, now in the description:main(100% tests passed, main build7e2ba73e4) and this branch (100% tests passed) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andVK_LOADER_DEBUG=warn,error,ctest -V, on the NVIDIA GeForce RTX 2080, driver 617.14, Windows 11 (10.0.26200), Vulkan SDK 1.4.363.0: both logs carry the loader'sadding layers "VK_LAYER_KHRONOS_validation"line (78 and 2 times) and neither reportswas not found but was requested by env var VK_INSTANCE_LAYERS;VUID-ids onmain: 0, on this branch: 0, new on this branch: 0.AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-22T11:06:55Z.
@ntamas94 a heads-up so this doesn't surprise you. On #9432, MarcZX10 asked for type-2 filler packets to be accepted, with tests. #9432 now drops them in both streams (
057384487), and since your 197594cfe did that first, I added you as co-author. #9430 to #9432 were also rebased ontomain7e2ba73e4. When you rebase this PR onto the new #9432 head, the type-2 half of 197594cfe is already there.One question on the other half: a type-0 packet writes registers (base index plus count), so stepping over it drops that state without a trace. Could it throw with its header instead, or be applied, until a title shows what it carries?
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:29:25Z.
Review: CHANGES_REQUESTED
The latest head addresses my prior frame-boundary finding:
g_workQueuedsurvivessceGnmSubmitDone, and the new submit-wait regression covers the next frame's first submission. The added tests are a useful improvement, and the body now reports paired validation-layer runs with no VUIDs on either side. I also rangit diff --checksuccessfully. I did not run the C++ tests locally because this checkout has no configured build tree and the filesystem has no free space.One correctness question remains in the type-0 handling.
PacketAtnow determines the packet length andMergeEnginesskips the whole packet. A type-0 packet carries register writes, so skipping it also drops those writes and can change the state seen by following type-3 commands. Please either apply the supported type-0 register writes, or reject unsupported type-0 packets with header/position context until the affected behavior is understood. Add a regression demonstrating the chosen behavior for register writes and following commands.This branch is still stacked over open #9431/#9432 and the current merge-tree conflicts with main in
libSceAgcDriver/CMakeLists.txt. The title test described in this PR was run on the earlier Get-fix bring-up branch, not against current main. Please coordinate/rebase the dependency stack and verify the CUSA04865 stop on current main with a log before treating the title-specific checklist as satisfied.I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.
Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-10-22T13:22:00Z.
Rebased onto #9432's new head (
f2928f44d, onmain7e2ba73e4); thanks for the heads-up, Get-fix, and for the co-author line. #9432 now drops the type-2 filler, so what remained of the first commit here is the type-0 half, and both of you are right that skipping a register write drops state without a trace. It no longer skips: a type-0 packet, like a type-1 one, throws with its type, header and dword position, and a header dword of 1 names the case Gang Beasts produces (a title store that landed on a rebuilt buffer;APS5_GNM_SUBMIT_WAIT_IDLE=1keeps the queue ahead of it, so with the knob the throw does not fire). Applying type-0 writes waits until a title shows what one carries; the debt entry says so. The conflicts were inPacketAt, the twoMergeEnginesloops, the test CMake block and the debt file; the resolution keeps #9432'sIsFiller, itsCheckSubmissionrules and itsguest_gnm_drivertest, whosetypeZerocase is unchanged and passes.gnm_driver_packetsnow checks the type-0 throw with its header and position, the header-of-1 message and the type-1 throw; it andgnm_driver_submit_waitpass on the new base. The title and description say "report type-0 packets" now. Paired validation-layer run, now in the description:main(100% tests passed, main build7e2ba73e4) and this branch (100% tests passed out of 3) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andVK_LOADER_DEBUG=warn,error,ctest -V, on the NVIDIA GeForce RTX 2080, driver 617.14, Windows 11 (10.0.26200), Vulkan SDK 1.4.363.0: both logs carry the loader'sadding layers "VK_LAYER_KHRONOS_validation"line (78 and 2 times) and neither reportswas not found but was requested by env var VK_INSTANCE_LAYERS;VUID-ids onmain: 0, on this branch: 0, new on this branch: 0. The Gang Beasts run reported so far is from the Get-fix bring-up branch; a run of the title on this stack over currentmain, with its log, follows separately.AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T04:54:32Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The PR's own Gnm changes do what the description says, and the new tests pass and catch a revert of each part; but the head conflicts with
mainthrough its #9431/#9432 base, does not compile on Linux as it stands, and its test adds export declarations that currentmainrejects.What I ran
004c63b5015eefec18ee76552cc8550bb68e1976main:52c09d567d2fa453494dd720fcf53a98149468e4f2928f44d427ff146e00b80683785feabdb5a16e; #9431's current head iseefa50841267cd0bd5352af17248139445fb0613and is not an ancestor of this PR.All of this ran in a clean worktree. The merge with
mainconflicted, so the build and tests ran on the PR head itself, with the local two-line assert change described under Blocking 2.Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08).
Results
mainGraphics/include/GuestTextureResource.hpp,Graphics/include/State.hpp,Graphics/src/DepthSurface.cpp,Graphics/src/State.cpp(all undercore/libs/prx/libSceAgcDriver),docs/dev/debt/libSceVideoOut.md. All of them come from the #9431/#9432 commits; this PR's own six files merge cleanly.git diff --checkcheck_conventions.py --base origin/main(with and without title/body)All conventions checks passed.static_asserts inPipelineJournal.cppgnm_driver_packetsgnm_driver_submit_wait(NVIDIA, validation layer)guest_gnm_driver(from #9432)env var 'VK_INSTANCE_LAYERS' defined and adding layers "VK_LAYER_KHRONOS_validation", inserted as instance and device layer)was not found but was requested by env var VK_INSTANCE_LAYERSVUID-linesmainmainhas nolibSceGnmDriverand none of these testsBuild failure on the PR head
(translated from the French compiler locale)
ctest excerpt
Negative control
The tests call
GnmDriver::PacketAt/MergeEngines, which only exist with this change, so restoringExport.cppwholesale would not link. I reverted each behaviour incore/libs/prx/libSceGnmDriver/Export.cppseparately and rebuilt each time:gnm_driver_packetsgnm_driver_submit_waitif (waitIdle && g_workQueued) AgcDriverWaitIdle_nid_postfix();the first submission of the next frame did not wait for the work queued before sceGnmSubmitDoneg_frameStarted(the earlier version MarcZX10 reviewed)unsupported PM4 packet type in the <stream>throwa type-0 packet did not throw with its header and position: GnmDriver: unsupported PM4 packet type in the draw command bufferEach test fails when its own part is reverted and passes otherwise. This confirms on Linux/NVIDIA that MarcZX10's frame-boundary finding is fixed on this head. After the controls I restored the PR file and rebuilt.
Findings
Blocking
Conflicts with
main. The merge stops in the five files listed above. All of them come from the stacked #9431/#9432 commits, so the author's comment that this PR adds no conflict of its own holds. Still, the branch cannot merge as it stands. #9431 has been rebased since (eefa508, nowMERGEABLE), and this PR is still stacked on its older head9437229e21. Fix: rebase onto #9432 once #9432 is rebased onto #9431's current head, then rerun the tests on the merge withmain.The PR head does not compile on Linux x86-64 with libstdc++.
PipelineJournal.cpp:38-39still assertssizeof(State) == 784andsizeof(ShaderStages) == 112. The old #9431 commit in this stack addsbool legacyVertextoShaderStages(State.hpp:35), which makes them 792 and 116. The asserts are guarded by__linux__ && __x86_64__ && __GLIBCXX__, which is why the Windows-only testing in the description did not hit them. #9431's current head has updated asserts, so the rebase in (1) should clear this. Until then, this head's Linux CI build would fail before reaching the Gnm code. "Linux was not run locally" is accurate, but this is the consequence. For this review I changed the two numbers locally to build and test the Gnm code. That change is not part of the PR.tests/Submit.cppre-declares two exports, which currentmainforbids.Submit.cpp:23-24declaresextern "C" int APS5_VABI sceGnmSubmitCommandBuffers(...)andsceGnmSubmitDone()locally. CONTRIBUTING.md:6 onmainrequires exactly one declaration of eachAPS5_VABIexport, in a header reachable from the library's<library>.hpp. It forbids duplicates in tests, and thepublic_headerstest enforces this. The PR's base predates that rule, so the conventions check passes here. After a rebase, these two lines (and #9432's identical declarations incore/libs/tests/GuestGnmDriver.cpp) will failpublic_headerswithexpected exactly one header declaration. Fix: declare the Gnm exports in acore/libs/prx/libSceGnmDriver/libSceGnmDriver.hppumbrella, probably in #9432, and include it fromSubmit.cppinstead of declaring them.Non-blocking
header == 1uhint diagnoses one title's cause for every title.Export.cpp:143-148appends "a title store that landed on a rebuilt buffer; APS5_GNM_SUBMIT_WAIT_IDLE=1 keeps the queue ahead of it" whenever the header dword is exactly 1. That cause and that value come from the Gang Beasts trace. In general, a header of 1 is just a type-0 write of one dword at register index 1, and for another title the message would send the reader to the wrong knob. The behaviour is the same throw for every input, but AGENTS.md says not to special-case a value seen in one title's trace. Suggest dropping the suffix and keeping the type, header and position, which already identify the packet. The debt entry can keep the explanation. If the hint stays, theheader == 1expectation ingnm_driver_packetsgoes with it.g_submitMutex.Export.cpp:255-258:AgcDriverWaitIdle_nid_postfix()blockssceGnmSubmitDoneand every other submitting thread until the queue is idle. A label written by a thread that first takes that mutex would hang, which is the same class of hang the debt entry describes for labels written after a later submission. It is off by default and documented, so this is a note, not a request. A sentence in the "Submission pacing" entry that other submitting threads are blocked during the wait would cover it.Submit.cppstill asserts the type-0 throws, anddocs/dev/debt/libSceGnmDriver.md:15-16still names Gang Beasts. I have nothing to add beyond noting that they are unaddressed.Not verified
main: it conflicts, so build, tests and conventions ran on the PR head only.public_headerswas not run on this tree, because the PR's base predates the umbrella headers and the whole tree fails that test. Blocking 3 is from reading main's test againstSubmit.cpp.mainrun:mainhas neitherlibSceGnmDrivernor these tests.sceGnmSubmitAndFlipCommandBufferswith the knob (the test only coverssceGnmSubmitCommandBuffers).To get this to a good state
eefa508) andmain. Confirm that the Linux build passes (PipelineJournal.cppasserts) and that the merge withmainis clean.APS5_VABIdeclarations out oftests/Submit.cppinto the library's umbrella header, and runpublic_headerson the rebased tree.gnm_driver_packets,gnm_driver_submit_waitandguest_gnm_driverwith the validation layer on the rebased merge.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:06:29Z.
Review: DISMISSED
Re-check — changes requested\n\nI checked the current head
4765688e1d. It now rejects type-0 packets in PacketAt with packet type, header, stream and dword position; it does not silently skip register writes. I withdraw my earlier finding that MergeEngines drops type-0 writes. Removing tests that pin a valid-but-unimplemented type-0 packet to a throw is consistent with the repository test policy, so please do not restore those assertions.\n\nThe remaining integration blocker is that this branch is still based on main snapshot830ccd121f, while current main isaaccd0ba39(the head is over 7,000 commits behind). The title evidence and GPU validation in the description are also from the older bring-up stack. Please restack on current main while preserving the #9432 dependency and the separately scoped packet/reporting and submit-wait commits, then rerun gnm_driver_packets, gnm_driver_submit_wait and the focused Vulkan validation suite. Repeat the CUSA04865 run on the resulting dependency stack if the Unblocks checklist remains. The exact-head new change to tests/debt does not supply current-base integration evidence. I did not run these tests locally.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T10:22:17Z.
Review: CHANGES_REQUESTED
Re-checked — changes still requested
The branch now has current
mainmerged in and merges cleanly, the title-specific hint and the type-0 test cases are gone, and the tests pass on the merge withmain. But commit003df54167also moves SPIRV-Tools and SPIRV-Headers back to their older revisions, andpublic_headersstill fails.What changed since my last review
4765688e1dremoves the two type-0 expectations and theType0helper fromtests/Submit.cpp, and replaces the game names indocs/dev/debt/libSceGnmDriver.mdwith CUSA04865.ad5892ec31and358a6ddcd3mergemain(aaccd0ba39, thenf7e84c4cf1) into the branch. #9431's old commits now matchmain.003df54167drops theheader == 1usuffix from the packet type error and adds a sentence about the submission lock to the "Submission pacing" debt entry. The same commit also changes the3rdparty/SPIRV-Headersand3rdparty/SPIRV-Toolspointers (New finding 1).public_headersstate and the removed type-0 cases.4765688e1dand asked for a restack on currentmain. The merges answer the base part of that request.What I ran
358a6ddcd33876169b7815d3c13df98c12b8a22emain:89dce2838dfc7bd7c785ffd14e4e6aaf81bf8bc193a4557b24c35ebbf91fe53ce77240f118b729e1(clean merge)All commands ran in a clean worktree. Builds and tests ran in a sandbox without network. Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08).
Results
maingit diff --checkcheck_conventions.py --base origin/mainAll conventions checks passed.main262bdab481(v2025.5) →7f2d9ee926(v2025.4); SPIRV-Headersb824a462d4→01e0577914libs(merged tree, Linux x86-64 GCC)gnm_driver_packetsguest_gnm_drivergnm_driver_submit_wait(NVIDIA, validation layer)video_out_flip_ps4offscreendriver has no Vulkanadding layers "VK_LAYER_KHRONOS_validation"twicewas not found but was requested by env var VK_INSTANCE_LAYERSVUID-linespublic_headers, merged treepublic_headers,mainmainmainhas nolibSceGnmDriverand none of these testspublic_headers on the merged tree
Submodule change in
003df54167ctest excerpt (merged tree)
Negative control
Since my last review the tests only lost cases, so I redid the controls on the merge with
main. Each time I reverted one behaviour incore/libs/prx/libSceGnmDriver/Export.cpp, rebuilt, ran the tests, and then restored the file and rebuilt:gnm_driver_packetsgnm_driver_submit_waitif (waitIdle && g_workQueued) AgcDriverWaitIdle_nid_postfix();the first submission of the next frame did not wait for the work queued before sceGnmSubmitDonea type-1 packet did not throw with its header and positionPrevious findings
main): Resolved. The merge withmain89dce2838dis clean.PipelineJournal.cppasserts on Linux): Resolved.libsand the test targets build on Linux x86-64 GCC from the merged tree.public_headers): Still open.Submit.cpp:23-24still declares the two exports. On the merged treepublic_headersfails earlier than that, with the missing-umbrella check, while it passes onmain. I agree with the author that the header belongs in #9432. But this branch carries #9432's commits, and merging it as it stands would breakpublic_headersonmain. It stays blocking until #9432 adds the umbrella and this PR includes it.003df54167.Export.cpp:143-146now reports only the type, header and position.g_submitMutex): Resolved. The "Submission pacing" entry now ends with "The wait holds the submission lock, so a label written by another thread after it takes that lock hangs the same way."4765688e1d. Both type-0 cases are gone, and the debt file uses CUSA04865 instead of the game names.New findings
Blocking
003df54167moves SPIRV-Tools from v2025.5 back to v2025.4 and SPIRV-Headers back to01e0577914. The commit's subject only describes the error message, but it also changes both submodule pointers. The values match the pre-merge branch, which suggests stale submodule checkouts were committed along with the fix.358a6ddcd3keeps these values, so the PR's diff againstmaindowngrades both dependencies.mainfixed this same accident in03bc1d1aa6("#6134 moved both submodules back to v2025.4 and 01e057791 by accident, which undid #5319"). Fix: set both pointers back tomain's revisions, for examplegit checkout origin/main -- 3rdparty/SPIRV-Headers 3rdparty/SPIRV-Toolsfollowed by a commit, and rungit submodule updatebefore the nextgit commit -a.git diff origin/main... -- 3rdpartyshould then be empty.Non-blocking
sceVideoOutRegisterBuffersdebt entry is stale on this branch.libSceVideoOut.md:29still says the function "accepts only linear A8R8G8B8_SRGB (0x80000000) and A8B8G8R8_SRGB (0x80002200) buffers without options; tiled PS4 buffers throw". With #9432's commits,Buffer.cppaccepts tiling mode 0 and pixel format0x88000000, and the new "PS4 tiled display buffers" entry on line 31 describes that. This comes from #9432 rather than this PR's own commits, so the fix belongs there: update line 29 to match.Not verified
video_out_flip_ps4(changed by #9432's commits) was skipped, because the sandbox has no display with Vulkan.main:mainhas neitherlibSceGnmDrivernor these tests.main's v2025.5 checkouts.sceGnmSubmitAndFlipCommandBufferswith the knob.To get this to a good state
3rdparty/SPIRV-Headersand3rdparty/SPIRV-Toolstomain's revisions (New Blocking 1).libSceGnmDriver.hppumbrella in #9432, move the two declarations intests/Submit.cppto an include of it, and confirm thatpublic_headerspasses on the merge withmain.sceVideoOutRegisterBuffersentry in #9432.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T15:09:28Z.
Review: CHANGES_REQUESTED
Re-checked — changes still requested
The only new commit,
dc047ce8b7, mergesmainbb04a4f1ea, and the PR's own diff againstmainis unchanged by it. The focused tests pass again on the merge withmain, and the submodule finding no longer applies, butpublic_headersstill fails.What changed since my last review
dc047ce8b7mergesmainbb04a4f1ea. I comparedgit diff 89dce2838d...358a6ddcd3 -- core docswithgit diff origin/main...dc047ce8b7 -- core docs, and their added and removed lines are identical. The author resolved the conflict indocs/dev/debt/libSceVideoOut.mdby keeping both entries; they are lines 31 and 32 at the new head.git diff origin/main...dc047ce8b7 -- 3rdpartyis now empty. See Previous finding "New Blocking 1" below for why.358a6ddcd3reports one new failure,public_headers, which matches my Blocking 3.What I ran
dc047ce8b7fa061348d510749ec1d320991bdff8main:bb04a4f1ea0175e9e4f149f0359a764d62ff3296153a331d55397640138d29b855214fd65c614d71(clean merge)All commands ran in a clean worktree, and builds and tests ran in a sandbox without network. Submodules were checked out at
main's previous revisions (SPIRV-Tools262bdab481, SPIRV-Headersb824a462d4). Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08).Results
maingit diff --checkcheck_conventions.py --base origin/mainAll conventions checks passed.mainlibsand the three test targetsgnm_driver_packetsguest_gnm_drivergnm_driver_submit_wait(NVIDIA, validation layer)video_out_flip_decodevideo_out_flip_*testsoffscreendriver has no Vulkanwas not found but was requested by env var VK_INSTANCE_LAYERS/VUID-linespublic_headers, merged treepublic_headers,mainctest excerpt (merged tree)
Negative control: I did not rerun it. The PR's test and production changes are the same as at
358a6ddcd3, where reverting the wait and the type-1 throw each made its test fail.Previous findings
public_headers/ local export declarations): Still open. #9432 (headf2928f44d4) still has nolibSceGnmDriver.hpp.Submit.cpp:23-24still declares the two exports locally. On the merge withmain,public_headersfails at the missing-umbrella check, while onmainit passes.mainitself now points at the same revisions (SPIRV-Tools7f2d9ee926, SPIRV-Headers01e0577914). That came from0a07101649, merged with #10437, so the PR's diff againstmainno longer touches3rdparty. Fixing that belongs onmain, not here.sceVideoOutRegisterBuffersentry): Still open. It is still line 29 ofdocs/dev/debt/libSceVideoOut.mdat the new head, and it comes from #9432's commits.358a6ddcd3and are unchanged.New findings
Blocking
None.
Non-blocking
None.
Not verified
video_out_flip_*tests, whichmain'sBuffer.cppandFlip.cppchanges touch next to #9432's: they skipped here for lack of a Vulkan-capable display. The author reports that all 17 pass on Windows.main:mainhas neitherlibSceGnmDrivernor these tests.sceGnmSubmitAndFlipCommandBufferswith the knob, and the CUSA04865 results.To get this to a good state
libSceGnmDriver.hppumbrella in #9432, replace the two declarations intests/Submit.cppwith an include of it, and confirm thatpublic_headerspasses on the merge withmain.sceVideoOutRegisterBuffersentry in #9432.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:54:41Z.
Review: APPROVED
Re-checked — approved
The new commits add the
libSceGnmDriver.hppumbrella header (108fd28b0e) and update the stale PS4sceVideoOutRegisterBuffersdebt entry (a8d92e97a3), andmainwas merged three more times. With these changespublic_headerspasses, and both open findings from my last review are resolved.What changed since my last review
108fd28b0e: addscore/libs/prx/libSceGnmDriver/libSceGnmDriver.hpp, which includesinclude/Api.hpp(45APS5_VABIdeclarations, matching the 45 definitions inExport.cpp) andinclude/CommandStream.hpp.tests/Submit.cppandcore/libs/tests/GuestGnmDriver.cppnow include the umbrella instead of declaring exports themselves.sceVideoOutCursorSetHotSpotis now declared inVideoOut.hpp:14. Its definition still callsNotImplemented_nid_no_patch.a8d92e97a3: the PS4sceVideoOutRegisterBuffersentry (libSceVideoOut.md line 31 at head) no longer says that tiled PS4 buffers throw. It now refers to the "PS4 tiled display buffers" entry.103ea478ad,eda2cd6a7e,3a8380c116: merges ofmain. In the range-diff, commits 1–12 are unchanged.What I ran
PR head
3a8380c116f7d427377c76590947b75f51b3a82a,main5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged tree39b8476ffbbde39c8fcbc9df3dd31dc2b81a5421. Debian 13 VM, GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19), no GPU.git diff --checkcheck_conventions.pyAll conventions checks passed.libspublic_headersgnm_driver_packets,guest_gnm_driver,gnm_driver_submit_wait(lavapipe)video_out_flip_decodevideo_out_flip_*were skipped (no Vulkan-capable display in the sandbox)VUID-agc_driver_image_sample_lod_clamp_shader_lanelibSceAgcDriver,core/shaderortools, so this failure comes frommain(the baseline096c45570fis 227 commits older)unwrap_self_..._destination_directory_groupos.chownEINVAL in the sandbox. This is a Python tool test, and the PR changes nothing undertools/, so it is environmental and not caused by the PRguest_net_ctlskip, known failuresmainPrevious findings
public_headers, local export declarations): Resolved. The umbrella header exists,Submit.cppincludes it, andpublic_headerspasses on the merged tree.sceVideoOutRegisterBuffersentry): Resolved. See line 31 linked above.New findings
Blocking
None.
Non-blocking
None. The bot already noted that #13994 overlaps on
sceVideoOutCursorSetHotSpot. Whichever of #13994 and #9432/this PR lands second needs to drop its duplicate declaration.Not verified
video_out_flip_*tests (skipped here, no display with Vulkan). The author and BunnyFl report that they pass on Windows.sceGnmSubmitAndFlipCommandBufferswithAPS5_GNM_SUBMIT_WAIT_IDLE, and the CUSA04865 run on currentmain.