Blender V5.0
blender::gpu::render_graph::VKRenderGraph Class Reference

#include <vk_render_graph.hh>

Inherits blender::NonCopyable.

Public Member Functions

 VKRenderGraph (VKResourceStateTracker &resources)
VKCopyBufferNode::Dataget_node_data (NodeHandle node_handle)
NodeHandle next_node_handle ()
bool is_empty ()
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::NonCopyable
 NonCopyable (const NonCopyable &other)=delete
NonCopyableoperator= (const NonCopyable &other)=delete
 NonCopyable ()=default
 NonCopyable (NonCopyable &&other)=default
NonCopyableoperator= (NonCopyable &&other)=default

Friends

class VKCommandBuilder
class VKScheduler

Detailed Description

Definition at line 64 of file vk_render_graph.hh.

Constructor & Destructor Documentation

◆ VKRenderGraph()

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 16 of file vk_render_graph.cc.

Member Function Documentation

◆ debug_group_begin()

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 64 of file vk_render_graph.cc.

References blender::gpu::debug::GPU_DEBUG_GROUP_COLOR_DEFAULT, and name.

Referenced by blender::gpu::VKContext::debug_group_begin().

◆ debug_group_end()

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 77 of file vk_render_graph.cc.

Referenced by blender::gpu::VKContext::debug_group_end().

◆ debug_print()

◆ full_debug_group()

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 105 of file vk_render_graph.cc.

References G, and G_DEBUG_GPU.

◆ get_node_data()

VKCopyBufferNode::Data & blender::gpu::render_graph::VKRenderGraph::get_node_data ( NodeHandle node_handle)
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 212 of file vk_render_graph.hh.

References BLI_assert, blender::gpu::render_graph::COPY_BUFFER, blender::gpu::render_graph::VKRenderGraphNode::copy_buffer, and blender::gpu::render_graph::VKRenderGraphNode::type.

◆ is_empty()

bool blender::gpu::render_graph::VKRenderGraph::is_empty ( )
inline

Definition at line 252 of file vk_render_graph.hh.

◆ memstats()

void blender::gpu::render_graph::VKRenderGraph::memstats ( ) const

Definition at line 37 of file vk_render_graph.cc.

References PRINT_STORAGE.

Referenced by reset().

◆ next_node_handle()

NodeHandle blender::gpu::render_graph::VKRenderGraph::next_node_handle ( )
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 247 of file vk_render_graph.hh.

◆ reset()

void blender::gpu::render_graph::VKRenderGraph::reset ( )

Reset the render graph.

Definition at line 18 of file vk_render_graph.cc.

References memstats().

◆ VKCommandBuilder

friend class VKCommandBuilder
friend

Definition at line 65 of file vk_render_graph.hh.

References VKCommandBuilder.

Referenced by VKCommandBuilder.

◆ VKScheduler

friend class VKScheduler
friend

Definition at line 66 of file vk_render_graph.hh.

References name, and VKScheduler.

Referenced by VKScheduler.

Member Data Documentation

◆ group_stack

Vector<DebugGroupNameID> blender::gpu::render_graph::VKRenderGraph::group_stack

Current stack of debug group names.

Definition at line 102 of file vk_render_graph.hh.

◆ group_used

bool blender::gpu::render_graph::VKRenderGraph::group_used = false

Has a node been added to the current stack? If not the group stack will be added to used_groups.

Definition at line 108 of file vk_render_graph.hh.

◆ groups

VectorSet<DebugGroup> blender::gpu::render_graph::VKRenderGraph::groups

Definition at line 99 of file vk_render_graph.hh.

◆ node_group_map

Vector<DebugGroupID> blender::gpu::render_graph::VKRenderGraph::node_group_map

Map of a node_handle to an index of debug group in used_groups.

<source> int used_group_id = node_group_map[node_handle]; const Vector<DebugGroupNameID> &used_group = used_groups[used_group_id]; </source>

Definition at line 121 of file vk_render_graph.hh.

◆ used_groups

Vector<Vector<DebugGroupNameID> > blender::gpu::render_graph::VKRenderGraph::used_groups

All used debug groups.

Definition at line 111 of file vk_render_graph.hh.


The documentation for this class was generated from the following files: