Chrome nowadays seems to be exposing disjoint_timer_query extensions on platforms with Site Isolation (see for example this). That is the case in my environment, where the Playground example seems to work, BABYLON.Engine.LastCreatedEngine.getCaps().timerQuery returns EXTDisjointTimerQueryWebGL2 instead of null, EXT_disjoint_timer_query_webgl2 is listed as a supported extension, etc.
in Firefox on the other hand, enabling gfx.webrender.debug.gpu-time-queries doesn’t work for me. I have also tried enabling webgl.enable-privileged-extensions (suggested for example here), but that just crashes the tab with the PG in it.
If someone has suggestions for getting this to work in FF, I’ll take them!
TEST COMPLETE: 3 PASS, 0 FAIL
PASS WebGL context exists
PASS No EXT_disjoint_timer_query support -- this is legal
PASS successfullyParsed is true
TEST COMPLETE
… with beautiful green highlights screaming “All good!”
I’m guessing that’s not what you see when your FF fails the tests?
I also noticed that caniuse was out of date on this one. It’s actually the second time this week that I find inaccurate info reported there regarding WebGL extensions
I reported the first issue already. I’ll report this one after my first cup of
Caniuse info for EXT_disjoint_timer_query might be accurate after all : the footnote clarifies why support was removed from all browsers (security reason). There is also a dedicated entry for EXT_disjoint_timer_query_webgl2 which does indicate support in Chrome. Absence of support so far for EXT_disjoint_timer_query_webgl2 in Firefox is also confirmed here.
I’ve tried activating again webgl.enable-privileged-extensions in FF, and dug a little more into this.
Additional observations:
EXT_disjoint_timer_query gets enabled, as advertised.
the default PG can still be opened without problem.
the PG in the doc crashes the tab. The line causing the crash is: instrumentation.captureGPUFrameTime = true;
after inspecting the source code for engine.query.ts and testing a bit, I think I narrowed down the cause of the crash to the calls to EXT_disjoint_timer_query.deleteQueryEXT()
in Chrome, those calls are not made. (gl.deleteQuery() is used instead.)