|
Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Stage which performs an image blit (more capable copy from one image to another) More...
#include <foray_blitstage.hpp>
Public Member Functions | |
| BlitStage ()=default | |
| void | Init (core::ManagedImage *sourceImage=nullptr, core::ManagedImage *destImage=nullptr) |
| Initialization. | |
| virtual void | RecordFrame (VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo) override |
| Records pipeline barriers for source and destination images, and the blit command itself. | |
| virtual void | SetSrcImage (core::ManagedImage *image) |
| Set source Image (nullptr allowed) | |
| virtual void | SetSrcImage (VkImage image, VkExtent2D size) |
| Set source Image (nullptr allowed) | |
| virtual void | SetDstImage (core::ManagedImage *image) |
| Set destination Image (nullptr allowed) | |
| virtual void | SetDstImage (VkImage image, VkExtent2D size) |
| Set destination Image (nullptr allowed) | |
Public Member Functions inherited from foray::stages::RenderStage | |
| RenderStage ()=default | |
| virtual void | Destroy () |
| Destroy the render stage. Finalizes all components. | |
| virtual void | Resize (const VkExtent2D &extent) |
| Default implementation accesses mImageOutputs and calls ManagedImage::Resize(extent) on any set image. | |
| std::vector< core::ManagedImage * > | GetImageOutputs () |
| Gets a vector to all color attachments that will be included in a texture array and can be referenced in the shader pass. | |
| core::ManagedImage * | GetImageOutput (std::string_view name, bool noThrow=false) |
| Gets an image output. | |
| virtual void | OnShadersRecompiled (const std::unordered_set< uint64_t > &recompiled) |
| Notifies the stage that the shader compiler instance has recompiled a shader. | |
| virtual | ~RenderStage () |
Protected Member Functions | |
| virtual void | ConfigureBlitRegion (VkImageBlit2 &blit) |
| Configures the blit region. | |
Protected Member Functions inherited from foray::stages::RenderStage | |
| virtual void | ReloadShaders () |
| Override this to reload all shaders and rebuild pipelines after a registered shader has been recompiled. | |
| virtual void | DestroyOutputImages () |
| Calls Destroy() on any image in mImageOutputs and clears mImageOutputs. | |
Protected Attributes | |
| core::ManagedImage * | mSrcImage = nullptr |
| If set, preferred over mSrcVkImage member. Allows for recreated ManagedImage instances. | |
| VkImage | mSrcVkImage = nullptr |
| Fallback to mSrcImage. | |
| VkExtent2D | mSrcImageSize = {} |
| Fallback to mSrcImage. | |
| core::ManagedImage * | mDstImage = nullptr |
| If set, preferred over mDStVkImage member. Allows for recreated ManagedImage instances. | |
| VkImage | mDstVkImage = nullptr |
| Fallback to mDstImage. | |
| VkExtent2D | mDstImageSize = {} |
| Fallback to mDstImage. | |
| bool | mFlipX = false |
| If true, flips horizontal on blitting. | |
| bool | mFlipY = false |
| If true, flips vertically on blitting. | |
| VkFilter | mFilter = VkFilter::VK_FILTER_LINEAR |
| Filter used for blitting. | |
Protected Attributes inherited from foray::stages::RenderStage | |
| std::unordered_map< std::string, core::ManagedImage * > | mImageOutputs |
| Inheriting types should emplace their images onto this collection to provide them in GetImageOutput interface. | |
| std::vector< uint64_t > | mShaderKeys |
| Inheriting types should emplace their shader keys onto this collection such that if a shader has been recompiled, ReloadShaders() will be called. | |
| core::Context * | mContext = nullptr |
| Context object the renderstage is built upon. | |
Stage which performs an image blit (more capable copy from one image to another)
Includes pipeline barriers
|
default |
|
protectedvirtual |
Configures the blit region.
| void foray::stages::BlitStage::Init | ( | core::ManagedImage * | sourceImage = nullptr, |
| core::ManagedImage * | destImage = nullptr |
||
| ) |
Initialization.
| sourceImage | Source Image |
| destImage | Destination Image |
|
overridevirtual |
Records pipeline barriers for source and destination images, and the blit command itself.
Reimplemented from foray::stages::RenderStage.
Reimplemented in foray::stages::ImageToSwapchainStage.
|
virtual |
Set destination Image (nullptr allowed)
|
virtual |
Set destination Image (nullptr allowed)
|
virtual |
Set source Image (nullptr allowed)
|
virtual |
Set source Image (nullptr allowed)
|
protected |
If set, preferred over mDStVkImage member. Allows for recreated ManagedImage instances.
|
protected |
Fallback to mDstImage.
|
protected |
Fallback to mDstImage.
|
protected |
Filter used for blitting.
|
protected |
If true, flips horizontal on blitting.
|
protected |
If true, flips vertically on blitting.
|
protected |
If set, preferred over mSrcVkImage member. Allows for recreated ManagedImage instances.
|
protected |
Fallback to mSrcImage.
|
protected |
Fallback to mSrcImage.