|
Blender V5.0
|
#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) |
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.
|
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.
|
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.
|
inline |
Free data kept by the node
Definition at line 266 of file vk_render_graph_node.hh.
References blender::gpu::render_graph::BEGIN_QUERY, blender::gpu::render_graph::BEGIN_RENDERING, 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, 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, blender::gpu::render_graph::END_RENDERING, blender::gpu::render_graph::FILL_BUFFER, FREE_DATA, FREE_DATA_STORAGE, blender::gpu::render_graph::RESET_QUERY_POOL, blender::gpu::render_graph::SYNCHRONIZATION, type, blender::gpu::render_graph::UNUSED, blender::gpu::render_graph::UPDATE_BUFFER, update_buffer, and blender::gpu::render_graph::UPDATE_MIPMAPS.
Referenced by reset().
|
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.
|
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.
|
inline |
Set the data of the node.
Pre-conditions:
Definition at line 112 of file vk_render_graph_node.hh.
References BLI_assert, type, and blender::gpu::render_graph::UNUSED.
| union { ... } blender::gpu::render_graph::VKRenderGraphNode |
| VKBeginQueryNode::Data blender::gpu::render_graph::VKRenderGraphNode::begin_query |
Definition at line 87 of file vk_render_graph_node.hh.
Referenced by build_commands().
| 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().
| 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().
| VKCopyBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::copy_buffer |
Definition at line 90 of file vk_render_graph_node.hh.
Referenced by build_commands(), and blender::gpu::render_graph::VKRenderGraph::get_node_data().
| 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().
| 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().
| VKEndQueryNode::Data blender::gpu::render_graph::VKRenderGraphNode::end_query |
Definition at line 93 of file vk_render_graph_node.hh.
Referenced by build_commands().
| VKEndRenderingNode::Data blender::gpu::render_graph::VKRenderGraphNode::end_rendering |
Definition at line 94 of file vk_render_graph_node.hh.
Referenced by build_commands().
| VKFillBufferNode::Data blender::gpu::render_graph::VKRenderGraphNode::fill_buffer |
Definition at line 95 of file vk_render_graph_node.hh.
Referenced by build_commands().
| 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().
| int64_t blender::gpu::render_graph::VKRenderGraphNode::storage_index = -1 |
Definition at line 100 of file vk_render_graph_node.hh.
Referenced by reset().
| VKSynchronizationNode::Data blender::gpu::render_graph::VKRenderGraphNode::synchronization |
Definition at line 97 of file vk_render_graph_node.hh.
Referenced by build_commands().
| VKNodeType blender::gpu::render_graph::VKRenderGraphNode::type |
Definition at line 85 of file vk_render_graph_node.hh.
Referenced by build_commands(), blender::gpu::render_graph::VKRenderGraph::debug_print(), free_data(), blender::gpu::render_graph::VKRenderGraph::get_node_data(), pipeline_stage_get(), reset(), and set_node_data().
| 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().
| VKUpdateMipmapsNode::Data blender::gpu::render_graph::VKRenderGraphNode::update_mipmaps |
Definition at line 99 of file vk_render_graph_node.hh.
Referenced by build_commands().