3 ms·
The WebGL example is measuring how long it takes to send the rendering request to the GPU, not the actual computation time. The correct way to measure GPU execu
by johndough 9y ago
The WebGL example is measuring how long it takes to send the rendering request to the GPU, not the actual computation time. The correct way to measure GPU execution time is to use timer queries.
- jsheard 9y agoThe render function ends with a call to gl.finish(), which should block until the GPU actually finishes rendering. It's a crude way to measure performance but it's probably good enough for this.
- deleted 9y ago[deleted]
- DiThi 9y agoUntil the GPU driver _says_ it has finished rendering. Been developing WebGL for years. I've never seen any difference in performance with gl.finish() and without vsync. I would expect some difference because the JS code wouldn't be running in parallel with gl.finish(). The only way I have been able to measure performance is to look at the FPS without vsync (chrome --disable-gpu-vsync).