Skip to main content

Query

The Query class provides functionality for querying various types of data, such as time, clock, sample counts, and statistics, in a platform-specific manner. It allows for creating and managing different types of queries, checking the state of the query, and retrieving the results of the query.

#include <platform/TellusimQuery.h>

Constructors

Query()

Methods

Query platform.

Platform getPlatform() const
const char *getPlatformName() const

Query device index.

uint32_t getIndex() const

Clear query.

void clear()

Check query.

bool isCreated() const
bool isAvailable() const
bool isBegan() const
bool isEnded() const

Create query.

bool create(Type type)

Query type.

Type getType() const
static const char *getTypeName(Type type)
const char *getTypeName() const
size_t getTypeSize() const
bool isTime() const
bool isClock() const
bool isSamples() const
bool isSamples1() const
bool isStatistics() const
bool isTimeType() const
bool isSamplesType() const

Get query data.

bool get(void *dest, size_t size, bool wait = true) const
uint64_t getTime(bool wait = true, bool *status = nullptr) const
uint32_t getSamples(bool wait = true, bool *status = nullptr) const

Statistics getStatistics(bool wait = true, bool *status = nullptr) const

Enums

Type

Query types.

NameValue
TypeUnknown0
TypeTime1
TypeClock2
TypeSamples3
TypeSamples14
TypeStatistics5
NumTypes6

Structs

Statistics

Statistics query.

Variables

TypeName
uint64_tnum_vertices
uint64_tnum_primitives
uint64_tvertex_invocations
uint64_tcontrol_invocations
uint64_tevaluate_invocations
uint64_tgeometry_invocations
uint64_tgeometry_primitives
uint64_tfragment_invocations
uint64_tcompute_invocations
uint64_tclipping_invocations
uint64_tclipping_primitives