Blender
V4.3
source
blender
gpu
vulkan
render_graph
nodes
vk_synchronization_node.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
9
#pragma once
10
11
#include "
vk_node_info.hh
"
12
13
namespace
blender::gpu::render_graph
{
14
18
struct
VKSynchronizationData
{};
19
23
struct
VKSynchronizationCreateInfo
{
24
VkImage
vk_image
;
25
VkImageLayout
vk_image_layout
;
26
VkImageAspectFlags
vk_image_aspect
;
27
};
28
29
class
VKSynchronizationNode
:
public
VKNodeInfo
<VKNodeType::SYNCHRONIZATION,
30
VKSynchronizationCreateInfo,
31
VKSynchronizationData,
32
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
33
VKResourceType::IMAGE | VKResourceType::BUFFER> {
34
public
:
42
template
<
typename
Node>
static
void
set_node_data
(
Node
&node,
const
CreateInfo
&create_info)
43
{
44
UNUSED_VARS
(create_info);
45
node.synchronization = {};
46
}
47
51
void
build_links
(
VKResourceStateTracker
&resources,
52
VKRenderGraphNodeLinks
&node_links,
53
const
CreateInfo
&create_info)
override
54
{
55
ResourceWithStamp
resource = resources.
get_image_and_increase_stamp
(create_info.
vk_image
);
56
node_links.
outputs
.append(
57
{resource, VK_ACCESS_NONE, create_info.
vk_image_layout
, create_info.
vk_image_aspect
});
58
}
59
63
void
build_commands
(
VKCommandBufferInterface
&command_buffer,
64
Data
&data,
65
VKBoundPipelines
&
/*r_bound_pipelines*/
)
override
66
{
67
UNUSED_VARS
(command_buffer, data);
68
/* Intentionally left empty: A pipeline barrier has already been send to the command buffer.
69
*/
70
}
71
};
72
}
// namespace blender::gpu::render_graph
UNUSED_VARS
#define UNUSED_VARS(...)
Definition
BLI_utildefines.h:533
blender::gpu::render_graph::VKCommandBufferInterface
Definition
vk_command_buffer_wrapper.hh:14
blender::gpu::render_graph::VKNodeInfo
Definition
vk_node_info.hh:159
blender::gpu::render_graph::VKResourceStateTracker
Definition
vk_resource_state_tracker.hh:121
blender::gpu::render_graph::VKResourceStateTracker::get_image_and_increase_stamp
ResourceWithStamp get_image_and_increase_stamp(VkImage vk_image)
Definition
vk_resource_state_tracker.cc:134
blender::gpu::render_graph::VKSynchronizationNode
Definition
vk_synchronization_node.hh:33
blender::gpu::render_graph::VKSynchronizationNode::build_commands
void build_commands(VKCommandBufferInterface &command_buffer, Data &data, VKBoundPipelines &) override
Definition
vk_synchronization_node.hh:63
blender::gpu::render_graph::VKSynchronizationNode::set_node_data
static void set_node_data(Node &node, const CreateInfo &create_info)
Definition
vk_synchronization_node.hh:42
blender::gpu::render_graph::VKSynchronizationNode::build_links
void build_links(VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const CreateInfo &create_info) override
Definition
vk_synchronization_node.hh:51
blender::gpu::render_graph
Definition
vk_begin_query_node.hh:13
Node
Definition
graph/node.h:90
blender::gpu::render_graph::ResourceWithStamp
Definition
vk_resource_state_tracker.hh:61
blender::gpu::render_graph::VKBoundPipelines
Definition
vk_pipeline_data.hh:74
blender::gpu::render_graph::VKRenderGraphNodeLinks
Definition
vk_render_graph_links.hh:68
blender::gpu::render_graph::VKRenderGraphNodeLinks::outputs
Vector< VKRenderGraphLink > outputs
Definition
vk_render_graph_links.hh:72
blender::gpu::render_graph::VKSynchronizationCreateInfo
Definition
vk_synchronization_node.hh:23
blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image
VkImage vk_image
Definition
vk_synchronization_node.hh:24
blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image_aspect
VkImageAspectFlags vk_image_aspect
Definition
vk_synchronization_node.hh:26
blender::gpu::render_graph::VKSynchronizationCreateInfo::vk_image_layout
VkImageLayout vk_image_layout
Definition
vk_synchronization_node.hh:25
blender::gpu::render_graph::VKSynchronizationData
Definition
vk_synchronization_node.hh:18
vk_node_info.hh
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0