|
Blender V5.3
|
#include <vk_render_graph.hh>
Inherits blender::blender::NonCopyable.
Public Member Functions | |
| template<typename NodeInfo> | |
| VKNodeData< NodeInfo > | alloc_node () |
| template<typename NodeInfo> | |
| void | finalize_node (NodeHandle node_handle, const typename NodeInfo::CreateInfo &create_info) |
| VKCopyBufferNode::Data & | get_node_data (NodeHandle node_handle) |
| IndexRange | copy_push_constants (Span< uint8_t > push_constants) |
| NodeHandle | next_node_handle () |
| bool | is_empty () |
| void | deref_resources () |
| Span< VKRenderGraphImage > | linked_images (const VKRenderGraphNode &node) const |
| Span< VKRenderGraphImage > | linked_images (const NodeHandle node_handle) const |
| Span< VKRenderGraphBuffer > | linked_buffers (const VKRenderGraphNode &node) const |
| Span< VKRenderGraphBuffer > | linked_buffers (const NodeHandle node_handle) const |
Render Graph | |
| VKRenderGraph (VKResourceStateTracker &resources) | |
| void | reset () |
| void | memstats () const |
Debug | |
| void | debug_group_begin (const char *name, const ColorTheme4f &color) |
| void | debug_group_end () |
| std::string | full_debug_group (NodeHandle node_handle) const |
| void | debug_print (NodeHandle node_handle) const |
| Public Member Functions inherited from blender::blender::NonCopyable | |
| NonCopyable (const NonCopyable &other)=delete | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable &&other)=default | |
| NonCopyable & | operator= (NonCopyable &&other)=default |
Friends | |
| class | VKCommandBuilder |
| class | VKScheduler |
Definition at line 79 of file vk_render_graph.hh.
| blender::gpu::render_graph::VKRenderGraph::VKRenderGraph | ( | VKResourceStateTracker & | resources | ) |
Construct a new render graph instance.
To improve testability the command buffer and resources they work on are provided as a parameter.
Definition at line 20 of file vk_render_graph.cc.
|
inline |
Allocate a draw node in the render graph.
Returns a reference to the in-place storage data that the caller can fill before calling finalize_node.
Definition at line 161 of file vk_render_graph.hh.
References blender::data, and node.
Referenced by blender::gpu::VKBatch::draw(), blender::gpu::VKImmediate::end(), and blender::gpu::VKBatch::multi_draw_indirect().
|
inline |
To reduce small allocations the caller can copy push constants inside the render graph. The returned index range can than be used by the command builder to retrieve the push constants.
Definition at line 306 of file vk_render_graph.hh.
References blender::IndexRange::from_begin_size(), and blender::Span< T >::size().
| void blender::gpu::render_graph::VKRenderGraph::debug_group_begin | ( | const char * | name, |
| const ColorTheme4f & | color ) |
Push a new debugging group to the stack with the given name.
New nodes added to the render graph will be associated with this debug group.
Definition at line 73 of file vk_render_graph.cc.
Referenced by blender::gpu::VKContext::debug_group_begin().
| void blender::gpu::render_graph::VKRenderGraph::debug_group_end | ( | ) |
Pop the top of the debugging group stack.
New nodes added to the render graph will be associated with the parent of the current debug group.
Definition at line 84 of file vk_render_graph.cc.
Referenced by blender::gpu::VKContext::debug_group_end().
| void blender::gpu::render_graph::VKRenderGraph::debug_print | ( | NodeHandle | node_handle | ) | const |
Definition at line 90 of file vk_render_graph.cc.
References node.
|
inline |
Release the graph's reference to each in-use resource.
Call once after the graph's work has been submitted; zero-ref resources become discardable.
Definition at line 365 of file vk_render_graph.hh.
Referenced by reset().
|
inline |
Finalize a draw node that was previously allocated via alloc_node.
Builds resource links, records debug groups, etc.
Definition at line 176 of file vk_render_graph.hh.
References blender::BLI_assert(), finalize_node(), blender::G, blender::G_DEBUG_GPU, lock, and node.
Referenced by finalize_node().
| std::string blender::gpu::render_graph::VKRenderGraph::full_debug_group | ( | NodeHandle | node_handle | ) | const |
Return the full debug group of the given node_handle. Returns an empty string when debug groups are not enabled (--debug-gpu).
Definition at line 98 of file vk_render_graph.cc.
References blender::G, and blender::G_DEBUG_GPU.
|
inline |
Get the reference to the node data for a VKCopyBufferNode.
Allows altering a previous added node. Is useful to reduce barriers when a streaming buffer requires data that can still fit in the previous copy command.
Definition at line 294 of file vk_render_graph.hh.
References blender::BLI_assert(), blender::gpu::render_graph::COPY_BUFFER, and node.
|
inline |
Definition at line 346 of file vk_render_graph.hh.
|
inline |
Get the buffers that are linked by the given node_handle.
Definition at line 389 of file vk_render_graph.hh.
References linked_buffers().
|
inline |
Get the buffers that are linked by the given node.
Definition at line 384 of file vk_render_graph.hh.
References node.
Referenced by linked_buffers().
|
inline |
Get the images that are linked by the given node_handle.
Definition at line 379 of file vk_render_graph.hh.
References linked_images().
|
inline |
Get the images that are linked by the given node.
Definition at line 374 of file vk_render_graph.hh.
References node.
Referenced by linked_images().
| void blender::gpu::render_graph::VKRenderGraph::memstats | ( | ) | const |
|
inline |
Utility function that is used during debugging.
When debugging most of the time know the node_handle that is needed after the node has been constructed. When haunting a bug it is more useful to query what the next node handle will be so you can step through the node building process.
Definition at line 341 of file vk_render_graph.hh.
| void blender::gpu::render_graph::VKRenderGraph::reset | ( | ) |
Reset the render graph.
Clears the nodes, links and storage, and releases the graph's resource references.
Definition at line 22 of file vk_render_graph.cc.
References deref_resources(), memstats(), and node.
|
friend |
Definition at line 80 of file vk_render_graph.hh.
References VKCommandBuilder.
Referenced by VKCommandBuilder.
|
friend |
Definition at line 81 of file vk_render_graph.hh.
References b, hash, blender::gpu::operator==(), and VKScheduler.
Referenced by VKScheduler.