#[non_exhaustive]#[repr(i32)]pub enum QueryType {
Occlusion = 0,
PipelineStatistics(QueryPipelineStatisticFlags),
Timestamp = 2,
AccelerationStructureCompactedSize = 1_000_150_000,
AccelerationStructureSerializationSize = 1_000_150_001,
AccelerationStructureSerializationBottomLevelPointers = 1_000_386_000,
AccelerationStructureSize = 1_000_386_001,
}
Expand description
The type of query that a query pool should perform.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Occlusion = 0
Tracks the number of samples that pass per-fragment tests (e.g. the depth test).
Used with the begin_query
and end_query
commands.
PipelineStatistics(QueryPipelineStatisticFlags)
Tracks statistics on pipeline invocations and their input data.
Used with the begin_query
and end_query
commands.
Timestamp = 2
Writes timestamps at chosen points in a command buffer.
Used with the write_timestamp
command.
AccelerationStructureCompactedSize = 1_000_150_000
Queries the size of data resulting from a
CopyAccelerationStructureMode::Compact
operation.
Used with the write_acceleration_structures_properties
command.
AccelerationStructureSerializationSize = 1_000_150_001
Queries the size of data resulting from a
CopyAccelerationStructureMode::Serialize
operation.
Used with the write_acceleration_structures_properties
command.
AccelerationStructureSerializationBottomLevelPointers = 1_000_386_000
For a top-level acceleration structure, queries the number of bottom-level acceleration
structure handles that will be written during a
CopyAccelerationStructureMode::Serialize
operation.
Used with the write_acceleration_structures_properties
command.
AccelerationStructureSize = 1_000_386_001
Queries the total size of an acceleration structure.
Used with the write_acceleration_structures_properties
command.
Implementations§
source§impl QueryType
impl QueryType
sourcepub const fn result_len(&self) -> DeviceSize
pub const fn result_len(&self) -> DeviceSize
Returns the number of QueryResultElement
s that are needed to hold the result of a
single query of this type.
- For
Occlusion
andTimestamp
queries, this returns 1. - For
PipelineStatistics
queries, this returns the number of statistics flags enabled.
If the results are retrieved with WITH_AVAILABILITY
enabled, then an additional element
is required per query.