API Documentation
Loading...
Searching...
No Matches
VulkanRenderPipeline Class Reference

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

#include <VulkanRenderPipeline.h>

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

Classes

struct  FrameResources
 
struct  SwapChainSupportDetails
 

Public Member Functions

void cleanResources () override
 
void cleanup () override
 
bool createPipeline (GraphicsUpdateArguments &args) override
 
virtual const ConstPointer< GraphicsDevice > & device () const override
 
const DynamicPointer< GraphicsDevice > & device () override
 
virtual void drawFrame (GraphicsUpdateArguments &args) override
 
void ensureLastRenderComplete () override
 
virtual bool executeDrawCycle (GraphicsUpdateArguments &args)
 
void getGrabImage (GraphicsUpdateArguments &args)
 
void getKHRImage (GraphicsUpdateArguments &args)
 
DynamicPointer< VulkanRenderDefinition > & getRenderDefinition ()
 
void imageWait ()
 
void init (GraphicsUpdateArguments &args) override
 
void invalidateImages ()
 
virtual bool needsRecreateSwapchain (GraphicsUpdateArguments &args)
 
void presentKHR (GraphicsUpdateArguments &args)
 
void requestRedraw ()
 
bool runCommand (GraphicsUpdateArguments &args) override
 
void setClearColor (const RGBColor &color)
 
void setDevice (const DynamicPointer< VulkanDevice > &instance)
 
void setGrabImage (Image *image)
 
void setSwapChainImageFormat (VkFormat format)
 
void setupSwapChainImages (Buffer< VkImage > &images, uint04 multisample_count)
 
void setWindowInstance (WindowInstance *instance) override
 
virtual void submitQueue (GraphicsUpdateArguments &args)
 
 VulkanRenderPipeline (const VulkanRenderPipeline &pipeline)=delete
 
 VulkanRenderPipeline (VulkanRenderPipeline &&pipeline)
 
 VulkanRenderPipeline (VulkanSession *session)
 
virtual ~VulkanRenderPipeline ()
 
- Public Member Functions inherited from GraphicsPipeline
virtual ~GraphicsPipeline ()
 

Protected Member Functions

void addReadback (GraphicsUpdateArguments &args)
 
Vector< 2, uint04chooseSwapExtent (const VkSurfaceCapabilitiesKHR &capabilities, const Vector< 2, uint04 > &requested_size)
 
VkSurfaceFormatKHR chooseSwapSurfaceFormat (const Buffer< VkSurfaceFormatKHR, uint04, ObjectAllocator< true > > &availableFormats)
 
virtual void cleanupKHR ()
 
virtual void cleanupSwapChainResources (bool clean_khr)
 
Buffer< VkClearValue, uint04, ObjectAllocator< true > > clearValues () const
 
virtual void commit (GraphicsUpdateArguments &) override
 
void createCommandBuffers ()
 
void createFrames ()
 
virtual void createSwapChainKHR (GraphicsUpdateArguments &args)
 
VkResult finishBlockingReadback (GraphicsUpdateArguments &args)
 
void getGrabImages (uint04 multisample_count)
 
virtual void getKHRImages (uint04 multisample_count)
 
virtual bool hasCommand () const override
 
virtual void lockAllImagesCommand ()
 
void lockImageCommand (VulkanImageResources &image) const
 
bool neadsSurfaceUpdate () const
 
bool needsCleanup () const
 
SwapChainSupportDetails queryKHRSupport (VkPhysicalDevice_T *device)
 
virtual void recreateSwapChainResources (GraphicsUpdateArguments &args)
 
void setMultisampleImages (GraphicsUpdateArguments &args)
 
void setShadowImages (GraphicsUpdateArguments &args)
 
void setupSurface ()
 
void setViewportImages (GraphicsUpdateArguments &args)
 
void updateFrameSize (GraphicsUpdateArguments &args)
 
virtual void updateUniformBuffer (GraphicsUpdateArguments &) override
 

Static Protected Member Functions

static fltp08 ScreenSizeAllocationFactor ()
 

Protected Attributes

RGBColor m_clear_color
 
DynamicPointer< VulkanImageDatam_depth_image
 
DynamicPointer< VulkanImageViewm_depth_view
 
DynamicPointer< VulkanDevicem_device
 
Vector< 2, uint04m_draw_size
 
DynamicPointer< VulkanImageDatam_frame_grab_image
 
Buffer< FrameResourcesm_frames
 
Imagem_grab_image
 
Buffer< VulkanImageResourcesm_grab_images
 
bool m_is_init
 
uint08 m_khr_format
 
Buffer< VulkanImageResourcesm_khr_images
 
VkSwapchainKHR m_khr_swap_chain
 
VulkanImageResourcesm_last_image
 
Time m_last_render_time
 
DynamicPointer< VulkanImageDatam_multisample_image_color
 
DynamicPointer< VulkanImageViewm_multisample_view_color
 
