Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
AZ::RHI::Scope Class Reference

#include <Scope.h>

Inherits AZ::RHI::Object.

Public Member Functions

 AZ_RTTI (Scope, "{C9EB500A-EF31-46E2-98DE-62396CDBAFB1}", Object)
 
bool IsInitialized () const
 Returns whether the scope is currently initialized.
 
bool IsActive () const
 Returns whether the scope is currently active on a frame.
 
const ScopeId & GetId () const
 Returns the scope id associated with this scope.
 
uint32_t GetIndex () const
 
const GraphGroupIdGetFrameGraphGroupId () const
 Returns the id of the graph group this scope belongs.
 
const FrameGraphGetFrameGraph () const
 Returns the frame graph instance which owns this scope.
 
HardwareQueueClass GetHardwareQueueClass () const
 Returns the hardware queue class for this scope.
 
void SetHardwareQueueClass (HardwareQueueClass hardwareQueueClass)
 Sets the hardware queue class for this scope.
 
uint32_t GetEstimatedItemCount () const
 
ScopeGetProducerByQueue (HardwareQueueClass hardwareQueueClass) const
 Returns the scope for the given hardware queue which must be scheduled immediately prior to this scope (can be null).
 
ScopeGetProducerOnSameQueue () const
 Returns the scope for the producer on the same hardware queue as us.
 
ScopeGetConsumerByQueue (HardwareQueueClass hardwareQueueClass) const
 Returns the scope for the given hardware queue which must be scheduled immediately after this scope (can be null).
 
ScopeGetConsumerOnSameQueue () const
 Returns the scope for the consumer on the same hardware queue as us.
 
const AZStd::vector< ScopeAttachment * > & GetAttachments () const
 Returns a list of attachments on this scope.
 
const AZStd::vector< ScopeAttachment * > & GetTransientAttachments () const
 Returns a list of attachments which reference transient resources on this scope.
 
const AZStd::vector< ImageScopeAttachment * > & GetImageAttachments () const
 Returns a list of all image scope attachments.
 
const AZStd::vector< ResolveScopeAttachment * > & GetResolveAttachments () const
 Returns a list of all resolve scope attachments.
 
const AZStd::vector< BufferScopeAttachment * > & GetBufferAttachments () const
 Returns a list of all buffer scope attachments.
 
const AZStd::vector< ResourcePoolResolver * > & GetResourcePoolResolves () const
 Returns a list of resource pools requiring a resolve operation.
 
const AZStd::vector< SwapChain * > & GetSwapChainsToPresent () const
 Returns a list of swap chains which require presentation at the end of the scope.
 
const AZStd::vector< Ptr< Fence > > & GetFencesToSignal () const
 Returns a list of fences to signal on completion of the scope.
 
void Init (const ScopeId &scopeId, HardwareQueueClass hardwareQueueClass=HardwareQueueClass::Graphics)
 Initializes the scope.
 
void Activate (const FrameGraph *frameGraph, uint32_t index, const GraphGroupId &groupId)
 Activates the scope for the current frame.
 
void Compile (Device &device)
 Called when the scope is being compiled at the end of the graph-building phase.
 
void Deactivate ()
 Deactivates the scope for the current frame.
 
void Shutdown () override final
 Shuts down the scope.
 
void QueueResourcePoolResolves (ResourcePoolDatabase &resourcePoolDatabase)
 
ScopeFindCapableCrossQueueProducer (HardwareQueueClass hardwareQueueClass)
 Finds a producer for this scope that is at least as capable as the provided queue class.
 
ScopeFindMoreCapableCrossQueueProducer ()
 Finds a producer for this scope from a more capable queue.
 
ScopeFindCrossQueueProducer (HardwareQueueClass hardwareQueueClass)
 Finds a producer for this scope from a specific queue class.
 
void AddFenceToSignal (Ptr< Fence > fence)
 Adds a fence that will be signaled at the end of the scope.
 
- Public Member Functions inherited from AZ::RHI::Object
 AZ_RTTI (Object, "{E43378F1-2331-4173-94B8-990ED20E6003}")
 
void SetName (const Name &name)
 
const Name & GetName () const
 

Static Public Member Functions

static void LinkProducerConsumerByQueues (Scope *producer, Scope *consumer)
 Links the producer and consumer according to their queues.
 

Protected Member Functions

virtual void AddQueryPoolUse (Ptr< QueryPool > queryPool, const RHI::Interval &interval, RHI::ScopeAttachmentAccess access)
 Called when the scope will use a query pool during it's execution. Some platforms need this information.
 

Friends

class FrameGraph
 
class FrameGraphCompiler
 

Detailed Description

A base class for a scope in the current frame. The user is expected to derive from Scope and supply platform-specific scope data. All platform specific data should be built in CompileInternal. At that time, the client will have access to the attachment database, which it can use to compile flat arrays of platform-specific state (fences, barriers, clears, etc).

Member Function Documentation

◆ GetEstimatedItemCount()

uint32_t AZ::RHI::Scope::GetEstimatedItemCount ( ) const

Returns the estimated number of draw / dispatch / copy items that the user will submit while in this scope. This is an estimation intended to be used by the platform-specific load-balancer in the frame scheduler.

◆ GetIndex()

uint32_t AZ::RHI::Scope::GetIndex ( ) const

Returns the index in the array of scopes in FrameSchedulerBase::GetScopes. The indices are dependency ordered, so a scope with a greater index may depend on a scope from a lesser index. Scopes are often independent and even run in parallel (e.g. async compute / copy).

◆ QueueResourcePoolResolves()

void AZ::RHI::Scope::QueueResourcePoolResolves ( ResourcePoolDatabase resourcePoolDatabase)

Queues resource pool resolves for queued upload operations from the resource pool database. operation will pull all of the resource pool resolvers from the database and queue them onto this scope. This should only occur once in the frame on the root scope.


The documentation for this class was generated from the following file: