gl.finish doesn't wait until rendering finishes
Reported by
marcin.i...@gmail.com,
Nov 30 2016
|
|
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36 Steps to reproduce the problem: 1. Draw complex WebGL scene 2. gl.finish() 3. gl.finish() returns immediately within 3ms Test demo here http://node.variable.io/p/pex/gl.finish/ (time is printed in console logs) What is the expected behavior? gl.finish() should wait until the scene finishes rendering e.g. 30ms. It's hard to believe that Chrome is 10x faster. Especially that time measured between requestAnimationFrame is 30ms+ in Chrome so the GPU is indeed doing the work. What went wrong? Looks like gl.finish() is not waiting for GPU to finish drawing and only waits until JavaScript finishes uploading the data to native layer / CPU / GPU. In Safari and Firefox the JS thread will block until the frame finishes rendering. As per GL ES Spec: "glFinish does not return until the effects of all previously called GL commands are complete. Such effects include all changes to GL state, all changes to connection state, and all changes to the frame buffer contents." https://www.khronos.org/opengles/sdk/docs/man/xhtml/glFinish.xml Did this work before? N/A Does this work in other browsers? Yes Chrome version: 54.0.2840.98 Channel: stable OS Version: OS X 10.12.1 Flash Version: Shockwave Flash 23.0 r0 |
|
►
Sign in to add a comment |
|
Comment 1 by kbr@chromium.org
, Nov 30 2016