Blender V4.3
blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages > Class Template Referenceabstract

#include <vk_node_info.hh>

Inherits blender::NonCopyable.

Public Types

using CreateInfo = NodeCreateInfo
 
using Data = NodeData
 

Public Member Functions

virtual void build_links (VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const CreateInfo &create_info)=0
 
virtual void build_commands (VKCommandBufferInterface &command_buffer, Data &data, VKBoundPipelines &r_bound_pipelines)=0
 
- Public Member Functions inherited from blender::NonCopyable
 NonCopyable (const NonCopyable &other)=delete
 
NonCopyableoperator= (const NonCopyable &other)=delete
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable &&other)=default
 
NonCopyableoperator= (NonCopyable &&other)=default
 

Static Public Member Functions

template<typename Node >
static void set_node_data (Node &node, const CreateInfo &create_info)
 

Static Public Attributes

static constexpr VKNodeType node_type = NodeType
 
static constexpr VkPipelineStageFlags pipeline_stage = PipelineStage
 
static constexpr VKResourceType resource_usages = ResourceUsages
 

Detailed Description

template<VKNodeType NodeType, typename NodeCreateInfo, typename NodeData, VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
class blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >

Info class for a node type.

Nodes can be created using NodeCreateInfo. When a node is created the VKNodeInfo.node_type and VKNodeInfo.set_node_data are used to fill a VKRenderGraphNode instance. The VKRenderGraphNode is stored sequentially in the render graph. When the node is created the dependencies are extracted by calling VKNodeInfo.build_links.

Eventually when a node is recorded to a command buffer VKNodeInfo.build_commands is invoked.

Definition at line 159 of file vk_node_info.hh.

Member Typedef Documentation

◆ CreateInfo

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
using blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::CreateInfo = NodeCreateInfo

Definition at line 162 of file vk_node_info.hh.

◆ Data

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
using blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::Data = NodeData

Definition at line 163 of file vk_node_info.hh.

Member Function Documentation

◆ build_commands()

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
virtual void blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::build_commands ( VKCommandBufferInterface & command_buffer,
Data & data,
VKBoundPipelines & r_bound_pipelines )
pure virtual

◆ build_links()

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
virtual void blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::build_links ( VKResourceStateTracker & resources,
VKRenderGraphNodeLinks & node_links,
const CreateInfo & create_info )
pure virtual

◆ set_node_data()

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
template<typename Node >
static void blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::set_node_data ( Node & node,
const CreateInfo & create_info )
static

Update the node data with the data inside create_info.

Has been implemented as a template to ensure all node specific data (Data/CreateInfo) types can be included in the same header file as the logic. The actual node data (VKRenderGraphNode includes all header files.)

This function must be implemented by all node classes. But due to cyclic inclusion of header files it is implemented as a template function.

Member Data Documentation

◆ node_type

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
VKNodeType blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::node_type = NodeType
staticconstexpr

Node type of this class.

The node type used to link VKRenderGraphNode instance to a VKNodeInfo.

Definition at line 170 of file vk_node_info.hh.

◆ pipeline_stage

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
VkPipelineStageFlags blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::pipeline_stage = PipelineStage
staticconstexpr

Which pipeline stage does this command belongs to. The pipeline stage is used when generating pipeline barriers.

Definition at line 176 of file vk_node_info.hh.

◆ resource_usages

template<VKNodeType NodeType, typename NodeCreateInfo , typename NodeData , VkPipelineStageFlags PipelineStage, VKResourceType ResourceUsages>
VKResourceType blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::resource_usages = ResourceUsages
staticconstexpr

Which resource types are relevant. Some code can be skipped when a node can only depend on resources of a single type.

Definition at line 182 of file vk_node_info.hh.


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