[Public WebGL] Re: WebGL 2 EXT_disjoint_timer_query in Firefox

Kenneth Russell [email protected]
Wed May 31 19:29:51 PDT 2017


The reason for the divergence in the extension specs was because I couldn't
figure out a way to write Web IDL that made the WebGLQueryEXT objects (for
WebGL 1.0) into simple aliases for WebGLQuery on the WebGL 2.0 context.

If someone can suggest a better way to spec this, we'd be happy to make
Chrome behave the same way as Firefox and get rid of the
EXT_disjoint_timer_query_webgl2 extension entirely.

-Ken


On Thu, May 25, 2017 at 5:44 AM, Tarek Sherif <[email protected]> wrote:

> TBH, the differences between the two versions of the extension strike me
> as too cosmetic to be worth this much trouble (though the _webgl2 version
> is cleaner). The problem with the Firefox implementation is that it
> diverges so completely from what's in the spec (and Mozilla's own
> documentation
> <https://developer.mozilla.org/en-US/docs/Web/API/EXT_disjoint_timer_query>).
> Further, this update
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1308057> seems to have made
> it possible to use WebGL 2 query objects with the WebGL 1-ish
> EXT_disjoint_timer_query, so code like the following works in Firefox:
> var gl = document.createElement("canvas").getContext("webgl2");
> var ext = gl.getExtension("EXT_disjoint_timer_query");
> var q = gl.createQuery();
> ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, q);
> ext.isQueryEXT(q);
> => true
>
> Again, not how the extension is specified, which makes it difficult to
> understand how it's supposed to work.
>
>
> Tarek Sherif
> http://tareksherif.net/
> https://www.biodigital.com/
>
>
> On Thu, May 25, 2017 at 3:37 AM, Florian Bösch <[email protected]> wrote:
>
>> WebGL 1 does not have the query functions, WebGL 2 does. The timer query
>> extension defines constants to be used with the query functions, but since
>> that function does not exist in WebGL 1, it is added to the extension
>> object. Thus you have to make a choice, deliver the same extension that has
>> different things in it depending on what context it came from, requiring
>> the application programmer to test if the symbols are present, and if not
>> test if they are present on the context itself, or have two extensions
>> that're unambigously named which are two distinct objects with a well
>> defined set of symbols. Neither choice is optimal as it rubs up against an
>> impedance missmatch between how OpenGL ES does things, and how WebGL does
>> things.
>>
>> On Wed, May 24, 2017 at 10:34 PM, Jeff Gilbert <[email protected]>
>> wrote:
>>
>>>
>>> I remember having objections to this. I'll try to hunt down the
>>> minutes for this, because I remember strongly disagreeing with this
>>> divergence.
>>>
>>> On Wed, May 24, 2017 at 1:07 PM, Tarek Sherif <[email protected]> wrote:
>>> > Here are some relevant Firefox bug tickets:
>>> > https://bugzilla.mozilla.org/show_bug.cgi?id=1308057
>>> > https://bugzilla.mozilla.org/show_bug.cgi?id=1328882
>>> >
>>> > Tarek Sherif
>>> > http://tareksherif.net/
>>> > https://www.biodigital.com/
>>> >
>>> >
>>> > On Wed, May 24, 2017 at 1:55 PM, Kenneth Russell <[email protected]>
>>> wrote:
>>> >>
>>> >> That's correct, it's not supposed to be advertised.
>>> >> EXT_disjoint_timer_query is for WebGL 1.0, and _webgl2 for 2.0.
>>> >>
>>> >> The split was made fairly late in the WebGL 2.0 spec process, which is
>>> >> probably why it slipped by in Firefox.
>>> >>
>>> >> https://github.com/KhronosGroup/WebGL/pull/2405 strengthens the
>>> >> conformance test. Thanks for pointing this out.
>>> >>
>>> >> -Ken
>>> >>
>>> >>
>>> >> On Wed, May 24, 2017 at 10:36 AM, Kai Ninomiya <[email protected]>
>>> wrote:
>>> >>>
>>> >>> IIRC the EXT_disjoint_timer_query extension is not supposed to be
>>> >>> available at all for WebGL 2 contexts. Getting that extension should
>>> fail.
>>> >>> It's possible we forgot to add a conformance test for this behavior,
>>> and it
>>> >>> slipped by in Firefox.
>>> >>>
>>> >>> On Wed, May 24, 2017 at 8:19 AM Tarek Sherif <[email protected]>
>>> wrote:
>>> >>>>
>>> >>>> Ah, I just realized I was only using the TIME_ELAPSED_EXT and
>>> >>>> GPU_DISJOINT_EXT enums on the extensions, which is why they
>>> appeared to be
>>> >>>> interchangeable. The presence of the original
>>> EXT_disjoint_timer_query on a
>>> >>>> WebGL 2 context does still strike me as odd, since the text from
>>> spec I
>>> >>>> quoted suggests that it shouldn't be.
>>> >>>>
>>> >>>> Tarek Sherif
>>> >>>> http://tareksherif.net/
>>> >>>> https://www.biodigital.com/
>>> >>>>
>>> >>>>
>>> >>>> On Wed, May 24, 2017 at 9:29 AM, Tarek Sherif <[email protected]>
>>> wrote:
>>> >>>>>
>>> >>>>> I'm confused by how EXT_disjoint_timer_query is behaving with
>>> WebGL 2
>>> >>>>> contexts in Firefox. It allows both WebGL 1 (e.g.
>>> ext.createQueryEXT) and
>>> >>>>> WebGL 2 (gl.createQuery) usage. Is the WebGL 2 usage is guaranteed
>>> for this
>>> >>>>> extension? The EXT_disjoint_timer_query spec doesn't mention the
>>> WebGL 2
>>> >>>>> usage, but does state: "This version of the disjoint_timer_query
>>> extension
>>> >>>>> is exposed only on on WebGL 1.0 contexts. See the _webgl2 version
>>> of the
>>> >>>>> extension for how it is exposed on WebGL 2.0 contexts." Does that
>>> mean
>>> >>>>> EXT_disjoint_timer_query should behave as specified in
>>> >>>>> EXT_disjoint_timer_query_webgl2 when using a WebGL 2 context? If
>>> so, it
>>> >>>>> would seem that the WebGL 1-like functionality that Firefox
>>> exposes on that
>>> >>>>> extension is incorrect.
>>> >>>>>
>>> >>>>> Either way, this all seems more confusing than it needs to be...
>>> >>>>>
>>> >>>>> Tarek Sherif
>>> >>>>> http://tareksherif.net/
>>> >>>>> https://www.biodigital.com/
>>> >>>>>
>>> >>>>
>>> >>
>>> >
>>>
>>> -----------------------------------------------------------
>>> You are currently subscribed to [email protected]
>>> To unsubscribe, send an email to [email protected] with
>>> the following command in the body of your email:
>>> unsubscribe public_webgl
>>> -----------------------------------------------------------
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20170531/a538ff0e/attachment.html>


More information about the public_webgl mailing list