I'm writing a 2D compositor using libdragon to make complex 2D UIs, and I occasionally run into a bottleneck whereby too many draw calls are issued (e.g. rendering lots of text). I've found that using blocks can dramatically reduce overhead, but In most cases, I'm unable to encapsulate with rspq_block, as the drawing is only happening when the text is moving - so the positions of everything are changing each frame, which invalidates the block.
It would offer a pretty substantial performance win in this use case, if I could issue a simple one-line call to set the origin of all subsequent draw calls - that way everything could be baked into blocks and I'll only need to adjust the origin when things are moving.
Even if this only applied to rdpq_texture_rectangle, and rdpq_fill_rectangle, I think this would be well worth the effort.
I'm writing a 2D compositor using libdragon to make complex 2D UIs, and I occasionally run into a bottleneck whereby too many draw calls are issued (e.g. rendering lots of text). I've found that using blocks can dramatically reduce overhead, but In most cases, I'm unable to encapsulate with
rspq_block, as the drawing is only happening when the text is moving - so the positions of everything are changing each frame, which invalidates the block.It would offer a pretty substantial performance win in this use case, if I could issue a simple one-line call to set the origin of all subsequent draw calls - that way everything could be baked into blocks and I'll only need to adjust the origin when things are moving.
Even if this only applied to
rdpq_texture_rectangle, andrdpq_fill_rectangle, I think this would be well worth the effort.