Mandrill 2025.6.0
Loading...
Searching...
No Matches
Mandrill::RayTracingPipeline Class Reference

Ray tracing pipeline class that manages the creation and usage of a ray tracing pipeline in Vulkan. More...

#include <RayTracingPipeline.h>

Inheritance diagram for Mandrill::RayTracingPipeline:
Mandrill::Pipeline

Public Member Functions

MANDRILL_API RayTracingPipeline (ptr< Device > pDevice, ptr< Layout > pLayout, ptr< Shader > pShader, const RayTracingPipelineDesc &desc=RayTracingPipelineDesc())
 Create a new ray tracing pipeline.
 
MANDRILL_API void bind (VkCommandBuffer cmd)
 Bind pipeline for rendering.
 
MANDRILL_API void write (VkCommandBuffer cmd, VkImage image)
 Transition an image for writing to.
 
MANDRILL_API void read (VkCommandBuffer cmd, VkImage image)
 Transition and image for reading from.
 
MANDRILL_API void recreate ()
 Recreate a pipeline. Call this if shader source code has changed and should be reloaded.
 
MANDRILL_API VkStridedDeviceAddressRegionKHR getRayGenSBT () const
 Get the raygen group shader binding table record.
 
MANDRILL_API VkStridedDeviceAddressRegionKHR getMissSBT () const
 Get the miss group shader binding table record.
 
MANDRILL_API VkStridedDeviceAddressRegionKHR getHitSBT () const
 Get the hit group shader binding table record.
 
MANDRILL_API VkStridedDeviceAddressRegionKHR getCallSBT () const
 [NOT IMPLEMENTED] Get the call group shader binding table record.
 
- Public Member Functions inherited from Mandrill::Pipeline
MANDRILL_API Pipeline (ptr< Device > pDevice, ptr< Pass > pPass, ptr< Layout > pLayout, ptr< Shader > pShader, const PipelineDesc &desc=PipelineDesc())
 Create a new pipeline.
 
MANDRILL_API ~Pipeline ()
 Destructor for pipeline.
 
MANDRILL_API void bind (VkCommandBuffer cmd)
 Bind a pipeline for rendering and set its dynamic states.
 
MANDRILL_API void recreate ()
 Recreate a pipeline. Call this if shader source code has changed and should be reloaded.
 
MANDRILL_API VkPipeline getPipeline () const
 Get the pipeline handle.
 
MANDRILL_API VkPipelineLayout getLayout () const
 Get the pipeline layout handle.
 
MANDRILL_API void setCullMode (VkCullModeFlagBits cullMode)
 Set the cull mode.
 
MANDRILL_API void setFrontFace (VkFrontFace frontFace)
 Set the front face.
 
MANDRILL_API void setLineWidth (float lineWidth)
 Set line width.
 

Additional Inherited Members

- Protected Member Functions inherited from Mandrill::Pipeline
virtual void destroyPipeline ()
 
- Protected Attributes inherited from Mandrill::Pipeline
ptr< DevicempDevice
 
ptr< PassmpPass
 
ptr< ShadermpShader
 
ptr< LayoutmpLayout
 
VkPipeline mPipeline
 
VkPipelineLayout mPipelineLayout
 

Detailed Description

Ray tracing pipeline class that manages the creation and usage of a ray tracing pipeline in Vulkan.

Constructor & Destructor Documentation

◆ RayTracingPipeline()

RayTracingPipeline::RayTracingPipeline ( ptr< Device pDevice,
ptr< Layout pLayout,
ptr< Shader pShader,
const RayTracingPipelineDesc &  desc = RayTracingPipelineDesc() 
)

Create a new ray tracing pipeline.

Parameters
pDeviceDevice to use
pLayoutLayout to use
pShaderShader to use
descDescription of pipeline

Member Function Documentation

◆ bind()

void RayTracingPipeline::bind ( VkCommandBuffer  cmd)

Bind pipeline for rendering.

Parameters
cmdCommand buffer to use
Returns

◆ getCallSBT()

MANDRILL_API VkStridedDeviceAddressRegionKHR Mandrill::RayTracingPipeline::getCallSBT ( ) const
inline

[NOT IMPLEMENTED] Get the call group shader binding table record.

Returns
Device address for call group

◆ getHitSBT()

MANDRILL_API VkStridedDeviceAddressRegionKHR Mandrill::RayTracingPipeline::getHitSBT ( ) const
inline

Get the hit group shader binding table record.

Returns
Device address for hit group

◆ getMissSBT()

MANDRILL_API VkStridedDeviceAddressRegionKHR Mandrill::RayTracingPipeline::getMissSBT ( ) const
inline

Get the miss group shader binding table record.

Returns
Device address for miss group

◆ getRayGenSBT()

MANDRILL_API VkStridedDeviceAddressRegionKHR Mandrill::RayTracingPipeline::getRayGenSBT ( ) const
inline

Get the raygen group shader binding table record.

Returns
Device address for raygen group

◆ read()

void RayTracingPipeline::read ( VkCommandBuffer  cmd,
VkImage  image 
)

Transition and image for reading from.

Parameters
cmdCommand buffer to use
imageImage to transition
Returns

◆ recreate()

void RayTracingPipeline::recreate ( )

Recreate a pipeline. Call this if shader source code has changed and should be reloaded.

Returns

◆ write()

void RayTracingPipeline::write ( VkCommandBuffer  cmd,
VkImage  image 
)

Transition an image for writing to.

Parameters
cmdCommand buffer to use
imageImage to transition
Returns

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