Blender V4.3
vk_pipeline_data.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_common.hh"
12
14class VKCommandBufferInterface;
15struct VKRenderGraphNodeLinks;
16class VKResourceStateTracker;
17
30
33 VkPipeline vk_pipeline;
34 VkDescriptorSet vk_descriptor_set;
35};
36
38 VkBuffer buffer;
39 VkIndexType index_type;
40
41 bool operator==(const VKIndexBufferBinding &other) const
42 {
43 return buffer == other.buffer && index_type == other.index_type;
44 }
45 bool operator!=(const VKIndexBufferBinding &other) const
46 {
47 return !(*this == other);
48 }
49};
50
53 VkBuffer buffer[16];
54 VkDeviceSize offset[16];
55
56 bool operator==(const VKVertexBufferBindings &other) const
57 {
58 return buffer_count == other.buffer_count &&
60 Span<VkBuffer>(other.buffer, other.buffer_count) &&
62 Span<VkDeviceSize>(other.offset, buffer_count);
63 }
64 bool operator!=(const VKVertexBufferBindings &other) const
65 {
66 return !(*this == other);
67 }
68};
69
84
92void vk_pipeline_data_copy(VKPipelineData &dst, const VKPipelineData &src);
93
105void vk_pipeline_data_build_commands(VKCommandBufferInterface &command_buffer,
106 const VKPipelineData &pipeline_data,
107 VKBoundPipeline &r_bound_pipeline,
108 VkPipelineBindPoint vk_pipeline_bind_point,
109 VkShaderStageFlags vk_shader_stage_flags);
110
114void vk_pipeline_data_free(VKPipelineData &data);
115
116void vk_index_buffer_binding_build_links(VKResourceStateTracker &resources,
117 VKRenderGraphNodeLinks &node_links,
118 const VKIndexBufferBinding &index_buffer_binding);
119void vk_index_buffer_binding_build_commands(VKCommandBufferInterface &command_buffer,
120 const VKIndexBufferBinding &index_buffer_binding,
121 VKIndexBufferBinding &r_bound_index_buffer);
122void vk_vertex_buffer_bindings_build_links(VKResourceStateTracker &resources,
123 VKRenderGraphNodeLinks &node_links,
124 const VKVertexBufferBindings &vertex_buffer_bindings);
125void vk_vertex_buffer_bindings_build_commands(VKCommandBufferInterface &command_buffer,
126 const VKVertexBufferBindings &vertex_buffer_bindings,
127 VKVertexBufferBindings &r_bound_vertex_buffers);
128
129} // namespace blender::gpu::render_graph
void vk_pipeline_data_copy(VKPipelineData &dst, const VKPipelineData &src)
void vk_index_buffer_binding_build_commands(VKCommandBufferInterface &command_buffer, const VKIndexBufferBinding &index_buffer_binding, VKIndexBufferBinding &r_bound_index_buffer)
void vk_index_buffer_binding_build_links(VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const VKIndexBufferBinding &index_buffer_binding)
void vk_vertex_buffer_bindings_build_links(VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const VKVertexBufferBindings &vertex_buffers)
void vk_pipeline_data_free(VKPipelineData &data)
void vk_vertex_buffer_bindings_build_commands(VKCommandBufferInterface &command_buffer, const VKVertexBufferBindings &vertex_buffer_bindings, VKVertexBufferBindings &r_bound_vertex_buffers)
void vk_pipeline_data_build_commands(VKCommandBufferInterface &command_buffer, const VKPipelineData &pipeline_data, VKBoundPipeline &r_bound_pipeline, VkPipelineBindPoint vk_pipeline_bind_point, VkShaderStageFlags vk_shader_stage_flags)
unsigned int uint32_t
Definition stdint.h:80
struct blender::gpu::render_graph::VKBoundPipelines::@660 graphics
bool operator==(const VKIndexBufferBinding &other) const
bool operator!=(const VKIndexBufferBinding &other) const
bool operator!=(const VKVertexBufferBindings &other) const
bool operator==(const VKVertexBufferBindings &other) const