Repository navigation
fix(agc): encode a one-dword NOP as the header-only form - #2991
Merged
Merged
Conversation
This was referenced Oct 10, 2026
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Collaborator
|
Checked: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PPSA28416 (STAR WARS: Galactic Racer, UE5) stops on
mainwhile building a command buffer:It asks for a one-dword NOP.
WriteNopbuilt every NOP throughHeader, which needs at least two dwords (a type-3 header stores the count asdwords - 2), so a one-dword NOP threw.A one-dword NOP is the header alone, with the count field
0x3fff:0xffff1000(PKT3_NOP_PADin Mesa'ssrc/amd/common/sid.h). The rest of the tree already reads it that way:sceAgcGetPacketSizereturns 1 for it (tests/PacketInfo.cpp), and the PM4 executor skips it as a filler (FillerPacketinlibSceAgcDriver/Execution/include/Pm4.hpp).Changes:
WriteNopwrites0xffff1000for a one-dword NOP (sceAgcCbNop,sceAgcSetNop). Two or more dwords are unchanged; zero dwords still throws.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 4080.
agc_commands: newtestNop.sceAgcSetNopwith 1, 2 and 3 dwords writes0xffff1000,0xc0001000 0,0xc0011000 0 0and advances the cursor by 6. 0 and0x4002dwords throw and leave the cursor alone. Fails onmainwithHeader: invalid packet header; passes with the fix.ctest -R agc: 322/322 pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)