LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::Backends::DirectX12RenderPass Class Reference

Implements a DirectX 12 render pass. More...

#include <dx12.hpp>

Inherits LiteFX::Rendering::RenderPass< DirectX12RenderPipeline, DirectX12FrameBuffer, DirectX12InputAttachmentMapping >.

Classes

class  DirectX12RenderPassImpl
 

Public Member Functions

 DirectX12RenderPass (const DirectX12Device &device, Span< RenderTarget > renderTargets, const UInt32 &commandBuffers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, Span< DirectX12InputAttachmentMapping > inputAttachments={ })
 Creates and initializes a new DirectX 12 render pass instance. More...
 
 DirectX12RenderPass (const DirectX12Device &device, const String &name, Span< RenderTarget > renderTargets, const UInt32 &commandBuffers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, Span< DirectX12InputAttachmentMapping > inputAttachments={ })
 Creates and initializes a new DirectX 12 render pass instance. More...
 
 DirectX12RenderPass (const DirectX12RenderPass &)=delete
 
 DirectX12RenderPass (DirectX12RenderPass &&)=delete
 
virtual ~DirectX12RenderPass () noexcept
 
virtual const DirectX12FrameBufferframeBuffer (const UInt32 &buffer) const override
 Returns the frame buffer with the index provided in buffer . More...
 
virtual const DirectX12Devicedevice () const noexcept
 Returns a reference to the device that provides this queue. More...
 
virtual const DirectX12FrameBufferactiveFrameBuffer () const override
 Returns the current frame buffer from of the render pass. More...
 
virtual Array< const DirectX12FrameBuffer * > frameBuffers () const noexcept override
 
virtual Array< const DirectX12RenderPipeline * > pipelines () const noexcept override
 
virtual const RenderTargetrenderTarget (const UInt32 &location) const override
 Returns the render target mapped to the location provided by location . More...
 
virtual Span< const RenderTargetrenderTargets () const noexcept override
 Returns the list of render targets, the render pass renders into. More...
 
virtual bool hasPresentTarget () const noexcept override
 Returns true, if one of the render targets is used for presentation on a swap chain. More...
 
virtual Span< const DirectX12InputAttachmentMappinginputAttachments () const noexcept override
 
virtual const MultiSamplingLevel & multiSamplingLevel () const noexcept override
 Returns the input attachment the render pass is consuming. More...
 
virtual void begin (const UInt32 &buffer) override
 Begins the render pass. More...
 
virtual void end () const override
 Ends the render pass. More...
 
virtual void resizeFrameBuffers (const Size2d &renderArea) override
 Resets the frame buffers of the render pass. More...
 
virtual void changeMultiSamplingLevel (const MultiSamplingLevel &samples) override
 Changes the multi sampling level of the render pass. More...
 
virtual void updateAttachments (const DirectX12DescriptorSet &descriptorSet) const override
 
- Public Member Functions inherited from LiteFX::Rendering::RenderPass< DirectX12RenderPipeline, DirectX12FrameBuffer, DirectX12InputAttachmentMapping >
virtual ~RenderPass () noexcept=default
 
virtual const frame_buffer_typeactiveFrameBuffer () const=0
 Returns the current frame buffer from of the render pass. More...
 
virtual Array< const frame_buffer_type * > frameBuffers () const noexcept=0
 
virtual Array< const render_pipeline_type * > pipelines () const noexcept=0
 
virtual Span< const input_attachment_mapping_typeinputAttachments () const noexcept=0
 
virtual void updateAttachments (const descriptor_set_type &descriptorSet) const=0
 
- Public Member Functions inherited from LiteFX::Rendering::StateResource
 StateResource (StringView name)
 Initializes a new state resource instance. More...
 
 StateResource (StateResource &&)=delete
 
 StateResource (const StateResource &)=delete
 
virtual ~StateResource () noexcept
 
