#include <PipelineLibrary.h>
Inherits AZ::RHI::MultiDeviceObject.
|
|
| AZ_CLASS_ALLOCATOR (PipelineLibrary, AZ::SystemAllocator, 0) |
| |
|
| AZ_RTTI (PipelineLibrary, "{B48B6A46-5976-4D7D-AA14-2179D871C567}") |
| |
|
| AZ_RHI_MULTI_DEVICE_OBJECT_GETTER (PipelineLibrary) |
| |
| ResultCode | Init (MultiDevice::DeviceMask deviceMask, const PipelineLibraryDescriptor &descriptor) |
| |
| ResultCode | MergeInto (AZStd::span< const PipelineLibrary *const > librariesToMerge) |
| |
| auto | GetSerializedDataMap () const |
| |
| bool | SaveSerializedData (const AZStd::unordered_map< int, AZStd::string > &filePaths) const |
| |
| virtual bool | IsMergeRequired () const |
| |
|
| 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) |
| |
|
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 |
| |
PipelineLibrary is a multi-device class (representing a DevicePipelineLibrary on multiple devices). It holds a map of device-specific DevicePipelineLibrary objects, which can be addressed with a device index. The class is initialized with a device mask (1 bit per device), which initializes one DevicePipelineLibrary for each bit set and stores them in a map. The API then forwards all calls to the all device-specific DevicePipelineLibrary objects by iterating over them and forwarding the call. A device-specific DevicePipelineLibrary can be accessed by calling GetDevicePipelineLibrary with the corresponding device index
◆ GetSerializedDataMap()
| auto AZ::RHI::PipelineLibrary::GetSerializedDataMap |
( |
| ) |
const |
|
inline |
Serializes the platform-specific data and returns it as a new PipelineLibraryData instance for a specific device
- Parameters
-
| deviceIndex | Denotes from which device the serialized data should be retrieved |
◆ Init()
| ResultCode AZ::RHI::PipelineLibrary::Init |
( |
MultiDevice::DeviceMask |
deviceMask, |
|
|
const PipelineLibraryDescriptor & |
descriptor |
|
) |
| |
◆ IsMergeRequired()
| virtual bool AZ::RHI::PipelineLibrary::IsMergeRequired |
( |
| ) |
const |
|
virtual |
Returns whether the current library need to be merged Returns true if any of the device-specific DevicePipelineLibrary objects needs to be merged
◆ MergeInto()
| ResultCode AZ::RHI::PipelineLibrary::MergeInto |
( |
AZStd::span< const PipelineLibrary *const > |
librariesToMerge | ) |
|
Forwards the call to all device-specific PipelineLibraries, for each device-specific DevicePipelineLibrary, extracting the corresponding DevicePipelineLibrary(ies) from librariesToMerge and passing them on.
- Parameters
-
| librariesToMerge | A span of libraries to merge into this library |
◆ SaveSerializedData()
| bool AZ::RHI::PipelineLibrary::SaveSerializedData |
( |
const AZStd::unordered_map< int, AZStd::string > & |
filePaths | ) |
const |
Saves the platform-specific data to disk using the device-specific filePath provided. This is done through RHI backend drivers for each device.
The documentation for this class was generated from the following file:
- Gems/Atom/RHI/Code/Include/Atom/RHI/PipelineLibrary.h