Comparing Advanced Transforms in GPU Mode vs CPU Mode

After my last benchmarks, I thought it might be interesting to do a measure of how advanced transformations (scale, alpha, rotation) affect GPU mode, vs what we are normally used to in CPU Mode.

In this benchmark, I do a simple sprite rendering test. One version applies alpha between .2 and 1, a constant +1 to rotation every frame, and a random scale between .5 and 1.5, the other version simply modifies x/y properties, with no scaling, alpha or rotation applied.

We used iPad 2 as our test device, and tested both GPU and CPU modes (Update: Added “direct” rendering mode as well, just for kicks)

Loading chart…

As you can see, these advanced rotations are quite cheap when using GPU mode. GPU mode saw a performance hit of about 15% when applying all 3 advanced translations, CPU Mode on the other hand takes massive 66% drop in performance!

Note: My previous render tests used “direct” when testing CPU mode, rather than “cpu”, that’s why the numbers are so much higher for the cpu tests there. “direct” is a hybrid rendering mode, which uses the GPU to render, but is not nearly as optimized as full GPU mode when using shared textures.

Written by

2 Comments to “Comparing Advanced Transforms in GPU Mode vs CPU Mode”

  1. Kevin Newman says:

    I’m curious how cacheAsBitmap + cacheAsBitmapMatrix would affect those transformed Bitmaps in “direct” mode (with and without alpha). CaBM might prevent GPU upload and CPU rendering (tranform) bottlenecks for rotation/scaling – maybe even for alpha (not sure).

Leave a Reply