why worse vertex performance when using private storage mode buffer on iOS?

Why we get worse performance when using private mode buffer for vertex/index buffer compared to using shared mode?

rencently, with the new gpu memory profiling tool, we find that our game engine create all gpu resources with shared storage mode on iOS, which is at odd with the recommendation that persistent resouces should be private. So I wrote a simple program to investigate the performance boost we can have. However the result is surprising: shared stoarge mode make vertex/index buffer access faster than using private storage mode. For texture the performance is pretty close. The attachment are a detailed report and the test program.


https://pan.baidu.com/s/1ZVGdW9LH88WyMJRzyr9JHA

https://pan.baidu.com/s/1bg7O4JRSA9gm1_6mQX3aoA

Replies

Haven't looked at how you're testing, but if you compare the vertices/second numbers private storage looks to be much faster. So I'd guess something is affecting your measurement, maybe added initial setup cost for private storage?

vertex/index buffers are setup only once at the beginning, so subsequent frame rendering have no "initial setup cost". I further tested it on older version iOS systems and find that this "shared faster than private" problem happens only on iOS13, while on iOS12 and 11 private access is indeed faster. My guess is that perhaps iOS13 have some secret optimizations