[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] For review: ANGLE_timer_query extension

Still thinking about this. I still think that this extension can be simplified buy using QueryCounter only.

QueryCounter does not halves the number of queries, it just adds one (which does not matter as there will be 100s of queries usually)

BeginQuery (A)



On the other end, Begin/End will require twice the amount of API calls
100 time interval measure requires 200 begin/endquery calls
100 time interval measure require 101 queryCounter calls

On a use case, at rung time, I would want to first know the total time of the frame before looking into the detail ( that I can use to adjust parameter for the next frame). Total time is LastTimer – FirstTimer using QueryCounter, but much harder to get with Begin/EndQuery -> need to add ALL values. 

I do understand the results between Begin/End and QueryCounter may be different, but it is not relevant as the spec says, it is just measurement errors that the application will ignore anyways

-- Remi

From: Ben Vanik <benvanik@google.com>
Date: Tuesday, April 2, 2013 5:19 PM
To: Kenneth Russell <kbr@google.com>
Cc: Rémi Arnaud <remi.arnaud@amd.com>, "public_webgl@khronos.org" <public_webgl@khronos.org>
Subject: Re: [Public WebGL] For review: ANGLE_timer_query extension

The two APIs provide two different values -- glQueryCounter gives you a timestamp where glBeginQuery/glEndQuery give you a time elapsed. There are scenarios where both are interesting: if you're trying to get many elapsed times (such as timing draw calls/etc) then using the begin/end methods halves the number of query objects you need vs. trying to do it yourself via queryCounter. There's also the potential for the values retrieved from either to be different: the spec allows for different internal timing mechanisms to be used for both. I'm not sure if this is the case in reality, but it is allowed.

On Tue, Apr 2, 2013 at 5:03 PM, Kenneth Russell <kbr@google.com> wrote:
Good question. As the primary author of the ANGLE_timer_query
extension, Ben Vanik should answer it.

Note that beginQuery and endQuery will definitely be needed in the
OpenGL ES 3.0 upgrade, since they support occlusion and primitive


On Tue, Apr 2, 2013 at 4:51 PM, Arnaud, Remi <Remi.Arnaud@amd.com> wrote:
> I was wondering if beginQueryANGLE and endQueryANGLE are needed, seems
> like queryCounterANGLE alone can cover all use cases?
> Regards
> -- Remi
> On 4/2/13 4:33 PM, "Kenneth Russell" <kbr@google.com> wrote:
>>The MapsGL team has requested for some time that the ANGLE_timer_query
>>extension be exposed to WebGL. The primary use case is to allow tools
>>to be written which identify performance problems in WebGL
>>Please review the proposal and send comments to the list:
>>Note that the planned upgrade of WebGL to the OpenGL ES 3.0 API will
>>pull the query functions into the core. This extension becomes much
>>smaller when applied to that API version.
>>You are currently subscribed to public_webgl@khronos.org.
>>To unsubscribe, send an email to majordomo@khronos.org with
>>the following command in the body of your email:
>>unsubscribe public_webgl