Implement support for the EXT_disjoint_timer_query_webgl2 extension to provide accurate GPU profiling within the library.
Key Requirements:
- Create a mechanism to wrap a render call with
gl.beginQuery and gl.endQuery.
- Handle the asynchronous nature of WebGL2 queries (waiting for
gl.QUERY_RESULT_AVAILABLE).
- Provide an API to retrieve the execution time of a specific
RenderPass in milliseconds.
- Include a fallback or warning for environments where the extension is not available.
Use Case:
Profiling heavy fragment shaders and identifying bottlenecks in the rendering pipeline without the overhead and inaccuracy of CPU-side timing.
Implement support for the
EXT_disjoint_timer_query_webgl2extension to provide accurate GPU profiling within the library.Key Requirements:
gl.beginQueryandgl.endQuery.gl.QUERY_RESULT_AVAILABLE).RenderPassin milliseconds.Use Case:
Profiling heavy fragment shaders and identifying bottlenecks in the rendering pipeline without the overhead and inaccuracy of CPU-side timing.