Blender V5.0
vk_end_query_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
8
9#pragma once
10
11#include "vk_node_info.hh"
12
14
19 VkQueryPool vk_query_pool;
20 uint32_t query_index;
21};
22
30class VKEndQueryNode : public VKNodeInfo<VKNodeType::END_QUERY,
31 VKEndQueryData,
32 VKEndQueryData,
33 VK_PIPELINE_STAGE_NONE,
34 VKResourceType::IMAGE> {
35 public:
43 template<typename Node, typename Storage>
44 void set_node_data(Node &node, Storage & /*storage*/, const CreateInfo &create_info)
45 {
46 node.end_query = create_info;
47 }
48
52 void build_links(VKResourceStateTracker & /*resources*/,
53 VKRenderGraphNodeLinks & /*node_links*/,
54 const CreateInfo & /*create_info*/) override
55 {
56 }
57
62 Data &data,
63 VKBoundPipelines & /*r_bound_pipelines*/) override
64 {
65 command_buffer.end_query(data.vk_query_pool, data.query_index);
66 }
67};
68} // namespace blender::gpu::render_graph
BMesh const char void * data
virtual void end_query(VkQueryPool vk_query_pool, uint32_t query_index)=0
void set_node_data(Node &node, Storage &, const CreateInfo &create_info)
void build_commands(VKCommandBufferInterface &command_buffer, Data &data, VKBoundPipelines &) override
void build_links(VKResourceStateTracker &, VKRenderGraphNodeLinks &, const CreateInfo &) override