I'm working on a in-house graphics library as none of the existing libraries suit my needs and I want it to be highly optimized so I can get the most out of what the Wii can handle for my future projects.
Currently, its stuck with the standard 'Immediate-mode' FIFO protocol when sending commands to the GP and I believe that I could get some performance boost by having 2 FIFO buffers instead of 1 when pushing the GP to its peak as the CPU can continue to fill one buffer while the GP processes the other instead of having the CPU wait for the GP to finish.
Basically, I wanted to send commands to the GP like this:
1. Allocate 2 FIFO buffers on init with FIFO[0] attached to the CPU and FIFO[1] attached to the GP.
2. Fill FIFO[0] with GP commands (while GP is idle or is processing FIFO[1]).
3. Wait for GP to finish processing commands in FIFO[1].
4. Switch framebuffers.
5. Attach FIFO[0] to GP and FIFO[1] to CPU.
6. Fill FIFO[1] with GP commands (while GP is processing FIFO[0]).
7. Wait for GP to finish processing commands in FIFO[0].
8. Switch framebuffers.
9. Attach FIFO[1] to GP and FIFO[0] to CPU.
10. Repeat step 2.
According to the libogc docs, its possible to setup a multi-buffered GP FIFO protocol but I don't know where to start due to how vague and discrete the documentation is... Example code or any helpful advice would be greatly appreciated.