bool m_needs_cleanup
 
bool m_needs_grab_image
 
bool m_needs_pipeline_recreation
 
bool m_needs_screen_draw
 
uint04 m_number_of_grab_images
 
DynamicPointer< VulkanRenderDefinitionm_render_definition
 
VulkanSessionm_session
 
DynamicPointer< VulkanImageDatam_shadow_image
 
DynamicPointer< VulkanImageViewm_shadow_view
 
bool m_suboptimal_khr
 
VkSurfaceKHR m_surface
 
Time m_surface_update_time
 
ConstPointer< SwapChainSupportDetailsm_swap_chain_support_details
 
WindowInstance * m_window_instance
 

Detailed Description

A GraphicsPipeline that renders a single Viewport for Vulkan.


Constructor & Destructor Documentation

◆ VulkanRenderPipeline() [1/3]

◆ VulkanRenderPipeline() [2/3]

◆ VulkanRenderPipeline() [3/3]

VulkanRenderPipeline ( const VulkanRenderPipeline & pipeline)
delete

◆ ~VulkanRenderPipeline()

virtual ~VulkanRenderPipeline ( )
virtual

Member Function Documentation

◆ addReadback()

void addReadback ( GraphicsUpdateArguments & args)
protected

◆ chooseSwapExtent()

Vector< 2, uint04 > chooseSwapExtent ( const VkSurfaceCapabilitiesKHR & capabilities,
const Vector< 2, uint04 > & requested_size )
protected

◆ chooseSwapSurfaceFormat()

VkSurfaceFormatKHR chooseSwapSurfaceFormat ( const Buffer< VkSurfaceFormatKHR, uint04, ObjectAllocator< true > > & availableFormats)
protected

◆ cleanResources()

void cleanResources ( )
overridevirtual

Implements GraphicsPipeline.

◆ cleanup()

void cleanup ( )
overridevirtual

Implements GraphicsPipeline.

◆ cleanupKHR()

virtual void cleanupKHR ( )
protectedvirtual

Reimplemented in XRVulkanPipeline.

◆ cleanupSwapChainResources()

virtual void cleanupSwapChainResources ( bool clean_khr)
protectedvirtual

◆ clearValues()

Buffer< VkClearValue, uint04, ObjectAllocator< true > > clearValues ( ) const
nodiscardprotected

◆ commit()

virtual void commit ( GraphicsUpdateArguments & )
inlineoverrideprotectedvirtual

Implements GraphicsPipeline.

◆ createCommandBuffers()

void createCommandBuffers ( )
protected

◆ createFrames()

void createFrames ( )
protected

◆ createPipeline()

bool createPipeline ( GraphicsUpdateArguments & args)
overridevirtual

Implements GraphicsPipeline.

◆ createSwapChainKHR()

virtual void createSwapChainKHR ( GraphicsUpdateArguments & args)
protectedvirtual

Reimplemented in XRVulkanPipeline.

◆ device() [1/2]

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

Implements GraphicsPipeline.

◆ device() [2/2]

const DynamicPointer< GraphicsDevice > & device ( )
overridevirtual

Implements GraphicsPipeline.

◆ drawFrame()

virtual void drawFrame ( GraphicsUpdateArguments & args)
overridevirtual

Implements GraphicsPipeline.

◆ ensureLastRenderComplete()

void ensureLastRenderComplete ( )
overridevirtual

Implements GraphicsPipeline.

◆ executeDrawCycle()

virtual bool executeDrawCycle ( GraphicsUpdateArguments & args)
virtual

Reimplemented in XRVulkanPipeline.

◆ finishBlockingReadback()

VkResult finishBlockingReadback ( GraphicsUpdateArguments & args)
protected

◆ getGrabImage()

void getGrabImage ( GraphicsUpdateArguments & args)

◆ getGrabImages()

void getGrabImages ( uint04 multisample_count)
protected

◆ getKHRImage()

void getKHRImage ( GraphicsUpdateArguments & args)

◆ getKHRImages()

virtual void getKHRImages ( uint04 multisample_count)
protectedvirtual

Reimplemented in XRVulkanPipeline.

◆ getRenderDefinition()

DynamicPointer< VulkanRenderDefinition > & getRenderDefinition ( )

◆ hasCommand()

virtual bool hasCommand ( ) const
inlineoverrideprotectedvirtual

Implements GraphicsPipeline.

◆ imageWait()

void imageWait ( )

◆ init()

void init ( GraphicsUpdateArguments & args)
overridevirtual

Implements GraphicsPipeline.

◆ invalidateImages()

void invalidateImages ( )

◆ lockAllImagesCommand()

virtual void lockAllImagesCommand ( )
protectedvirtual

Reimplemented in XRVulkanPipeline.

◆ lockImageCommand()

void lockImageCommand ( VulkanImageResources & image) const
protected

◆ neadsSurfaceUpdate()

bool neadsSurfaceUpdate ( ) const
protected

