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

Implements a Vulkan render pass. More...

#include <vulkan.hpp>

Inherits LiteFX::Rendering::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >, and LiteFX::Resource< VkRenderPass >.

Classes

class  VulkanRenderPassImpl
 

Public Member Functions

 VulkanRenderPass (const VulkanDevice &device, Span< RenderTarget > renderTargets, const UInt32 &commandBuffers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, Span< VulkanInputAttachmentMapping > inputAttachments={ })
 Creates and initializes a new Vulkan render pass instance. More...
 
 VulkanRenderPass (const VulkanDevice &device, const String &name, Span< RenderTarget > renderTargets, const UInt32 &commandBuffers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, Span< VulkanInputAttachmentMapping > inputAttachments={ })
 Creates and initializes a new Vulkan render pass instance. More...
 
 VulkanRenderPass (const VulkanRenderPass &)=delete
 
 VulkanRenderPass (VulkanRenderPass &&)=delete
 
virtual ~VulkanRenderPass () noexcept
 
virtual const VulkanFrameBufferframeBuffer (const UInt32 &buffer) const override
 Returns the frame buffer with the index provided in buffer . More...
 
virtual const VulkanDevicedevice () const noexcept
 Returns a reference to the device that provides this queue. More...
 
virtual const VulkanFrameBufferactiveFrameBuffer () const override
 Returns the current frame buffer from of the render pass. More...
 
virtual Array< const VulkanFrameBuffer * > frameBuffers () const noexcept override
 
virtual Array< const VulkanRenderPipeline * > 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 VulkanInputAttachmentMappinginputAttachments () 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 VulkanDescriptorSet &descriptorSet) const override
 
- Public Member Functions inherited from LiteFX::Rendering::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >
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< VulkanFrameBuffer >
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...
 
- Public Member Functions inherited from LiteFX::Resource< VkRenderPass >
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
virtual ~Resource () noexcept=default
 
const VkRenderPass & handle () const noexcept override
 Returns the resource managed by the class. More...
 
- Public Member Functions inherited from LiteFX::IResource< VkRenderPass >
virtual ~IResource () noexcept=default
 
virtual const VkRenderPass & handle () const noexcept=0
 Returns the resource managed by the class. More...
 

Additional Inherited Members

- Public Types inherited from LiteFX::Rendering::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >
using frame_buffer_type = VulkanFrameBuffer
 
using render_pipeline_type = VulkanRenderPipeline
 
using input_attachment_mapping_type = VulkanInputAttachmentMapping
 
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< VulkanFrameBuffer >
using frame_buffer_type = VulkanFrameBuffer
 
- Protected Member Functions inherited from LiteFX::Rendering::StateResource
 StateResource () noexcept
 
Stringname () noexcept
 
- Protected Member Functions inherited from LiteFX::Resource< VkRenderPass >
 Resource (const VkRenderPass handle) noexcept
 Initializes the managed resource. More...
 
VkRenderPass & handle () noexcept override
 Returns the resource managed by the class. More...
 
virtual VkRenderPass & handle () noexcept=0
 Returns the resource managed by the class. More...
 

Detailed Description

Implements a Vulkan render pass.

See also
VulkanRenderPassBuilder

Constructor & Destructor Documentation

◆ VulkanRenderPass() [1/4]

VulkanRenderPass::VulkanRenderPass ( const VulkanDevice device,
Span< RenderTarget renderTargets,
const UInt32 commandBuffers = 1,
const MultiSamplingLevel &  samples = MultiSamplingLevel::x1,
Span< VulkanInputAttachmentMapping inputAttachments = { } 
)
explicit

Creates and initializes a new Vulkan 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.

◆ VulkanRenderPass() [2/4]

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

Creates and initializes a new Vulkan 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.

◆ VulkanRenderPass() [3/4]

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

◆ VulkanRenderPass() [4/4]

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

◆ ~VulkanRenderPass()

VulkanRenderPass::~VulkanRenderPass ( )
virtualnoexcept

Member Function Documentation

◆ activeFrameBuffer()

const VulkanFrameBuffer & VulkanRenderPass::activeFrameBuffer ( ) const
overridevirtual

Returns the current frame buffer from of the render pass.

Implements LiteFX::Rendering::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >.

◆ begin()

void VulkanRenderPass::begin ( const UInt32 buffer)
overridevirtual

Begins the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ changeMultiSamplingLevel()

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

Changes the multi sampling level of the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ device()

const VulkanDevice & VulkanRenderPass::device ( ) const
virtualnoexcept

Returns a reference to the device that provides this queue.

Returns
A reference to the queue's parent device.

◆ end()

void VulkanRenderPass::end ( ) const
overridevirtual

Ends the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ frameBuffer()

const VulkanFrameBuffer & VulkanRenderPass::frameBuffer ( const UInt32 buffer) const
overridevirtual

Returns the frame buffer with the index provided in buffer .

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

◆ frameBuffers()

Array< const VulkanFrameBuffer * > VulkanRenderPass::frameBuffers ( ) const
overridevirtualnoexcept

◆ hasPresentTarget()

bool VulkanRenderPass::hasPresentTarget ( ) const
overridevirtualnoexcept

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

Implements LiteFX::Rendering::IRenderPass.

◆ inputAttachments()

Span< const VulkanInputAttachmentMapping > VulkanRenderPass::inputAttachments ( ) const
overridevirtualnoexcept

◆ multiSamplingLevel()

const MultiSamplingLevel & VulkanRenderPass::multiSamplingLevel ( ) const
overridevirtualnoexcept

Returns the input attachment the render pass is consuming.

Implements LiteFX::Rendering::IRenderPass.

◆ pipelines()

Array< const VulkanRenderPipeline * > VulkanRenderPass::pipelines ( ) const
overridevirtualnoexcept

◆ renderTarget()

const RenderTarget & VulkanRenderPass::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 > VulkanRenderPass::renderTargets ( ) const
overridevirtualnoexcept

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

Implements LiteFX::Rendering::IRenderPass.

◆ resizeFrameBuffers()

void VulkanRenderPass::resizeFrameBuffers ( const Size2d renderArea)
overridevirtual

Resets the frame buffers of the render pass.

Implements LiteFX::Rendering::IRenderPass.

◆ updateAttachments()

void VulkanRenderPass::updateAttachments ( const VulkanDescriptorSet descriptorSet) const
overridevirtual