#include <ScopeProducer.h>
Inherited by AZ::RHI::ScopeProducerEmpty, AZ::RHI::ScopeProducerFunction< UserData, PrepareFunction, CompileFunction, ExecuteFunction >, AZ::RHI::ScopeProducerFunctionNoData, AZ::RPI::ImageAttachmentCopy, AZ::RPI::ImageAttachmentPreviewPass, AZ::RPI::RenderPass, AZ::Render::DepthOfFieldCopyFocusDepthToCpuPass, and AZ::Render::RayTracingAccelerationStructurePass.
Public Member Functions | |
| ScopeProducer (const ScopeId &scopeId, int deviceIndex=MultiDevice::InvalidDeviceIndex) | |
| const ScopeId & | GetScopeId () const |
| Returns the scope id associated with this scope producer. | |
| const Scope * | GetScope () const |
| Returns the scope associated with this scope producer. | |
| virtual int | GetDeviceIndex () const |
Protected Member Functions | |
| ScopeProducer () | |
| void | SetHardwareQueueClass (HardwareQueueClass hardwareQueueClass) |
| Sets the HardwareQueueClass on the scope. | |
| void | SetScopeId (const ScopeId &scopeId) |
| void | InitScope (const ScopeId &scopeId, HardwareQueueClass hardwareQueueClass=HardwareQueueClass::Graphics, int deviceIndex=MultiDevice::InvalidDeviceIndex) |
Friends | |
| class | FrameScheduler |
ScopeProducer is the base class for systems which produce scopes on the frame scheduler. The user is expected to inherit from this class and implement three virtual methods:
EXAMPLE:
class MyScope : public RHI::ScopeProducer { public: MyScope() : RHI::ScopeProducer(RHI::ScopeId{"MyScopeId"}) {}
private: void SetupFrameGraphDependencies(FrameGraphInterface frameGraph) override { // Create attachments on the builder, use them. }
void CompileResources(const FrameGraphCompileContext& context) override { // Use the provided context to access image / buffer views and // build ShaderResourceGroups. }
void BuildCommandList(const FrameGraphExecuteContext& context) override { // A context is provided which allows you to access the command // list for execution. } };
MyScope scope;
// Register with the scheduler each frame. Callbacks will be // invoked. frameScheduler.AddScope(scope);
|
protected |
Protected default constructor for classes that inherit from ScopeProducer but that can't supply a ScopeId at construction.
|
virtual |
Returns the device index of the device the scope should run on. May return InvalidDeviceIndex to signal that no device index is specified.
|
protected |
Initializes the scope with a ScopeId, HardwareQueueClass and device index. Used by classes that inherit from ScopeProducer but can't supply a ScopeId at construction.
|
protected |
DEPRECATED.