Minimalist setup for a Raytracing Stage.
More...
#include <foray_minimalraytracingstage.hpp>
|
void | Init (core::Context *context) |
| Destroys, assigns context, calls ApiCreateOutputImages(), ApiCustomObjectsCreate(), ApiCreateOrUpdateDescriptors(), ApiCreatePipelineLayout(), ApiCreateRtPipeline() in this order.
|
|
virtual void | RecordFrame (VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo) override |
| Calls ApiRecordFramePrepare(), ApiRecordFrameBind(), ApiRecordFrameTraceRays() in this order.
|
|
virtual void | Resize (const VkExtent2D &extent) override |
| Calls RenderStage::Resize(..) which resizes any image registered to mImageOutputs, calls ApiCreateOrUpdateDescriptors() afterwards.
|
|
virtual void | Destroy () override |
| Calls ApiDestroyRtPipeline(), mPipelineLayout.Destroy(), ApiDestroyDescriptors(), ApiCustomObjectsDestroy() and DestroyOutputImages() in this order.
|
|
| RenderStage ()=default |
|
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 () |
|
Minimalist setup for a Raytracing Stage.
Features
- Pipeline & Pipeline Layout Members
- Rerouting of Init, RecordFrame, OnResized and Destroy callbacks to appropriate member methods
Inheriting
◆ ApiCreateOrUpdateDescriptors()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCreateOrUpdateDescriptors |
( |
| ) |
|
|
inlineprotectedvirtual |
Inheriting types should reassign all descriptor bindings and call create / update on descriptor sets.
◆ ApiCreateOutputImages()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCreateOutputImages |
( |
| ) |
|
|
inlineprotectedvirtual |
Inheriting types should setup their Output Images here and push them onto the RenderStage::mImageOutput collection.
◆ ApiCreatePipelineLayout()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCreatePipelineLayout |
( |
| ) |
|
|
protectedpure virtual |
Inheriting types should create mPipelineLayout here (add descriptorsetlayouts, add pushconstants, build)
◆ ApiCreateRtPipeline()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCreateRtPipeline |
( |
| ) |
|
|
protectedpure virtual |
Inheriting types should create mPipeline here (load shaders, configure sbts, build)
◆ ApiCustomObjectsCreate()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCustomObjectsCreate |
( |
| ) |
|
|
inlineprotectedvirtual |
Inheriting types may use this function to initialize stage specific objects such as configuration Ubo buffers.
◆ ApiCustomObjectsDestroy()
virtual void foray::stages::MinimalRaytracingStageBase::ApiCustomObjectsDestroy |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ ApiDestroyDescriptors()
virtual void foray::stages::MinimalRaytracingStageBase::ApiDestroyDescriptors |
( |
| ) |
|
|
inlineprotectedvirtual |
Inheriting types should destroy all descriptor sets used here.
◆ ApiDestroyRtPipeline()
virtual void foray::stages::MinimalRaytracingStageBase::ApiDestroyRtPipeline |
( |
| ) |
|
|
protectedpure virtual |
Destroys mPipeline and all shaders registered to RenderStage::mShaders.
◆ ApiRecordFrameBind()
virtual void foray::stages::MinimalRaytracingStageBase::ApiRecordFrameBind |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
base::FrameRenderInfo & |
renderInfo |
|
) |
| |
|
protectedpure virtual |
Inheriting types should use this to bind the RtPipeline and all descriptor sets.
◆ ApiRecordFramePrepare()
virtual void foray::stages::MinimalRaytracingStageBase::ApiRecordFramePrepare |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
base::FrameRenderInfo & |
renderInfo |
|
) |
| |
|
inlineprotectedvirtual |
Inheriting types should use this for pipeline barriers and stage specific buffer actions.
◆ ApiRecordFrameTraceRays()
virtual void foray::stages::MinimalRaytracingStageBase::ApiRecordFrameTraceRays |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
base::FrameRenderInfo & |
renderInfo |
|
) |
| |
|
protectedpure virtual |
Inheriting types should use this to push constants and invoke tracerays.
◆ Destroy()
virtual void foray::stages::MinimalRaytracingStageBase::Destroy |
( |
| ) |
|
|
overridevirtual |
◆ Init()
void foray::stages::MinimalRaytracingStageBase::Init |
( |
core::Context * |
context | ) |
|
◆ RecordFrame()
virtual void foray::stages::MinimalRaytracingStageBase::RecordFrame |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
base::FrameRenderInfo & |
renderInfo |
|
) |
| |
|
overridevirtual |
◆ ReloadShaders()
virtual void foray::stages::MinimalRaytracingStageBase::ReloadShaders |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ Resize()
virtual void foray::stages::MinimalRaytracingStageBase::Resize |
( |
const VkExtent2D & |
extent | ) |
|
|
overridevirtual |
◆ mPipeline
The pipeline manages shader binding tables.
◆ mPipelineLayout
The pipeline layout manages descriptorset and pushconstant layouts.
The documentation for this class was generated from the following file: