NDEVR
API Documentation
VulkanRenderPipeline

A GraphicsPipeline that renders a single Viewport for Vulkan. More...

Inheritance diagram for VulkanRenderPipeline:
[legend]
Collaboration diagram for VulkanRenderPipeline:
[legend]

Classes

struct  PipelineSemaphore
 A semaphore paired with an active flag for pipeline synchronization. More...
struct  PipelineSemaphores
 Paired acquire and finish semaphores for a single frame in the render pipeline. More...
struct  SwapChainSupportDetails
 Details about swap chain support on a physical device. More...

Public Member Functions

void cleanResources () override
 Cleans up stale or unused GPU resources.
void cleanup () override
 Releases all GPU resources.
bool createPipeline (GraphicsUpdateArguments &args) override
 Creates or recreates the rendering pipeline.
virtual const ConstPointer< GraphicsDevice > & device () const override
 Returns the graphics device (const).
const DynamicPointer< GraphicsDevice > & device () override
 Returns the graphics device.
virtual void drawFrame (GraphicsUpdateArguments &args) override
 Renders a single frame.
void ensureLastRenderComplete () override
 Blocks until the last submitted render is complete.
void init (GraphicsUpdateArguments &args) override
 Initializes the pipeline with the given arguments.
bool runCommand (GraphicsUpdateArguments &args) override
 Executes a queued rendering command.
void setWindowInstance (WindowInstance *instance) override
 Associates a window instance with this pipeline.
Public Member Functions inherited from GraphicsPipeline
virtual ~GraphicsPipeline ()
 Destructor.

Protected Member Functions

virtual void commit (GraphicsUpdateArguments &) override
 Commits pending changes to the GPU.
virtual bool hasCommand () const override
 Checks whether there are pending commands to execute.
virtual void updateUniformBuffer (GraphicsUpdateArguments &) override
 Updates the camera uniform buffer on the GPU.

Protected Attributes

RGBColor m_clear_color
 The clear color for the render pass.
DynamicPointer< VulkanImageDatam_depth_image
 Depth buffer image.
DynamicPointer< VulkanImageViewm_depth_view
 View for the depth buffer.
DynamicPointer< VulkanDevicem_device
 The Vulkan device for this pipeline.
Vector< 2, uint04m_draw_size
 The current draw dimensions in pixels.
DynamicPointer< VulkanImageDatam_frame_grab_image
 Image used for frame readback.
Buffer< VulkanImageResourcesm_frames
 Per-frame image resources.
Imagem_grab_image
 The CPU-side image for frame readback.
bool m_is_init
 Whether the pipeline has been initialized.
uint08 m_khr_format
 The KHR swap chain image format as an integer.
VkSwapchainKHR m_khr_swap_chain
 The KHR swap chain handle.
uint04 m_last_image_idx
 The index of the last acquired swap chain image.
DynamicPointer< VulkanImageDatam_multisample_image_color
 Multisample color resolve image.
DynamicPointer< VulkanImageViewm_multisample_view_color
 View for the multisample color image.
bool m_needs_cleanup
 Whether a cleanup pass is needed.
bool m_needs_grab_image
 Whether a grab image readback is pending.
bool m_needs_pipeline_recreation
 Whether the pipeline needs to be recreated.
uint04 m_number_of_grab_images = 0
 The number of grab image resources.
uint04 m_number_of_khr_images = 0
 The number of KHR swap chain images.
uint04 m_pipeline_acquire = 0
 The current acquire index for semaphore cycling.
VkQueue_T * m_present_queue = nullptr
 The Vulkan queue used for presentation.
DynamicPointer< VulkanRenderDefinitionm_render_definition
 The render pass definition.
Buffer< PipelineSemaphoresm_semaphores
 Semaphores for each frame in flight.
VulkanSessionm_session
 The owning Vulkan session.
DynamicPointer< VulkanImageDatam_shadow_image
 Shadow map image.
DynamicPointer< VulkanImageViewm_shadow_view
 View for the shadow map.
bool m_suboptimal_khr
 Whether the KHR swap chain is suboptimal.
VkSurfaceKHR m_surface
 The Vulkan surface for this pipeline.
Time m_surface_update_time
 The last time the surface was updated.
ConstPointer< SwapChainSupportDetailsm_swap_chain_support_details
 Cached swap chain support details.
WindowInstancem_window_instance
 The window instance this pipeline renders to.

Detailed Description

A GraphicsPipeline that renders a single Viewport for Vulkan.


Definition at line 57 of file VulkanRenderPipeline.h.

Member Function Documentation

◆ commit()

virtual void VulkanRenderPipeline::commit ( GraphicsUpdateArguments & args)
inlineoverrideprotectedvirtual

Commits pending changes to the GPU.

Parameters
[in]argsThe update arguments.

Implements GraphicsPipeline.

Definition at line 132 of file VulkanRenderPipeline.h.

◆ createPipeline()

bool VulkanRenderPipeline::createPipeline ( GraphicsUpdateArguments & args)
overridevirtual

Creates or recreates the rendering pipeline.

Parameters
[in]argsThe update arguments.
Returns
True if the pipeline was created successfully.

Implements GraphicsPipeline.

◆ device() [1/2]

virtual const ConstPointer< GraphicsDevice > & VulkanRenderPipeline::device ( ) const
overridevirtual

Returns the graphics device (const).

Returns
Const reference to the device pointer.

Implements GraphicsPipeline.

Referenced by ensureLastRenderComplete().

◆ device() [2/2]

const DynamicPointer< GraphicsDevice > & VulkanRenderPipeline::device ( )
overridevirtual

Returns the graphics device.

Returns
Reference to the device pointer.

Implements GraphicsPipeline.

◆ drawFrame()

virtual void VulkanRenderPipeline::drawFrame ( GraphicsUpdateArguments & args)
overridevirtual

Renders a single frame.

Parameters
[in]argsThe update arguments.

Implements GraphicsPipeline.

◆ hasCommand()

virtual bool VulkanRenderPipeline::hasCommand ( ) const
inlineoverrideprotectedvirtual

Checks whether there are pending commands to execute.

Returns
True if commands are pending.

Implements GraphicsPipeline.

Definition at line 134 of file VulkanRenderPipeline.h.

◆ init()

void VulkanRenderPipeline::init ( GraphicsUpdateArguments & args)
overridevirtual

Initializes the pipeline with the given arguments.

Parameters
[in]argsThe update arguments.

Implements GraphicsPipeline.

◆ runCommand()

bool VulkanRenderPipeline::runCommand ( GraphicsUpdateArguments & args)
overridevirtual

Executes a queued rendering command.

Parameters
[in]argsThe update arguments.
Returns
True if a command was executed.

Implements GraphicsPipeline.

◆ setWindowInstance()

void VulkanRenderPipeline::setWindowInstance ( WindowInstance * instance)
overridevirtual

Associates a window instance with this pipeline.

Parameters
[in]instanceThe window instance.

Implements GraphicsPipeline.

◆ updateUniformBuffer()

virtual void VulkanRenderPipeline::updateUniformBuffer ( GraphicsUpdateArguments & args)
inlineoverrideprotectedvirtual

Updates the camera uniform buffer on the GPU.

Parameters
[in]argsThe update arguments.

Implements GraphicsPipeline.

Definition at line 133 of file VulkanRenderPipeline.h.


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