Repository navigation
feat(agc): implement packet and range predication and the predication sizes - #582
Conversation
… sizes sceAgcSetPacketPredication sets or clears the predicate bit of a type-3 packet header, and sceAgcSetRangePredication does so for every type-3 packet between two addresses, skipping type-2 fillers. The z-pass, bool and disable predication size queries return the size of the SET_PREDICATION packet sceAgcDcbSetPredication writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. The five NIDs recompute to these names, the predicate bit and the size from the count field are right for a type-3 header, and it matches BryKytyPS5's One gap in the range walk: the one-dword pad
|
Progress report (7de111f → 73a751a)📈 System libraries: 80.85% (+0.15%, +5 implemented functions) ✅ 5 implemented
|
|
One more thing for when you push the pad change: #338 and #613 have landed since, and both add lines at the end of "Unknown function info" in |
# Conflicts: # docs/dev/TechnicalDebt.md
0xffff1000 is a type-3 NOP whose count field is 0x3fff, which the command processor reads as a single dword. sceAgcSetRangePredication read it as a 16385-dword packet and skipped the packets after it, or threw in a short range. It is now stepped over like a type-2 filler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/dev/TechnicalDebt.md
|
Thanks for the pad change and the rebase. |
What
Five libSceAgc exports threw
NotImplemented.sceAgcSetPacketPredication(packet, predication)sets (1) or clears (0) the PM4 predicate bit (bit 0) of a type-3 packet header and leaves the payload alone. A null packet, a non-type-3 header or a value above 1 throws.sceAgcSetRangePredication(start, end, predication)does the same for every type-3 packet in[start, end). It skips type-2 filler dwords. A range that ends inside a packet or holds another packet type throws.sceAgcDcbSetZPassPredicationEnableGetSize,sceAgcDcbSetPredicationDisableGetSizeandsceAgcDcbSetBoolPredicationEnableGetSizereturn 16 bytes.SET_PREDICATIONoperations, so the size is that of the packetsceAgcDcbSetPredicationwrites.The executor still rejects predicated packets ("PM4 header flags ... are not implemented") and
SET_PREDICATIONitself ("GPU query predication is not implemented"). A title that predicates commands still stops at execution with a clear error, rather than running them unconditionally.Tested
Windows 11, MinGW GCC 15.2.0 r7. New
agc_predication_tests:sceAgcDcbSetPredicationwrites.Full
ctest: 217/218 pass.agc_shader_memoryfails without this change too; #574 fixes it.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)🤖 Generated with Claude Code