|
Blender V4.3
|
#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 | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable &&other)=default | |
| NonCopyable & | operator= (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 |
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.
| using blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::CreateInfo = NodeCreateInfo |
Definition at line 162 of file vk_node_info.hh.
| using blender::gpu::render_graph::VKNodeInfo< NodeType, NodeCreateInfo, NodeData, PipelineStage, ResourceUsages >::Data = NodeData |
Definition at line 163 of file vk_node_info.hh.
|
pure virtual |
Build the commands and add them to the command_buffer.
The command buffer is passed as an interface as this is replaced by a logger when running test cases. The test cases will validate the log to find out if the correct commands where added.
Implemented in blender::gpu::render_graph::VKBeginQueryNode, blender::gpu::render_graph::VKBeginRenderingNode, blender::gpu::render_graph::VKBlitImageNode, blender::gpu::render_graph::VKClearAttachmentsNode, blender::gpu::render_graph::VKClearColorImageNode, blender::gpu::render_graph::VKClearDepthStencilImageNode, blender::gpu::render_graph::VKCopyBufferNode, blender::gpu::render_graph::VKCopyBufferToImageNode, blender::gpu::render_graph::VKCopyImageNode, blender::gpu::render_graph::VKCopyImageToBufferNode, blender::gpu::render_graph::VKDispatchIndirectNode, blender::gpu::render_graph::VKDispatchNode, blender::gpu::render_graph::VKDrawIndexedIndirectNode, blender::gpu::render_graph::VKDrawIndexedNode, blender::gpu::render_graph::VKDrawIndirectNode, blender::gpu::render_graph::VKDrawNode, blender::gpu::render_graph::VKEndQueryNode, blender::gpu::render_graph::VKEndRenderingNode, blender::gpu::render_graph::VKFillBufferNode, blender::gpu::render_graph::VKResetQueryPoolNode, blender::gpu::render_graph::VKSynchronizationNode, blender::gpu::render_graph::VKUpdateBufferNode, and blender::gpu::render_graph::VKUpdateMipmapsNode.
|
pure virtual |
Extract read/write resource dependencies from create_info and add them to node_links.
Implemented in blender::gpu::render_graph::VKBeginQueryNode, blender::gpu::render_graph::VKBeginRenderingNode, blender::gpu::render_graph::VKBlitImageNode, blender::gpu::render_graph::VKClearAttachmentsNode, blender::gpu::render_graph::VKClearColorImageNode, blender::gpu::render_graph::VKClearDepthStencilImageNode, blender::gpu::render_graph::VKCopyBufferNode, blender::gpu::render_graph::VKCopyBufferToImageNode, blender::gpu::render_graph::VKCopyImageNode, blender::gpu::render_graph::VKCopyImageToBufferNode, blender::gpu::render_graph::VKDispatchIndirectNode, blender::gpu::render_graph::VKDispatchNode, blender::gpu::render_graph::VKDrawIndexedIndirectNode, blender::gpu::render_graph::VKDrawIndexedNode, blender::gpu::render_graph::VKDrawIndirectNode, blender::gpu::render_graph::VKDrawNode, blender::gpu::render_graph::VKEndQueryNode, blender::gpu::render_graph::VKEndRenderingNode, blender::gpu::render_graph::VKFillBufferNode, blender::gpu::render_graph::VKResetQueryPoolNode, blender::gpu::render_graph::VKSynchronizationNode, blender::gpu::render_graph::VKUpdateBufferNode, and blender::gpu::render_graph::VKUpdateMipmapsNode.
|
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.
|
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.
|
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.
|
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.