Blender V4.3
blender::gpu::render_graph::VKRenderGraphNode Struct Reference

#include <vk_render_graph_node.hh>

Public Member Functions

template<typename NodeInfo >
void set_node_data (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, VKBoundPipelines &r_bound_pipelines)
 
void free_data ()
 
void reset ()
 

Public Attributes

VKNodeType type
 
union { 
 
   VKBeginQueryNode::Data   begin_query 
 
   VKBeginRenderingNode::Data   begin_rendering 
 
   VKBlitImageNode::Data   blit_image 
 
   VKClearAttachmentsNode::Data   clear_attachments 
 
   VKClearColorImageNode::Data   clear_color_image 
 
   VKClearDepthStencilImageNode::Data   clear_depth_stencil_image 
 
   VKCopyBufferNode::Data   copy_buffer 
 
   VKCopyBufferToImageNode::Data   copy_buffer_to_image 
 
   VKCopyImageNode::Data   copy_image 
 
   VKCopyImageToBufferNode::Data   copy_image_to_buffer 
 
   VKDispatchNode::Data   dispatch 
 
   VKDispatchIndirectNode::Data   dispatch_indirect 
 
   VKDrawNode::Data   draw 
 
   VKDrawIndexedNode::Data   draw_indexed 
 
   VKDrawIndexedIndirectNode::Data   draw_indexed_indirect 
 
   VKDrawIndirectNode::Data   draw_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 
 
};  
 

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 49 of file vk_render_graph_node.hh.

Member Function Documentation

◆ build_commands()

void blender::gpu::render_graph::VKRenderGraphNode::build_commands ( VKCommandBufferInterface & command_buffer,
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 `VKCommandBuilderbuild_pipeline_barriers.

Definition at line 178 of file vk_render_graph_node.hh.

References blender::gpu::render_graph::BEGIN_QUERY, begin_query, blender::gpu::render_graph::BEGIN_RENDERING, begin_rendering, blender::gpu::render_graph::BLIT_IMAGE, blit_image, BUILD_COMMANDS, blender::gpu::render_graph::CLEAR_ATTACHMENTS, 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, copy_buffer_to_image, blender::gpu::render_graph::COPY_IMAGE, copy_image, blender::gpu::render_graph::COPY_IMAGE_TO_BUFFER, copy_image_to_buffer, blender::gpu::render_graph::DISPATCH, dispatch, blender::gpu::render_graph::DISPATCH_INDIRECT, dispatch_indirect, blender::gpu::render_graph::DRAW, draw, blender::gpu::render_graph::DRAW_INDEXED, draw_indexed, blender::gpu::render_graph::DRAW_INDEXED_INDIRECT, draw_indexed_indirect, blender::gpu::render_graph::DRAW_INDIRECT, 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, 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 101 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 116 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, VKCopyBufferToImageData, 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, VKCopyImageToBufferData, 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, 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 ( )
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 275 of file vk_render_graph_node.hh.

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

◆ set_node_data()

template<typename NodeInfo >
void blender::gpu::render_graph::VKRenderGraphNode::set_node_data ( 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 85 of file vk_render_graph_node.hh.

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

Member Data Documentation

◆ [union]

◆ begin_query

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

Definition at line 52 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ begin_rendering

VKBeginRenderingNode::Data blender::gpu::render_graph::VKRenderGraphNode::begin_rendering

Definition at line 53 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ blit_image

VKBlitImageNode::Data blender::gpu::render_graph::VKRenderGraphNode::blit_image

Definition at line 54 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ clear_attachments

VKClearAttachmentsNode::Data blender::gpu::render_graph::VKRenderGraphNode::clear_attachments

Definition at line 55 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 56 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 57 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ copy_buffer

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

Definition at line 58 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ copy_buffer_to_image

VKCopyBufferToImageNode::Data blender::gpu::render_graph::VKRenderGraphNode::copy_buffer_to_image

Definition at line 59 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ copy_image

VKCopyImageNode::Data blender::gpu::render_graph::VKRenderGraphNode::copy_image

Definition at line 60 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ copy_image_to_buffer

VKCopyImageToBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::copy_image_to_buffer

Definition at line 61 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ dispatch

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

Definition at line 62 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 63 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ draw

VKDrawNode::Data blender::gpu::render_graph::VKRenderGraphNode::draw

Definition at line 64 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ draw_indexed

VKDrawIndexedNode::Data blender::gpu::render_graph::VKRenderGraphNode::draw_indexed

Definition at line 65 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ draw_indexed_indirect

VKDrawIndexedIndirectNode::Data blender::gpu::render_graph::VKRenderGraphNode::draw_indexed_indirect

Definition at line 66 of file vk_render_graph_node.hh.

Referenced by build_commands(), and free_data().

◆ draw_indirect

VKDrawIndirectNode::Data blender::gpu::render_graph::VKRenderGraphNode::draw_indirect

Definition at line 67 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 68 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 69 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 70 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 71 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ synchronization

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

Definition at line 72 of file vk_render_graph_node.hh.

Referenced by build_commands().

◆ type

VKNodeType blender::gpu::render_graph::VKRenderGraphNode::type

Definition at line 50 of file vk_render_graph_node.hh.

◆ update_buffer

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

Definition at line 73 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 74 of file vk_render_graph_node.hh.

Referenced by build_commands().


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