CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RenderTaskResourceUsage Struct Reference

A structure that describes how and what resources are used by a render task. More...

#include <CeresEngine/Renderer/RenderGraph/RenderTask.hpp>

Classes

struct  AttachmentResourceInfo
 A structure that describes a attachment resource. More...
 
struct  RealizedResourceInfo
 A structure that describes a resource realization. More...
 
struct  ShaderResourceInfo
 A structure that describes a shader resource. More...
 
struct  UnrealizedResourceInfo
 A structure that describes a resource unrealization. More...
 

Public Member Functions

bool uses (const RenderResource &resource) const
 Checks if the given resource is used by the render task.
 
bool reads (const RenderResource &resource) const
 Checks if the given resource is read in a shader by the render task.
 
bool writes (const RenderResource &resource) const
 Checks if the given resource is written in a shader by the render task.
 
const AttachmentResourceInfogetAttachmentInfo (UInt32 attachmentIdx) const
 Finds the AttachmentResourceInfo structure for the attachment at index attachmentIdx
 
const AttachmentResourceInfogetAttachmentInfo (const ImageRenderResource &resource) const
 Finds the AttachmentResourceInfo structure for the attachment using resource.
 
bool realizes (const RenderResource &resource) const
 Checks if a resource is realized for this render task.
 
bool unrealizes (const RenderResource &resource) const
 Checks if a resource is unrealized for this render task.
 
RenderResourcegetResource (const Slot &slot) const
 Gets the current resource instance for the given slot.
 

Public Attributes

Vector< ShaderResourceInfoshaderReads
 A list of resources that are read by shaders.
 
Vector< ShaderResourceInfoshaderWrites
 A list of resources that are written by shaders.
 
Vector< AttachmentResourceInfocolorAttachments
 A list of resources that are used as color attachments.
 
AttachmentResourceInfo depthAttachment
 A resource that is used as depth attachment.
 
AttachmentResourceInfo stencilAttachment
 A resource that is used as stencil attachment.
 
Vector< RealizedResourceInforealizations
 A list of resources that will be realized for this task.
 
Vector< UnrealizedResourceInfounrealizations
 A list of resources that will be unrealized for this task.
 

Detailed Description

A structure that describes how and what resources are used by a render task.

Member Function Documentation

◆ getAttachmentInfo() [1/2]

const AttachmentResourceInfo * CeresEngine::RenderTaskResourceUsage::getAttachmentInfo ( const ImageRenderResource resource) const

Finds the AttachmentResourceInfo structure for the attachment using resource.

Parameters
resourceThe attachment image resource.
Returns
A pointer to the AttachmentResourceInfo or nullptr if no such attachment exists.

◆ getAttachmentInfo() [2/2]

const AttachmentResourceInfo * CeresEngine::RenderTaskResourceUsage::getAttachmentInfo ( UInt32  attachmentIdx) const

Finds the AttachmentResourceInfo structure for the attachment at index attachmentIdx

Parameters
attachmentIdxThe attachment index to get information for.
Returns
A pointer to the AttachmentResourceInfo or nullptr if no such attachment exists.

◆ getResource()

RenderResource & CeresEngine::RenderTaskResourceUsage::getResource ( const Slot slot) const

Gets the current resource instance for the given slot.

◆ reads()

bool CeresEngine::RenderTaskResourceUsage::reads ( const RenderResource resource) const

Checks if the given resource is read in a shader by the render task.

Parameters
resourceThe resource to check for usage.
Returns
true if the resource is read by the render task.

◆ realizes()

bool CeresEngine::RenderTaskResourceUsage::realizes ( const RenderResource resource) const

Checks if a resource is realized for this render task.

Parameters
resourceThe resource to check for realization.
Returns
true if this resource is realized for this render task.

◆ unrealizes()

bool CeresEngine::RenderTaskResourceUsage::unrealizes ( const RenderResource resource) const

Checks if a resource is unrealized for this render task.

Parameters
resourceThe resource to check for unrealization.
Returns
true if this resource is unrealized for this render task.

◆ uses()

bool CeresEngine::RenderTaskResourceUsage::uses ( const RenderResource resource) const

Checks if the given resource is used by the render task.

Parameters
resourceThe resource to check for usage.
Returns
true if the resource is used by the render task.

◆ writes()

bool CeresEngine::RenderTaskResourceUsage::writes ( const RenderResource resource) const

Checks if the given resource is written in a shader by the render task.

Parameters
resourceThe resource to check for usage.
Returns
true if the resource is written by the render task.

Member Data Documentation

◆ colorAttachments

Vector<AttachmentResourceInfo> CeresEngine::RenderTaskResourceUsage::colorAttachments

A list of resources that are used as color attachments.

◆ depthAttachment

AttachmentResourceInfo CeresEngine::RenderTaskResourceUsage::depthAttachment

A resource that is used as depth attachment.

◆ realizations

Vector<RealizedResourceInfo> CeresEngine::RenderTaskResourceUsage::realizations

A list of resources that will be realized for this task.

◆ shaderReads

Vector<ShaderResourceInfo> CeresEngine::RenderTaskResourceUsage::shaderReads

A list of resources that are read by shaders.

◆ shaderWrites

Vector<ShaderResourceInfo> CeresEngine::RenderTaskResourceUsage::shaderWrites

A list of resources that are written by shaders.

◆ stencilAttachment

AttachmentResourceInfo CeresEngine::RenderTaskResourceUsage::stencilAttachment

A resource that is used as stencil attachment.

◆ unrealizations

Vector<UnrealizedResourceInfo> CeresEngine::RenderTaskResourceUsage::unrealizations

A list of resources that will be unrealized for this task.


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