virtual const Stringname () const noexcept override
 Returns the name of the resource. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IStateResource
virtual ~IStateResource () noexcept=default
 
virtual const Stringname () const noexcept=0
 Returns the name of the resource. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IRenderPass
virtual ~IRenderPass () noexcept=default
 
virtual const IFrameBufferactiveFrameBuffer () const =0
 Returns the current frame buffer from of the render pass. More...
 
Array< const IFrameBuffer * > frameBuffers () const noexcept
 Returns a list of all frame buffers. More...
 
Array< const IRenderPipeline * > pipelines () const noexcept
 Returns an array of all render pipelines, owned by the render pass. More...
 
virtual const RenderTargetrenderTarget (const UInt32 &location) const =0
 Returns the render target mapped to the location provided by location . More...
 
virtual Span< const RenderTargetrenderTargets () const noexcept=0
 Returns the list of render targets, the render pass renders into. More...
 
virtual bool hasPresentTarget () const noexcept=0
 Returns true, if one of the render targets is used for presentation on a swap chain. More...
 
virtual const MultiSamplingLevel & multiSamplingLevel () const noexcept=0
 Returns the input attachment the render pass is consuming. More...
 
virtual void begin (const UInt32 &buffer)=0
 Begins the render pass. More...
 
virtual void end () const =0
 Ends the render pass. More...
 
virtual void resizeFrameBuffers (const Size2d &renderArea)=0
 Resets the frame buffers of the render pass. More...
 
virtual void changeMultiSamplingLevel (const MultiSamplingLevel &samples)=0
 Changes the multi sampling level of the render pass. More...
 
void updateAttachments (const IDescriptorSet &descriptorSet) const
 Resolves the input attachments mapped to the render pass and updates them on the descriptor set provided with descriptorSet. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IInputAttachmentMappingSource< DirectX12FrameBuffer >
virtual ~IInputAttachmentMappingSource () noexcept=default
 
virtual const frame_buffer_typeframeBuffer (const UInt32 &buffer) const=0
 Returns the frame buffer with the index provided in buffer . More...
 

Additional Inherited Members

- Public Types inherited from LiteFX::Rendering::RenderPass< DirectX12RenderPipeline, DirectX12FrameBuffer, DirectX12InputAttachmentMapping >
using frame_buffer_type = DirectX12FrameBuffer
 
using render_pipeline_type = DirectX12RenderPipeline
 
using input_attachment_mapping_type = DirectX12InputAttachmentMapping
 
using pipeline_layout_type = render_pipeline_type::pipeline_layout_type
 
using descriptor_set_layout_type = pipeline_layout_type::descriptor_set_layout_type
 
using descriptor_set_type = descriptor_set_layout_type::descriptor_set_type
 
- Public Types inherited from LiteFX::Rendering::IInputAttachmentMappingSource< DirectX12FrameBuffer >
using frame_buffer_type = DirectX12FrameBuffer
 
- Protected Member Functions inherited from LiteFX::Rendering::StateResource
 StateResource () noexcept
 
Stringname () noexcept
 

Detailed Description

Implements a DirectX 12 render pass.

See also
DirectX12RenderPassBuilder

Constructor & Destructor Documentation

◆ DirectX12RenderPass() [1/4]

DirectX12RenderPass::DirectX12RenderPass ( const DirectX12Device device,
Span< RenderTarget renderTargets,
const UInt32 commandBuffers = 1,
const MultiSamplingLevel &  samples = MultiSamplingLevel::x1,
Span< DirectX12InputAttachmentMapping inputAttachments = { } 
)
explicit

Creates and initializes a new DirectX 12 render pass instance.

Parameters
deviceThe parent device instance.
commandBuffersThe number of command buffers in each frame buffer.
renderTargetsThe render targets that are output by the render pass.
samplesThe number of samples for the render targets in this render pass.
inputAttachmentsThe input attachments that are read by the render pass.

