XII Release 0.1.0
Loading...
Searching...
No Matches
xiiRenderPipelinePassBase Class Referenceabstract

Base class for render pipeline passes within a data-driven render graph system. More...

#include <RenderPipelinePass.h>

Inheritance diagram for xiiRenderPipelinePassBase:
[legend]

Public Member Functions

 xiiRenderPipelinePassBase (xiiStringView sName, xiiBitflags< xiiRenderPipelinePassCapabilityFlags > capabilityFlags)
 Constructor to define a named render pass with required capability flags.
 
virtual ~xiiRenderPipelinePassBase ()
 Virtual destructor.
 
void SetName (xiiStringView sName)
 Assigns the user-visible name of the pass.
 
void SetPassFlags (xiiBitflags< xiiRenderPipelinePassFlags > flags)
 Sets additional flags that describe how the pass behaves or should be scheduled.
 
void SetPassConcurrencyHint (xiiEnum< xiiRenderPipelinePassConcurrencyHint > concurrencyHint)
 Provides a hint to the graph scheduler regarding parallel execution potential.
 
virtual xiiResult Serialize (xiiStreamWriter &inout_stream) const
 Serializes the internal pass configuration (not resource or runtime state).
 
virtual xiiResult Deserialize (xiiStreamReader &inout_stream)
 Restores the internal pass configuration from serialized data.
 
virtual xiiResult GetResourceDescriptions (const xiiView &view, const xiiArrayPtr< xiiRenderPipelinePassResource *const > pInputs, xiiArrayPtr< xiiRenderPipelinePassResource > pOutputs)=0
 Must be implemented by each pass to describe the GPU resources it requires on its output pins.
 
virtual xiiResult InitializeRenderPipelinePass (const xiiView &view, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pInputs, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pOutputs)
 Called once before the first execution to allow the pass to initialize itself based on the graph and view context.
 
virtual xiiSharedPtr< xiiGALDeviceObjectQueryResourceProvider (const xiiRenderPipelineNodePin *pPin, const xiiRenderPipelineResourceRequest &request)
 Allows a pass to override resource creation for one of its outputs, typically to reuse or share GPU resources.
 
virtual void Execute (const xiiRenderViewContext &renderViewContext, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pInputs, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pOutputs)=0
 Must be implemented by derived classes to perform the pass's actual rendering or processing logic.
 
virtual void ExecuteInactive (const xiiRenderViewContext &renderViewContext, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pInputs, const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pOutputs)
 Called instead of Execute() if the pass is inactive (e.g., temporarily disabled or culled).
 
virtual void ReadBackProperties (xiiView *pView)
 Allows the pass to update scene or view properties after rendering (e.g., exposure, feedback).
 
XII_ALWAYS_INLINE xiiStringView GetName () const
 Returns the name of this render-pipeline pass.
 
XII_ALWAYS_INLINE xiiBitflags< xiiRenderPipelinePassCapabilityFlagsGetCapabilityFlags () const
 Retrieves the render pipeline pass capability flags.
 
XII_ALWAYS_INLINE xiiBitflags< xiiRenderPipelinePassFlagsGetPassFlags () const
 Returns the bitmask of flags describing this render-pipeline pass.
 
XII_ALWAYS_INLINE xiiEnum< xiiRenderPipelinePassConcurrencyHintGetPassConcurrencyHint () const
 Retrieves the concurrency hint for scheduling this render-pipeline pass.
 
XII_ALWAYS_INLINE bool IsStereoAware () const
 Determines whether this pass correctly handles stereo/XR rendering.
 
XII_ALWAYS_INLINE xiiRenderPipelineGetPipeline ()
 Retrieves the owning render pipeline for this pass.
 
XII_ALWAYS_INLINE const xiiRenderPipelineGetPipeline () const
 Retrieves the owning render pipeline for this pass (const overload).
 
- Public Member Functions inherited from xiiRenderPipelineNode
void InitializePins ()
 Populates the internal arrays of input and output pins.
 
xiiHashedString GetPinName (const xiiRenderPipelineNodePin *pPin) const
 Returns the hashed name associated with a given pin.
 
const xiiRenderPipelineNodePinGetPinByName (xiiStringView sName) const
 Finds a pin by its string name.
 
const xiiRenderPipelineNodePinGetPinByName (xiiHashedString sName) const
 Finds a pin by its hashed name.
 
XII_ALWAYS_INLINE const xiiArrayPtr< const xiiRenderPipelineNodePin *const > GetInputPins () const
 Retrieves all input pins of this node.
 
XII_ALWAYS_INLINE const xiiArrayPtr< const xiiRenderPipelineNodePin *const > GetOutputPins () const
 Retrieves all output pins of this node.
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Friends

class xiiRenderPipeline
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 

Detailed Description

Base class for render pipeline passes within a data-driven render graph system.

