Function gpa::metrics::CreateQueryManager

Function Documentation

IQueryManager *gpa::metrics::CreateQueryManager(QueryManagerType type, QueryManagerData *pData)

Creates and initializes a query manager instance.

Note

If the query manager implementation will be Intel MD library based, the LinkAndPrepareForMdApiSourceUsage function must have been previously called. If unsure due to using type kUnspecified, call LinkAndPrepareForMdApiSourceUsage in advance just to be safe.

Note

When QueryManagerType::kUnspecified is specified, an attempt to create the query manager is done using platform specific runtime logic. That logic is essentially to try the Intel MD library based implementation first, then fallback to the graphics API based one.

Note

All graphics API specific objects provided for the creation and initialization of the query manager (such as an ID3D12Device or VkDevice), must remain alive/usable until the query manager has been destroyed.

Parameters
  • type -- [in] Type of query manager to create. It is recommended to usually just specify the platform agnostic QueryManagerType::kDefault enumerator.

  • pData -- [inout] Pointer to a structure that provides data needed to initialize the query manager.

Returns

Upon success, a pointer to the created QueryManager instance is returned. Otherwise, nullptr is returned and if the provided QueryManagerData::errMessage field is valid, it will contain the cause of the failure.