Skip to content

Add RSP command to offset position of all other draw commands #950

Description

@lmcd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions