|
| AZ_CLASS_ALLOCATOR (QueryPool, AZ::SystemAllocator, 0) |
|
| AZ_RHI_MULTI_DEVICE_OBJECT_GETTER (QueryPool) |
|
ResultCode | Init (const QueryPoolDescriptor &descriptor) |
|
ResultCode | InitQuery (Query *query) |
|
ResultCode | InitQuery (Query **queries, uint32_t queryCount) |
|
uint32_t | CalculateResultsCount (uint32_t queryCount=0) |
|
ResultCode | GetResults (uint64_t *results, uint32_t resultsCount, QueryResultFlagBits flags) |
|
ResultCode | GetResults (Query *query, uint64_t *result, uint32_t resultsCount, QueryResultFlagBits flags) |
| Same as GetResults(uint64_t, uint32_t, QueryResultFlagBits) but for a specific multi-device query.
|
|
ResultCode | GetResults (Query **queries, uint32_t queryCount, uint64_t *results, uint32_t resultsCount, QueryResultFlagBits flags) |
|
const QueryPoolDescriptor & | GetDescriptor () const override final |
|
void | Shutdown () override final |
| Forwards the shutdown call to all device-specific QueryPools.
|
|
| AZ_RTTI (ResourcePool, "{BAE5442C-A312-4133-AE80-1200753A7C3E}", MultiDeviceObject) |
|
template<typename ResourceType > |
void | ForEach (AZStd::function< void(ResourceType &)> callback) |
|
template<typename ResourceType > |
void | ForEach (AZStd::function< void(const ResourceType &)> callback) const |
|
uint32_t | GetResourceCount () const |
| Returns the number of resources in the pool.
|
|
| AZ_RTTI (MultiDeviceObject, "{17D34F71-944C-4AF5-9823-627474C4C0A6}", Object) |
|
bool | IsInitialized () const |
| Returns whether the device object is initialized.
|
|
AZ_FORCE_INLINE bool | IsDeviceSet (int deviceIndex) const |
|
MultiDevice::DeviceMask | GetDeviceMask () const |
|
| AZ_RTTI (Object, "{E43378F1-2331-4173-94B8-990ED20E6003}") |
|
void | SetName (const Name &name) |
| Sets the name of the object.
|
|
const Name & | GetName () const |
| Returns the name set on the object by SetName.
|
|
uint32_t | use_count () |
| Returns the current use count of the object.
|
|
|
template<typename T > |
static AZ_FORCE_INLINE void | IterateDevices (MultiDevice::DeviceMask deviceMask, T callback) |
|
using | PlatformMethod = AZStd::function< RHI::ResultCode()> |
| //!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//
|
|
ResultCode | Init (MultiDevice::DeviceMask deviceMask, const PlatformMethod &initMethod) |
|
ResultCode | InitResource (Resource *resource, const PlatformMethod &initResourceMethod) |
|
bool | ValidateIsRegistered (const Resource *resource) const |
|
bool | ValidateIsUnregistered (const Resource *resource) const |
|
bool | ValidateIsInitialized () const |
| Validates that the resource pool is initialized and ready to service requests.
|
|
void | Init (MultiDevice::DeviceMask deviceMask) |
| The derived class should call this method to assign the device.
|
|
template<typename T > |
AZ_FORCE_INLINE void | IterateDevices (T callback) |
| Helper method that will iterate over all selected devices and call the provided callback.
|
|
template<typename T , typename U > |
AZ_FORCE_INLINE decltype(auto) | IterateObjects (U callback) |
|
template<typename T , typename U > |
AZ_FORCE_INLINE decltype(auto) | IterateObjects (U callback) const |
|
template<typename T > |
AZ_FORCE_INLINE Ptr< T > | GetDeviceObject (int deviceIndex) const |
|
void | add_ref () const |
|
void | release () const |
|
AZStd::unordered_map< int, Ptr< DeviceObject > > | m_deviceObjects |
| A map of all device-specific objects, indexed by the device index.
|
|
AZStd::atomic_int | m_useCount = 0 |
|
QueryPool manages a map of device-specific QueryPools, which provide backing storage and context for query instances. The QueryPoolDescriptor contains properties defining memory characteristics of query pools. All queries created on a pool share the same backing and type.
ResultCode AZ::RHI::QueryPool::GetResults |
( |
uint64_t * |
results, |
|
|
uint32_t |
resultsCount, |
|
|
QueryResultFlagBits |
flags |
|
) |
| |
Get the results from all queries (from all devices) in the pool, which are returned as uint64_t data. The parameter "resultsCount" denotes the total number of results requested. It can be determined by calling GetResultsCount(). The "results" parameter must contain enough space to save the results from all queries (from all devices) in the pool, i.e. resultCount * sizeof(uint64_t), must be pre-allocated. Results are ordered by device (using the deviceIndex) first and then per query, i.e., all results from a device are consecutive in memory. Data will only be written to the results array if the device actually exists, i.e., if its bit in the query's device mask is set and the device index is lower than the RHISystem's device count. The function can return partial results. In case of failure of requesting results from a specific device, only results from lower-indexed devices (which already have successfully returned results) are returned. For further details related to device-specific query functionality, please check the related header.