Repository navigation
feat(agc): emit indexed indirect draws - #40
Merged
Merged
Conversation
sceAgcDcbDrawIndexIndirect and sceAgcDcbDrawIndexIndirectMulti emit DRAW_INDEX_INDIRECT (0x25) and DRAW_INDEX_INDIRECT_MULTI (0x38) like their non-indexed counterparts, with 20-byte records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
This implements
sceAgcDcbDrawIndexIndirectandsceAgcDcbDrawIndexIndirectMulti. They were stubs that aborted with "not implemented".They follow the existing non-indexed
sceAgcDcbDrawIndirect/DrawIndirectMulti:DrawIndexIndirectemitsDRAW_INDEX_INDIRECT(0x25): data offset, base vertex / start instance SGPR locations, draw initiator (5 dwords, matchingGetSize= 20).DrawIndexIndirectMultiemitsDRAW_INDEX_INDIRECT_MULTI(0x38): the same fields, plus the draw-index location / count-indirect control word, count, count address and stride (10 dwords, matchingGetSize= 40). The stride must be at least 20, the size of an indexed record.The packet layout matches what
resolveIndirectDrawin #5 reads for 0x25/0x38.Testing
testIndexedIndirectDrawsinagc_command_tests: it checks the exact packets of both functions, and that a misaligned offset, a stride below 20, and a count address given for a direct count are all rejected without writing packets. The wholeagc_command_testsrun passes on Linux.libs;ctestpasses 36/36.sceAgcDcbDrawIndexIndirectfrom its menu. With this change it gets past that call and keeps rendering; it used to abort there.Overlap check: #24 changes
sceAgcDcbDrawIndexin the same file, in a different hunk.🤖 Generated with Claude Code