◆ DirectX12RenderPass() [2/4]

DirectX12RenderPass::DirectX12RenderPass ( const DirectX12Device device,
const String name,
Span< RenderTarget renderTargets,
const UInt32 commandBuffers = 1,
const MultiSamplingLevel &  samples = MultiSamplingLevel::x1,
Span< DirectX12InputAttachmentMapping inputAttachments = { } 
)
explicit

Creates and initializes a new DirectX 12 render pass instance.

Parameters
deviceThe parent device instance.
nameThe name of the render pass state resource.
commandBuffersThe number of command buffers in each frame buffer.
renderTargetsThe render targets that are output by the render pass.
samplesThe number of samples for the render targets in this render pass.
inputAttachmentsThe input attachments that are read by the render pass.

◆ DirectX12RenderPass() [3/4]

LiteFX::Rendering::Backends::DirectX12RenderPass::DirectX12RenderPass ( const DirectX12RenderPass )
delete

◆ DirectX12RenderPass() [4/4]

LiteFX::Rendering::Backends::DirectX12RenderPass::DirectX12RenderPass ( DirectX12RenderPass &&  )
delete

◆ ~DirectX12RenderPass()

DirectX12RenderPass::~DirectX12RenderPass ( )
virtualdefaultnoexcept

Member Function Documentation

◆ activeFrameBuffer()

const DirectX12FrameBuffer & DirectX12RenderPass::activeFrameBuffer ( ) const
overridevirtual

◆ begin()

void DirectX12RenderPass::begin ( const UInt32 buffer)
overridevirtual

Begins the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ changeMultiSamplingLevel()

void DirectX12RenderPass::changeMultiSamplingLevel ( const MultiSamplingLevel &  samples)
overridevirtual

Changes the multi sampling level of the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ device()

const DirectX12Device & DirectX12RenderPass::device ( ) const
virtualnoexcept

Returns a reference to the device that provides this queue.

Returns
A reference to the queue's parent device.

◆ end()

void DirectX12RenderPass::end ( ) const
overridevirtual

Ends the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ frameBuffer()

const DirectX12FrameBuffer & DirectX12RenderPass::frameBuffer ( const UInt32 buffer) const
overridevirtual

Returns the frame buffer with the index provided in buffer .

Implements LiteFX::Rendering::IInputAttachmentMappingSource< DirectX12FrameBuffer >.

◆ frameBuffers()

Array< const DirectX12FrameBuffer * > DirectX12RenderPass::frameBuffers ( ) const
overridevirtualnoexcept

◆ hasPresentTarget()

bool DirectX12RenderPass::hasPresentTarget ( ) const
overridevirtualnoexcept

Returns true, if one of the render targets is used for presentation on a swap chain.

Implements LiteFX::Rendering::IRenderPass.

◆ inputAttachments()

◆ multiSamplingLevel()

const MultiSamplingLevel & DirectX12RenderPass::multiSamplingLevel ( ) const
overridevirtualnoexcept

Returns the input attachment the render pass is consuming.

Implements LiteFX::Rendering::IRenderPass.

◆ pipelines()

◆ renderTarget()

const RenderTarget & DirectX12RenderPass::renderTarget ( const UInt32 location) const
overridevirtual

Returns the render target mapped to the location provided by location .

Implements LiteFX::Rendering::IRenderPass.

◆ renderTargets()

Span< const RenderTarget > DirectX12RenderPass::renderTargets ( ) const
overridevirtualnoexcept

Returns the list of render targets, the render pass renders into.

Implements LiteFX::Rendering::IRenderPass.

◆ resizeFrameBuffers()

void DirectX12RenderPass::resizeFrameBuffers ( const Size2d renderArea)
overridevirtual

Resets the frame buffers of the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ updateAttachments()

void DirectX12RenderPass::updateAttachments ( const DirectX12DescriptorSet descriptorSet) const
overridevirtual