Blender V5.0
blender::gpu::render_graph::VKRenderGraphNode Struct Reference

#include <vk_render_graph_node.hh>

Public Member Functions

template<typename NodeInfo>
void set_node_data (VKRenderGraphStorage &storage, const typename NodeInfo::CreateInfo &create_info)
template<typename NodeInfo>
void build_links (VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const typename NodeInfo::CreateInfo &create_info)
VkPipelineStageFlags pipeline_stage_get () const
void build_commands (VKCommandBufferInterface &command_buffer, VKRenderGraphStorage &storage, VKBoundPipelines &r_bound_pipelines)
void free_data (VKRenderGraphStorage &storage)
void reset (VKRenderGraphStorage &storage)

Public Attributes

VKNodeType type
union { 
   VKBeginQueryNode::Data   begin_query 
   VKClearColorImageNode::Data   clear_color_image 
   VKClearDepthStencilImageNode::Data   clear_depth_stencil_image 
   VKCopyBufferNode::Data   copy_buffer 
   VKDispatchNode::Data   dispatch 
   VKDispatchIndirectNode::Data   dispatch_indirect 
   VKEndQueryNode::Data   end_query 
   VKEndRenderingNode::Data   end_rendering 
   VKFillBufferNode::Data   fill_buffer 
   VKResetQueryPoolNode::Data   reset_query_pool 
   VKSynchronizationNode::Data   synchronization 
   VKUpdateBufferNode::Data   update_buffer 
   VKUpdateMipmapsNode::Data   update_mipmaps 
   int64_t   storage_index = -1 
}; 

Detailed Description

Node stored inside a render graph.

Node specific data in the render graph are stored in a vector to ensure that the data can be prefetched and removing a level of indirection. A consequence is that we cannot use class based nodes.

Definition at line 84 of file vk_render_graph_node.hh.

Member Function Documentation

◆ build_commands()

void blender::gpu::render_graph::VKRenderGraphNode::build_commands ( VKCommandBufferInterface & command_buffer,
VKRenderGraphStorage & storage,
VKBoundPipelines & r_bound_pipelines )
inline

Build commands for this node and record them in the given command_buffer.

NOTE: Pipeline barriers should already be added. See VKCommandBuilder::build_node and VKCommandBuilder::build_pipeline_barriers.

Definition at line 206 of file vk_render_graph_node.hh.

References blender::gpu::render_graph::BEGIN_QUERY, begin_query, blender::gpu::render_graph::BEGIN_RENDERING, blender::gpu::render_graph::BLIT_IMAGE, BUILD_COMMANDS, BUILD_COMMANDS_STORAGE, blender::gpu::render_graph::CLEAR_ATTACHMENTS, blender::gpu::render_graph::CLEAR_COLOR_IMAGE, clear_color_image, blender::gpu::render_graph::CLEAR_DEPTH_STENCIL_IMAGE, clear_depth_stencil_image, blender::gpu::render_graph::COPY_BUFFER, copy_buffer, blender::gpu::render_graph::COPY_BUFFER_TO_IMAGE, blender::gpu::render_graph::COPY_IMAGE, blender::gpu::render_graph::COPY_IMAGE_TO_BUFFER, blender::gpu::render_graph::DISPATCH, dispatch, blender::gpu::render_graph::DISPATCH_INDIRECT, dispatch_indirect, blender::gpu::render_graph::DRAW, blender::gpu::render_graph::DRAW_INDEXED, blender::gpu::render_graph::DRAW_INDEXED_INDIRECT, blender::gpu::render_graph::DRAW_INDIRECT, blender::gpu::render_graph::END_QUERY, end_query, blender::gpu::render_graph::END_RENDERING, end_rendering, blender::gpu::render_graph::FILL_BUFFER, fill_buffer, blender::gpu::render_graph::RESET_QUERY_POOL, reset_query_pool, blender::gpu::render_graph::SYNCHRONIZATION, synchronization, type, blender::gpu::render_graph::UNUSED, blender::gpu::render_graph::UPDATE_BUFFER, update_buffer, blender::gpu::render_graph::UPDATE_MIPMAPS, and update_mipmaps.

