devkitPro / citro3d

Homebrew PICA200 GPU wrapper library for Nintendo 3DS
zlib License
244 stars 34 forks source link

Latest update slowed down drawing by ~50% #50

Closed TheGag96 closed 4 years ago

TheGag96 commented 4 years ago

Hi. I just updated citro3d to the latest on my machine, it appears that GPU performance for drawing (at least using citro2d?) has dramatically slowed down.

I discovered this working with my own homebrew that uses citro2d (trying on real hardware and on Citra), but you can see the effect yourself with the gpusprites example (c22c354, dcb3aac). (I didn't try the gpusprites example on real hardware.)

I'm sure you made the change with the hopes of performance improvements - hopefully it's just something small and you can get what you were looking for with that change!

fincs commented 4 years ago

Thank you for voicing your concerns. There was a big change done recently in citro3d and it was tested on several applications. All users I had do the test reported either no difference, or small improvements in overall framerate smoothness. This test involved hbmenu, which makes heavy usage of texture based 2D rendering, similar to citro2d in nature.

I think what you're observed is the fact that the final step of transferring the GPU output to the screen framebuffers is now accounted for in the "GPU usage time" value reported by citro3d. Previously this step was unaccounted for, but the GPU was still spending time on it. This is now corrected in the latest citro3d release, as a side effect of the aforementioned changes.

Also for what it's worth, performance data measured with emulators equates to nonsense and should not be used.

TheGag96 commented 4 years ago

Ah, okay! So it's no slowdown at all, just a more accurate view of GPU time spent. Thanks for clarifying!

I know emulator data is basically nonsense - though I had noticed in my own testing that if one of those usage percentage indicators appeared to get better or worse in Citra after some change, it would reflect to some degree in the same direction on real hardware. I dunno if that always holds, but it has as far as I've seen.