No, it is not.
In fact, there is only gl.flush in Chrome gl.flush . See the code and search for ":: finish".
Since Chrome is a multiprocessor and actually implements deep protection, the actual GL calls are written in another process from your JavaScript, so even if Chrome did call gl.finish , it will happen in another process, and from POV JavaScript will not be accurate to determine time in any form or form. It seems that Firefox does something similar in different ways for the same reasons.
Even outside of Chrome, each driver handles gl.finish differently. Using gl.finish for synchronization is not useful information because it does not reflect the actual speed, since it involves stopping the GPU pipeline. In other words, the time with gl.finish includes a lot of overhead that would not be realized in real use, and therefore is not an accurate measurement of how quickly something will fulfill ordinary circumstances.
Some GPUs have GL extensions to get time information. Unfortunately, they (a) are not available in WebGL and (b) are unlikely to ever be so, since they are not portable, because they cannot really work on tiled GPUs like those found on many mobile phones.
Instead of asking how GL time calls what exactly are you trying to achieve by synchronizing them? Perhaps people can offer a solution.
gman
source share