◆ build_links()

template<typename NodeInfo>
void blender::gpu::render_graph::VKRenderGraphNode::build_links ( VKResourceStateTracker & resources,
VKRenderGraphNodeLinks & node_links,
const typename NodeInfo::CreateInfo & create_info )
inline

Build the input/output links for this.

Newly created links are added to the node_links parameter.

Definition at line 129 of file vk_render_graph_node.hh.

◆ free_data()

◆ pipeline_stage_get()

VkPipelineStageFlags blender::gpu::render_graph::VKRenderGraphNode::pipeline_stage_get ( ) const
inline

Get the pipeline stage of the node.

Pipeline stage is used to update src/dst_stage_masks of the VKCommandBuilder.

Definition at line 144 of file vk_render_graph_node.hh.

References blender::gpu::render_graph::BEGIN_QUERY, blender::gpu::render_graph::BEGIN_RENDERING, BLI_assert_unreachable, blender::gpu::render_graph::BLIT_IMAGE, blender::gpu::render_graph::CLEAR_ATTACHMENTS, blender::gpu::render_graph::CLEAR_COLOR_IMAGE, blender::gpu::render_graph::CLEAR_DEPTH_STENCIL_IMAGE, blender::gpu::render_graph::COPY_BUFFER, blender::gpu::render_graph::COPY_BUFFER_TO_IMAGE, blender::gpu::render_graph::COPY_IMAGE, blender::gpu::render_graph::COPY_IMAGE_TO_BUFFER, blender::gpu::render_graph::DISPATCH, blender::gpu::render_graph::DISPATCH_INDIRECT, blender::gpu::render_graph::DRAW, blender::gpu::render_graph::DRAW_INDEXED, blender::gpu::render_graph::DRAW_INDEXED_INDIRECT, blender::gpu::render_graph::DRAW_INDIRECT, blender::gpu::render_graph::END_QUERY, blender::gpu::render_graph::END_RENDERING, blender::gpu::render_graph::FILL_BUFFER, blender::gpu::render_graph::VKNodeInfo< VKNodeType::BEGIN_QUERY, VKBeginQueryData, VKBeginQueryData, VK_PIPELINE_STAGE_NONE, VKResourceType::NONE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::BEGIN_RENDERING, VKBeginRenderingCreateInfo, VKBeginRenderingData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::BLIT_IMAGE, VKBlitImageData, VKBlitImageData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::CLEAR_ATTACHMENTS, VKClearAttachmentsData, VKClearAttachmentsData, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT|VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::CLEAR_COLOR_IMAGE, VKClearColorImageData, VKClearColorImageData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::CLEAR_DEPTH_STENCIL_IMAGE, VKClearDepthStencilImageCreateInfo, VKClearDepthStencilImageData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::COPY_BUFFER, VKCopyBufferData, VKCopyBufferData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::COPY_BUFFER_TO_IMAGE, VKCopyBufferToImageCreateInfo, VKCopyBufferToImageData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::COPY_IMAGE, VKCopyImageCreateInfo, VKCopyImageData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::COPY_IMAGE_TO_BUFFER, VKCopyImageToBufferCreateInfo, VKCopyImageToBufferData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DISPATCH, VKDispatchCreateInfo, VKDispatchData, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DISPATCH_INDIRECT, VKDispatchIndirectCreateInfo, VKDispatchIndirectData, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT|VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DRAW, VKDrawCreateInfo, VKDrawData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DRAW_INDEXED, VKDrawIndexedCreateInfo, VKDrawIndexedData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DRAW_INDEXED_INDIRECT, VKDrawIndexedIndirectCreateInfo, VKDrawIndexedIndirectData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::DRAW_INDIRECT, VKDrawIndirectCreateInfo, VKDrawIndirectData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::END_QUERY, VKEndQueryData, VKEndQueryData, VK_PIPELINE_STAGE_NONE, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::END_RENDERING, VKEndRenderingData, VKEndRenderingData, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VKResourceType::NONE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::FILL_BUFFER, VKFillBufferData, VKFillBufferData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::RESET_QUERY_POOL, VKResetQueryPoolData, VKResetQueryPoolData, VK_PIPELINE_STAGE_NONE, VKResourceType::NONE >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::SYNCHRONIZATION, VKSynchronizationCreateInfo, VKSynchronizationData, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VKResourceType::IMAGE|VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::UPDATE_BUFFER, VKUpdateBufferData, VKUpdateBufferData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::BUFFER >::pipeline_stage, blender::gpu::render_graph::VKNodeInfo< VKNodeType::UPDATE_MIPMAPS, VKUpdateMipmapsData, VKUpdateMipmapsData, VK_PIPELINE_STAGE_TRANSFER_BIT, VKResourceType::IMAGE >::pipeline_stage, blender::gpu::render_graph::RESET_QUERY_POOL, blender::gpu::render_graph::SYNCHRONIZATION, type, blender::gpu::render_graph::UNUSED, blender::gpu::render_graph::UPDATE_BUFFER, and blender::gpu::render_graph::UPDATE_MIPMAPS.