Each render pass defines its inputs, outputs, capabilities, and runtime execution logic. This class handles naming, serialization, and interaction with the render pipeline compiler.

Passes are responsible for describing their resource requirements, initializing resources and logic based on resolved graph connections, and executing their logic during render view processing.

Derive from this class to implement custom rendering functionality.

See also
xiiRenderPipelineNode, xiiRenderPipelinePassConnection, xiiRenderPipelinePassResource

Constructor & Destructor Documentation

◆ xiiRenderPipelinePassBase()

xiiRenderPipelinePassBase::xiiRenderPipelinePassBase ( xiiStringView sName,
xiiBitflags< xiiRenderPipelinePassCapabilityFlags > capabilityFlags )

Constructor to define a named render pass with required capability flags.

Parameters
sName- The name identifier of the pass (used for debugging and editor integration).
capabilityFlags- Declares what features this pass supports (e.g., stereo-aware, subpass fusion).

Member Function Documentation

◆ Deserialize()

◆ Execute()

◆ ExecuteInactive()

void xiiRenderPipelinePassBase::ExecuteInactive ( const xiiRenderViewContext & renderViewContext,
const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pInputs,
const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pOutputs )
virtual

Called instead of Execute() if the pass is inactive (e.g., temporarily disabled or culled).

Can be used for non-draw side effects such as animation updates or property blending.

◆ GetName()

XII_ALWAYS_INLINE xiiStringView xiiRenderPipelinePassBase::GetName ( ) const
inline

Returns the name of this render-pipeline pass.

Returns
A string view of the pass's name.

◆ GetPipeline() [1/2]

XII_ALWAYS_INLINE xiiRenderPipeline * xiiRenderPipelinePassBase::GetPipeline ( )
inline

Retrieves the owning render pipeline for this pass.

Use this to query pipeline-level resources or state from within a pass implementation.

Returns
A pointer to the parent xiiRenderPipeline instance.

◆ GetPipeline() [2/2]

XII_ALWAYS_INLINE const xiiRenderPipeline * xiiRenderPipelinePassBase::GetPipeline ( ) const
inline

Retrieves the owning render pipeline for this pass (const overload).

Allows read-only access to pipeline state from const contexts.

Returns
A const pointer to the parent xiiRenderPipeline instance.

◆ GetResourceDescriptions()

virtual xiiResult xiiRenderPipelinePassBase::GetResourceDescriptions ( const xiiView & view,
const xiiArrayPtr< xiiRenderPipelinePassResource *const > pInputs,
xiiArrayPtr< xiiRenderPipelinePassResource > pOutputs )
pure virtual

◆ InitializeRenderPipelinePass()

xiiResult xiiRenderPipelinePassBase::InitializeRenderPipelinePass ( const xiiView & view,
const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pInputs,
const xiiArrayPtr< xiiRenderPipelinePassConnection *const > pOutputs )
virtual

Called once before the first execution to allow the pass to initialize itself based on the graph and view context.

This is typically used to:

  • Resolve input/output resource handles from connections.
  • Cache relevant view properties.
  • Prepare internal state (e.g., sampler bindings, descriptor layouts).

Reimplemented in xiiCreateColourAttachmentPass, xiiCreateDepthAttachmentPass, xiiFrameConstantsPass, and xiiPickingRenderPass.

◆ IsStereoAware()

XII_ALWAYS_INLINE bool xiiRenderPipelinePassBase::IsStereoAware ( ) const
inline

Determines whether this pass correctly handles stereo/XR rendering.

When true, the pipeline will invoke this pass once per eye and bind separate per-eye resources as needed.

Returns
true if the pass is stereo-aware, false otherwise.

◆ QueryResourceProvider()

xiiSharedPtr< xiiGALDeviceObject > xiiRenderPipelinePassBase::QueryResourceProvider ( const xiiRenderPipelineNodePin * pPin,
const xiiRenderPipelineResourceRequest & request )
virtual

Allows a pass to override resource creation for one of its outputs, typically to reuse or share GPU resources.

If a non-null shared pointer is returned, it will be used instead of the default resource construction logic. Returning nullptr delegates resource creation to the graph compiler or the default allocator.

Reimplemented in xiiHistoryBufferSourcePass, xiiHistoryBufferTargetPass, xiiHistoryColourAttachmentSourcePass, xiiHistoryColourAttachmentTargetPass, xiiHistoryDepthAttachmentSourcePass, xiiHistoryDepthAttachmentTargetPass, and xiiTargetPass.

◆ ReadBackProperties()

void xiiRenderPipelinePassBase::ReadBackProperties ( xiiView * pView)
virtual

Allows the pass to update scene or view properties after rendering (e.g., exposure, feedback).

Reimplemented in xiiPickingRenderPass.

◆ Serialize()


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