Capítulo 788 de 859

Chapter 788: WebGPUTimestampQueryPool

Core Idea

Manages a pool of WebGPU timestamp queries for performance measurement. Extends the base TimestampQueryPool to provide WebGPU-specific implementation.

Reference Tables

Constructor

Signature
new WebGPUTimestampQueryPool( device : GPUDevice, type : string, maxQueries : number )

Methods

MethodDescription
.allocateQueriesForContext( uid : string ) : numberAllocates a pair of queries for a given render context.
.dispose() : Promise (async)Dispose of the query pool.
.resolveQueriesAsync() : Promise.<number> (async)Asynchronously resolves all pending queries and returns the total duration. If there's already a pending resolve operation, returns that promise instead.

Key Takeaways

  1. WebGPUTimestampQueryPool extends: TimestampQueryPool
  2. Key methods: allocateQueriesForContext, dispose, resolveQueriesAsync.

Connects To