Open Bug 1328882 Opened 7 years ago Updated 2 years ago

Implement EXT_disjoint_timer_query_webgl2

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

defect

Tracking

()

People

(Reporter: fs, Unassigned)

References

()

Details

(Keywords: dev-doc-needed, Whiteboard: [gfx-noted])

https://github.com/KhronosGroup/WebGL/pull/2076 created a new extension called "EXT_disjoint_timer_query_webgl2" which I think you will need if you want to use timer queries in WebGL2.

Spec: https://www.khronos.org/registry/webgl/extensions/EXT_disjoint_timer_query_webgl2/

Chromium implemented this as well: https://bugs.chromium.org/p/chromium/issues/detail?id=654134

It doesn't look like this was implemented in bug 1308057 or was it?
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4e073f1cb11

I think the EXT_disjoint_timer_query_webgl2 is different from WebGLExtensionID::EXT_disjoint_timer_query.
Flags: needinfo?(jgilbert)
Priority: -- → P3
Whiteboard: [gfx-noted]
Flags: needinfo?(jgilbert)
Type: defect → task
Type: task → defect

What would be needed to implement this in Firefox? Alternatively, is there a way to profile WebGL2 shader execution in Firefox without this extension?

This extension is required to get GPU timings. We still have code that handles this, we just need to re-audit it for security concerns before we can re-enabled it in a post-spectre world.

In the interim, would it be possible to have an about:config setting that enables it? I suspect the primary usecase for GPU timing information is local profiling during development. This would at least match the behavior of the .reduceTimerPrecision. category of flags.

Having a single browser that can get accurate CPU and GPU timings would be invaluable during development.

You should be able to try it if you enable webgl.enable-privileged-extensions, though this is unsafe for the general web.
Note that Firefox does not have a different EXT_disjoint_timer_query_webgl2, and uses EXT_disjoint_timer_query for both webgl1 and webgl2.

(In reply to Jeff Gilbert [:jgilbert] from comment #5)

You should be able to try it if you enable webgl.enable-privileged-extensions, though this is unsafe for the general web.
Note that Firefox does not have a different EXT_disjoint_timer_query_webgl2, and uses EXT_disjoint_timer_query for both webgl1 and webgl2.

That's super helpful; thanks! I had tried webgl.enable-privileged-extensions but didn't know to use EXT_disjoint_timer_query.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.