Hacker News
points by TuxSH 4 days ago | 0 comments
> Good instinct, the bottleneck is on the CPU side though.

Have you, or rather your agents, tried to identify which CPU functions were the bottlenecks (e.g. in citro3d, perhaps)?

I find it surprising that your stuff is CPU bound. Are you doing one command-list submission for _both_ eyes (with one drawcall for each)? This should be relatively simple, only require viewproj matrix changes and avoid CPU<>GPU roundtrips.

If not, you are going to hit IRQ dispatching costs as well as shardmem dispatching costs as well as other costs.

[–] coffeesoda 3 days ago
Bypassing Citro3D for raw PICA200 commands cut our per-draw CPU cost by 15x (11 µs to 0.7 µs). After that, there's no single hot function left.

The remaining bottleneck is the o3DS instruction cache. Our code is bigger than the 16KB L1, so the CPU spends a big chunk each frame waiting on instruction fetches.

We build the list for left eye, submit, and then re-submit the list offset for the right. Hadn't tried chaining both into one submission, it improved performance. Thanks so much for the suggestion!

Thanks for taking a look and the great questions. I really appreciate your contributions to the scene.

Hacker News