agc: implement sceAgcSetNop #1343
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1343
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1343/head"
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?
@popcoder565 on GitHub · 2026-10-09 23:58 UTC · original
popcoder565:fix/agc-set-nop→main· +53 −0 · 4 files · 3 commits · merged 2026-10-11 01:00 UTCStar Wars Outlaws calls sceAgcSetNop (K2mciNVxUCE) and crashes right after the unresolved stub returns, without the packet being disabled.
The call turns a packet into a NOP of the same length. Clear the emulator's custom NOP code as well, so packets that the HLE encodes as NOPs, such as end-of-pipe actions, stop executing too.
@coderabbitai[bot] on GitHub · 2026-10-10 00:08 UTC · original · edited 2026-10-10 00:23 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
96beacde-2980-4b3e-a7d2-950b4db2145f📥 Commits
Reviewing files that changed from the base of the PR and between
007cc159bdandf689d51186.📒 Files selected for processing (2)
src/libs/agc.cpptests/ShaderRecompilerComputeTests.cpp🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
📝 Walkthrough
Walkthrough
Adds
Gen5::AgcSetNop, which logs packet details and changes the packet opcode toPm4::IT_NOPwhile retaining selected header bits. When the packet is longer than one DWORD and its second DWORD’s upper 16 bits equal0x6875, the helper clears those bits. The Gen5 library registers the helper under symbolK2mciNVxUCE. The compute test checks packet size and payload preservation, skipping of disabledWRITE_DATAandRELEASE_MEMpackets, and execution of the following enabled write.Priority: ➖ Normal
Change: Feature
Merge Risk: ⚪ Minimal · up to
f689dThe changed test covers the marker-disabling behavior. No merge-blocking issue remains after normal checks.
Pre-merge checks |
4 |
1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 too large.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-10 00:08 UTC · original · edited 2026-10-10 00:20 UTC
On
src/libs/agc.cppline 3758 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4550
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 5880
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 11285
Clear the marker payload when disabling the packet.
AgcSetNopchanges the header toIT_NOP/R_ZERObut leaves the payload unchanged. A payload matching0x6875xxxxstill reachesCpOpMarker; marker IDs such as0x777callcp.Flip(). This means a packet such as0x68750777is not disabled.Clear the first payload word when the packet has payload data.
Suggested fix
✅ Addressed in commit
f689d51@coderabbitai[bot] on GitHub · 2026-10-10 00:08 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
d59c7add-d1c7-408c-ac22-bdec5706c1a9📥 Commits
Reviewing files that changed from the base of the PR and between
59183dbfa8and007cc159bd.📒 Files selected for processing (4)
src/libs/agc.cppsrc/libs/agc.hsrc/libs/libAgcDriver.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
@Nmzik on GitHub · 2026-10-11 00:59 UTC · original
@popcoder565 Thanks!