Repository navigation
feat(agc-driver): execute boolean SET_PREDICATION - #742
Merged
oneandonlydean merged 1 commit intoOct 5, 2026
Merged
Conversation
SET_PREDICATION threw, and packets with the predicate header bit were rejected. The executor now keeps the queue's predication: operations 3 and 4 read a 64- or 32-bit value and bit 8 selects whether predicated packets run when it is non-zero or zero; operation 0 clears it. Before a predicated packet runs while predication is active, queued labels are recorded and the value is read, as for COND_EXEC; the packet is skipped when the predicate fails. Indirect buffers are inlined when a submission is copied, so a predicated INDIRECT_BUFFER call keeps its header in front of the inlined commands and records their end like a COND_EXEC range; the block runs or is skipped on one evaluation, as on the command processor. Query predication, a predicated COND_EXEC, predicated chains and flips inside predicated command buffers throw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
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
The executor rejected
SET_PREDICATION("GPU query predication is not implemented") and every packet with the predicate header bit except the tag markers. PPSA14632 (LEGO Horizon Adventures) predicates anINDIRECT_BUFFERcall on a 64-bit value its GPU work writes:sceAgcDcbSetPredication(condition 1, operation 3, wait 1, address), thensceAgcSetPacketPredication(call, 1)(#582), then operation 0.sid.h: operation 3 reads 64 bits, 4 reads 32 bits, bit 8 runs predicated packets when the value is non-zero (clear: when it is zero), bit 12 is a hint and is ignored, operation 0 clears it. Z-pass and primitive-count predication still throw, as do the continue bit and an address with its low 4 bits set (sceAgcDcbSetPredicationwrites it 16-byte aligned).SET_PREDICATIONandCOND_EXEC. While predication is active, the executor records the queued labels and reads the value before the packet, as COND_EXEC (feat(agc): implement COND_EXEC #673) does, and skips the packet when the predicate fails, before any of its side effects. With predication cleared the packet runs, as on the command processor.conditionalEnds, like a COND_EXEC range. The whole block runs or is skipped on one evaluation. A predicated chain, a REWIND or flip or rendering wait inside a predicated call throw.The assumptions are recorded in TechnicalDebt.
Tested
823e01e3.agc_driver_pm4now covers:WRITE_DATAand a predicated call to a nested buffer are skipped for a false predicate and run for a true one, plus the rejected predicated chain. With the copy change reverted it fails ("command buffer with a false predicate was executed").agc_driver_pm4,agc_driver). They now use a flag that is still unsupported for that packet.mainon this GPU (RX 9070 XT, RADV).sceAgcDcbSetCxRegistersIndirectwith a null address.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