pub enum QueryType {
    Occlusion,
    PipelineStatistics(PipelineStatisticsTypes),
    Timestamp,
}
Expand description

Type of query contained in a QuerySet.

Corresponds to WebGPU GPUQueryType.

Variants

Occlusion

Query returns a single 64-bit number, serving as an occlusion boolean.

PipelineStatistics(PipelineStatisticsTypes)

Query returns up to 5 64-bit numbers based on the given flags.

See PipelineStatisticsTypes’s documentation for more information on how they get resolved.

Features::PIPELINE_STATISTICS_QUERY must be enabled to use this query type.

Timestamp

Query returns a 64-bit number indicating the GPU-timestamp where all previous commands have finished executing.

Must be multiplied by Queue::get_timestamp_period to get the value in nanoseconds. Absolute values have no meaning, but timestamps can be subtracted to get the time it takes for a string of operations to complete.

Features::TIMESTAMP_QUERY must be enabled to use this query type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.