Metal Best Practices Guide states that
The setVertexBytes:length:atIndex: method is the best option for binding a very small amount (less than 4 KB) of dynamic buffer data to a vertex function
I believe this means that in case of simple scenes, instead of storing uniforms in a manually managed dynamic buffer, it's best to simply update model/view/projection matrices without using any buffer at all, by using
setVertexBytes
and setFragmentBytes
.My question is, that in this case, as there is no dynamic buffer at all (only static vertex data), what are we calling triple buffering?
Is it simply because we have a semaphore with
value: 3
left now?Moreover, what if I totally remove the semaphore as well? The app seems to work fine. But what is happening in this case actually? Am I getting better latency or worse, compared to a semaphore with value: 3?
Since the render loop is limited to 60 FPS and the frame time is about 1.5 ms for the CPU (in case of a simple example), some command has to take the place of the blocking semaphore, right? Is Metal going into double-buffering in this case (GPU displays one frame while CPU is encoding the next)?