|
| AZ_CLASS_ALLOCATOR (MultiDeviceQueryPool, AZ::SystemAllocator, 0) |
|
Ptr< QueryPool > | GetDeviceQueryPool (int deviceIndex) const |
| Returns the device-specific QueryPool for the given index.
|
|
ResultCode | Init (MultiDevice::DeviceMask deviceMask, const QueryPoolDescriptor &descriptor) |
| Initialize the MultiDeviceQueryPool by initializing all device-specific QueryPools for each device mentioned in the deviceMask.
|
|
ResultCode | InitQuery (MultiDeviceQuery *query) |
|
ResultCode | InitQuery (MultiDeviceQuery **queries, uint32_t queryCount) |
|
uint32_t | CalculateResultsCount (uint32_t queryCount=0) |
|
ResultCode | GetResults (uint64_t *results, uint32_t resultsCount, QueryResultFlagBits flags) |
|
ResultCode | GetResults (MultiDeviceQuery *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 (MultiDeviceQuery **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 (MultiDeviceResourcePool, "{BAE5442C-A312-4133-AE80-1200753A7C3E}", MultiDeviceObject) |
|
virtual void | Shutdown () override=0 |
| Shuts down the pool. This method will shutdown all resources associated with the pool.
|
|
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.
|
|
virtual const ResourcePoolDescriptor & | GetDescriptor () const =0 |
| Returns the resource pool descriptor.
|
|
| AZ_RTTI (MultiDeviceObject, "{17D34F71-944C-4AF5-9823-627474C4C0A6}", Object) |
|
bool | IsInitialized () const |
| Returns whether the device object is initialized.
|
|
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.
|
|
|
using | PlatformMethod = AZStd::function< RHI::ResultCode()> |
| //!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//!//
|
|
ResultCode | Init (MultiDevice::DeviceMask deviceMask, const PlatformMethod &initMethod) |
|
ResultCode | InitResource (MultiDeviceResource *resource, const PlatformMethod &initResourceMethod) |
|
bool | ValidateIsRegistered (const MultiDeviceResource *resource) const |
|
bool | ValidateIsUnregistered (const MultiDeviceResource *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.
|
|
void | Shutdown () override |
| Clears the current bound device to null.
|
|
template<typename T > |
void | IterateDevices (T callback) |
| Helper method that will iterate over all selected devices and call the provided callback.
|
|
void | add_ref () const |
|
void | release () const |
|
AZStd::atomic_int | m_useCount = 0 |
|
MultiDeviceQueryPool 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::MultiDeviceQueryPool::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.