◆ needsCleanup()

bool needsCleanup ( ) const
inlineprotected

◆ needsRecreateSwapchain()

virtual bool needsRecreateSwapchain ( GraphicsUpdateArguments & args)
virtual

Reimplemented in XRVulkanPipeline.

◆ presentKHR()

void presentKHR ( GraphicsUpdateArguments & args)

◆ queryKHRSupport()

SwapChainSupportDetails queryKHRSupport ( VkPhysicalDevice_T * device)
protected

◆ recreateSwapChainResources()

virtual void recreateSwapChainResources ( GraphicsUpdateArguments & args)
protectedvirtual

Reimplemented in XRVulkanPipeline.

◆ requestRedraw()

void requestRedraw ( )

◆ runCommand()

bool runCommand ( GraphicsUpdateArguments & args)
overridevirtual

Implements GraphicsPipeline.

◆ ScreenSizeAllocationFactor()

static fltp08 ScreenSizeAllocationFactor ( )
staticprotected

◆ setClearColor()

void setClearColor ( const RGBColor & color)

◆ setDevice()

void setDevice ( const DynamicPointer< VulkanDevice > & instance)

◆ setGrabImage()

void setGrabImage ( Image * image)

◆ setMultisampleImages()

void setMultisampleImages ( GraphicsUpdateArguments & args)
protected

◆ setShadowImages()

void setShadowImages ( GraphicsUpdateArguments & args)
protected

◆ setSwapChainImageFormat()

void setSwapChainImageFormat ( VkFormat format)

◆ setupSurface()

void setupSurface ( )
protected

◆ setupSwapChainImages()

void setupSwapChainImages ( Buffer< VkImage > & images,
uint04 multisample_count )

◆ setViewportImages()

void setViewportImages ( GraphicsUpdateArguments & args)
protected

◆ setWindowInstance()

void setWindowInstance ( WindowInstance * instance)
overridevirtual

Implements GraphicsPipeline.

◆ submitQueue()

virtual void submitQueue ( GraphicsUpdateArguments & args)
virtual

Reimplemented in XRVulkanPipeline.

◆ updateFrameSize()

void updateFrameSize ( GraphicsUpdateArguments & args)
protected

◆ updateUniformBuffer()

virtual void updateUniformBuffer ( GraphicsUpdateArguments & )
inlineoverrideprotectedvirtual

Implements GraphicsPipeline.

Member Data Documentation

◆ m_clear_color

RGBColor m_clear_color
protected

◆ m_depth_image

DynamicPointer<VulkanImageData> m_depth_image
protected

◆ m_depth_view

DynamicPointer<VulkanImageView> m_depth_view
protected

◆ m_device

DynamicPointer<VulkanDevice> m_device
protected

◆ m_draw_size

Vector<2, uint04> m_draw_size
protected

◆ m_frame_grab_image

DynamicPointer<VulkanImageData> m_frame_grab_image
protected

◆ m_frames

Buffer<FrameResources> m_frames
protected

◆ m_grab_image

Image* m_grab_image
protected

◆ m_grab_images

Buffer<VulkanImageResources> m_grab_images
protected

◆ m_is_init

bool m_is_init
protected

◆ m_khr_format

uint08 m_khr_format
protected

◆ m_khr_images

Buffer<VulkanImageResources> m_khr_images
protected

◆ m_khr_swap_chain

VkSwapchainKHR m_khr_swap_chain
protected

◆ m_last_image

VulkanImageResources* m_last_image
protected

◆ m_last_render_time

Time m_last_render_time
protected

◆ m_multisample_image_color

DynamicPointer<VulkanImageData> m_multisample_image_color
protected

◆ m_multisample_view_color

DynamicPointer<VulkanImageView> m_multisample_view_color
protected

◆ m_needs_cleanup

bool m_needs_cleanup
protected

◆ m_needs_grab_image

bool m_needs_grab_image
protected

◆ m_needs_pipeline_recreation

bool m_needs_pipeline_recreation
protected

◆ m_needs_screen_draw

bool m_needs_screen_draw
protected

◆ m_number_of_grab_images

uint04 m_number_of_grab_images
protected

◆ m_render_definition

DynamicPointer<VulkanRenderDefinition> m_render_definition
protected

◆ m_session

VulkanSession* m_session
protected

◆ m_shadow_image

DynamicPointer<VulkanImageData> m_shadow_image
protected

◆ m_shadow_view

DynamicPointer<VulkanImageView> m_shadow_view
protected

◆ m_suboptimal_khr

bool m_suboptimal_khr
protected

◆ m_surface

VkSurfaceKHR m_surface
protected

◆ m_surface_update_time

Time m_surface_update_time
protected

◆ m_swap_chain_support_details

ConstPointer<SwapChainSupportDetails> m_swap_chain_support_details
protected

◆ m_window_instance

WindowInstance* m_window_instance
protected

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