|
Blender V4.3
|
#include <vk_render_graph.hh>
Inherits blender::NonCopyable.
Public Member Functions | |
| VKRenderGraph (std::unique_ptr< VKCommandBufferInterface > command_buffer, VKResourceStateTracker &resources) | |
| NodeHandle | next_node_handle () |
Submit graph | |
| void | submit_buffer_for_read (VkBuffer vk_buffer) |
| void | submit_for_present (VkImage vk_swapchain_image) |
| void | submit () |
| void | submit_synchronization_event (VkFence vk_fence) |
| void | wait_synchronization_event (VkFence vk_fence) |
Debug | |
| void | debug_group_begin (const char *name) |
| void | debug_group_end () |
| void | debug_print (NodeHandle node_handle) const |
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 |
Public Attributes | |
| VKSubmissionID | submission_id |
Friends | |
| class | VKCommandBuilder |
| class | VKScheduler |
Definition at line 64 of file vk_render_graph.hh.
| blender::gpu::render_graph::VKRenderGraph::VKRenderGraph | ( | std::unique_ptr< VKCommandBufferInterface > | command_buffer, |
| 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 13 of file vk_render_graph.cc.
References submission_id.
| void blender::gpu::render_graph::VKRenderGraph::debug_group_begin | ( | const char * | name | ) |
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 105 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 112 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 118 of file vk_render_graph.cc.
References blender::gpu::render_graph::VKRenderGraphNodeLinks::inputs, and blender::gpu::render_graph::VKRenderGraphNodeLinks::outputs.
|
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 259 of file vk_render_graph.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
| void blender::gpu::render_graph::VKRenderGraph::submit | ( | ) |
Submit full graph.
Definition at line 77 of file vk_render_graph.cc.
References submit_synchronization_event(), and wait_synchronization_event().
Referenced by blender::gpu::VKContext::flush_render_graph(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), and blender::gpu::render_graph::TEST().
| void blender::gpu::render_graph::VKRenderGraph::submit_buffer_for_read | ( | VkBuffer | vk_buffer | ) |
Submit partial graph to be able to read the expected result of the rendering commands affecting the given vk_buffer. This method is called from GPU_texture/storagebuf/indexbuf/vertbuf/_read. In vulkan the content of images cannot be read directly and always needs to be copied to a transfer buffer.
After calling this function the mapped memory of the vk_buffer would contain the data of the buffer.
Definition at line 66 of file vk_render_graph.cc.
References blender::gpu::render_graph::VKCommandBuilder::build_nodes(), lock, blender::gpu::render_graph::VKResourceStateTracker::mutex, blender::gpu::render_graph::VKScheduler::select_nodes_for_buffer(), and submission_id.
Referenced by blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), and blender::gpu::render_graph::TEST().
| void blender::gpu::render_graph::VKRenderGraph::submit_for_present | ( | VkImage | vk_swapchain_image | ) |
Submit partial graph to be able to present the expected result of the rendering commands affecting the given vk_swapchain_image. This method is called when performing a swap chain swap.
Pre conditions:
vk_swapchain_image needs to be a created using ResourceOwner::SWAP_CHAIN`.Post conditions:
vk_swapchain_image layout is transitioned to VK_IMAGE_LAYOUT_SRC_PRESENT. Definition at line 43 of file vk_render_graph.cc.
References blender::gpu::render_graph::VKCommandBuilder::build_nodes(), lock, blender::gpu::render_graph::VKResourceStateTracker::mutex, blender::gpu::render_graph::VKScheduler::select_nodes_for_image(), submission_id, blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image, blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image_aspect, and blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image_layout.
Referenced by blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), blender::gpu::render_graph::TEST(), and blender::gpu::render_graph::TEST().
| void blender::gpu::render_graph::VKRenderGraph::submit_synchronization_event | ( | VkFence | vk_fence | ) |
Submit render graph with CPU synchronization event.
Definition at line 84 of file vk_render_graph.cc.
References blender::gpu::render_graph::VKCommandBuilder::build_nodes(), lock, blender::gpu::render_graph::VKResourceStateTracker::mutex, blender::gpu::render_graph::VKScheduler::select_nodes(), and submission_id.
Referenced by submit().
| void blender::gpu::render_graph::VKRenderGraph::wait_synchronization_event | ( | VkFence | vk_fence | ) |
Wait and reset for a CPU synchronization event.
Definition at line 94 of file vk_render_graph.cc.
Referenced by submit().
|
friend |
Definition at line 65 of file vk_render_graph.hh.
|
friend |
Definition at line 66 of file vk_render_graph.hh.
| VectorSet<std::string> blender::gpu::render_graph::VKRenderGraph::group_names |
Definition at line 101 of file vk_render_graph.hh.
| Vector<DebugGroupNameID> blender::gpu::render_graph::VKRenderGraph::group_stack |
Current stack of debug group names.
Definition at line 104 of file vk_render_graph.hh.
| 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 107 of file vk_render_graph.hh.
| 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 118 of file vk_render_graph.hh.
| VKSubmissionID blender::gpu::render_graph::VKRenderGraph::submission_id |
Definition at line 122 of file vk_render_graph.hh.
Referenced by submit_buffer_for_read(), submit_for_present(), submit_synchronization_event(), and VKRenderGraph().
All used debug groups.
Definition at line 109 of file vk_render_graph.hh.