◆ reset()

void blender::gpu::render_graph::VKRenderGraphNode::reset ( VKRenderGraphStorage & storage)
inline

Reset nodes.

Nodes are reset so they can be reused in consecutive calls. Data allocated by the node are freed. This function dispatches the free_data to the actual node implementation.

Definition at line 322 of file vk_render_graph_node.hh.

References free_data(), storage_index, type, and blender::gpu::render_graph::UNUSED.

◆ set_node_data()

template<typename NodeInfo>
void blender::gpu::render_graph::VKRenderGraphNode::set_node_data ( VKRenderGraphStorage & storage,
const typename NodeInfo::CreateInfo & create_info )
inline

Set the data of the node.

Pre-conditions:

  • type of the node should be VKNodeType::UNUSED. Memory allocated for nodes are reused between consecutive use. Checking for unused node types will ensure that previous usage has been reset. Resetting is done as part of free_data

Definition at line 112 of file vk_render_graph_node.hh.

References BLI_assert, type, and blender::gpu::render_graph::UNUSED.

Member Data Documentation

◆ [union]

◆ begin_query

VKBeginQueryNode::Data blender::gpu::render_graph::VKRenderGraphNode::begin_query

Definition at line 87 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ clear_color_image

VKClearColorImageNode::Data blender::gpu::render_graph::VKRenderGraphNode::clear_color_image

Definition at line 88 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ clear_depth_stencil_image

VKClearDepthStencilImageNode::Data blender::gpu::render_graph::VKRenderGraphNode::clear_depth_stencil_image

Definition at line 89 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ copy_buffer

VKCopyBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::copy_buffer

◆ dispatch

VKDispatchNode::Data blender::gpu::render_graph::VKRenderGraphNode::dispatch

Definition at line 91 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ dispatch_indirect

VKDispatchIndirectNode::Data blender::gpu::render_graph::VKRenderGraphNode::dispatch_indirect

Definition at line 92 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ end_query

VKEndQueryNode::Data blender::gpu::render_graph::VKRenderGraphNode::end_query

Definition at line 93 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ end_rendering

VKEndRenderingNode::Data blender::gpu::render_graph::VKRenderGraphNode::end_rendering

Definition at line 94 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ fill_buffer

VKFillBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::fill_buffer

Definition at line 95 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ reset_query_pool

VKResetQueryPoolNode::Data blender::gpu::render_graph::VKRenderGraphNode::reset_query_pool

Definition at line 96 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ storage_index

int64_t blender::gpu::render_graph::VKRenderGraphNode::storage_index = -1

Definition at line 100 of file vk_render_graph_node.hh.

Referenced by reset().

◆ synchronization

VKSynchronizationNode::Data blender::gpu::render_graph::VKRenderGraphNode::synchronization

Definition at line 97 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ type

◆ update_buffer

VKUpdateBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::update_buffer

Definition at line 98 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ update_mipmaps

VKUpdateMipmapsNode::Data blender::gpu::render_graph::VKRenderGraphNode::update_mipmaps

Definition at line 99 of file vk_render_graph_node.hh.

Referenced by build_commands().


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