I want to open a discussion about understanding the limits of GPUs in different devices.
A lot of times, we don't really know how many textures can we upload to the GPU.
Is 200MB OK? 300MB? what about 400 MB? where do we draw the line and for whom?
So I created the following test and ran it on our clients' devices:
- Test begins right after the Starling Framework is initialized
- Except two 1x1 textures already uploaded, the GPU is "empty".
- Test runs the following loop:
- Create a BitmapData, size 512x512 pixels (=1MB uncompressed), not transparent (does it matter?) with a random fill color.
- Upload the BitmapData via Texture.fromBitmapData(bd);
- Increase size counter by 1 MB
- Run in loop until an error is thrown
- Send "Device Model" + "GPU Capacity" to server and let the app continue its flow...
I run the test on Android, iOS and PC (Facebook Canvas) devices.
Here is a sample of the results, based on around 700 players. I will share more detailed reports as I get more data, or as you guys give me other directions.
Starling GPU Capacity
What can we learn from this data?
First of all, we should probably add 1 MB to all capacities (512MB sounds more right than 511MB) - it's probable that the test's last upload fails due to those two 1x1 textures already uploaded.
I also see that most GPUs allow 512MB of memory.
I also notice that iPhone 5s (model iPhone6,1) shows up with 269 MB and some other times with 511 MB.
I am also trying to understand who performs this limit? is it the OS? the AIR Runtime? the GPU? can I read such specs per GPU?
Hoping we can all learn from this data,
Your thoughts are most welcomed