Blender V5.0
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
8
9#pragma once
10
11#include "vk_common.hh"
12
17
24 VkPipeline vk_pipeline;
25 VkPipelineLayout vk_pipeline_layout;
26 VkDescriptorSet vk_descriptor_set;
27 /* VK_EXT_descriptor_buffer */
30
33};
34
42
43 bool operator==(const VKViewportData &other) const
44 {
45 if (viewports.size() != other.viewports.size() && scissors.size() != other.scissors.size()) {
46 return false;
47 }
48
49 if (memcmp(viewports.data(), other.viewports.data(), viewports.size() * sizeof(VkViewport)) !=
50 0)
51 {
52 return false;
53 }
54
55 if (memcmp(scissors.data(), other.scissors.data(), scissors.size() * sizeof(VkRect2D)) != 0) {
56 return false;
57 }
58
59 return true;
60 }
61
62 bool operator!=(const VKViewportData &other) const
63 {
64 return !(*this == other);
65 }
66};
67
73
76 VkPipeline vk_pipeline;
77 VkDescriptorSet vk_descriptor_set;
80};
81
83 VkBuffer buffer;
84 VkIndexType index_type;
85
86 bool operator==(const VKIndexBufferBinding &other) const
87 {
88 return buffer == other.buffer && index_type == other.index_type;
89 }
90 bool operator!=(const VKIndexBufferBinding &other) const
91 {
92 return !(*this == other);
93 }
94};
95
97 uint32_t buffer_count;
98 VkBuffer buffer[16];
99 VkDeviceSize offset[16];
100
109 bool operator!=(const VKVertexBufferBindings &other) const
110 {
111 return !(*this == other);
112 }
113};
114
131
139void vk_pipeline_data_copy(VKPipelineData &dst, const VKPipelineData &src);
145
153void vk_pipeline_dynamic_graphics_build_commands(VKCommandBufferInterface &command_buffer,
154 const VKViewportData &viewport,
155 const std::optional<float> line_width,
156 VKBoundPipelines &r_bound_pipelines);
157
169void vk_pipeline_data_build_commands(VKCommandBufferInterface &command_buffer,
170 const VKPipelineData &pipeline_data,
171 VKBoundPipeline &r_bound_pipeline,
172 VkPipelineBindPoint vk_pipeline_bind_point,
173 VkShaderStageFlags vk_shader_stage_flags);
174
178void vk_pipeline_data_free(VKPipelineData &data);
180{
181 vk_pipeline_data_free(data.pipeline_data);
182}
183
184void vk_index_buffer_binding_build_links(VKResourceStateTracker &resources,
185 VKRenderGraphNodeLinks &node_links,
186 const VKIndexBufferBinding &index_buffer_binding);
187void vk_index_buffer_binding_build_commands(VKCommandBufferInterface &command_buffer,
188 const VKIndexBufferBinding &index_buffer_binding,
189 VKIndexBufferBinding &r_bound_index_buffer);
190void vk_vertex_buffer_bindings_build_links(VKResourceStateTracker &resources,
191 VKRenderGraphNodeLinks &node_links,
192 const VKVertexBufferBindings &vertex_buffer_bindings);
193void vk_vertex_buffer_bindings_build_commands(VKCommandBufferInterface &command_buffer,
194 const VKVertexBufferBindings &vertex_buffer_bindings,
195 VKVertexBufferBindings &r_bound_vertex_buffers);
196
197} // namespace blender::gpu::render_graph
BMesh const char void * data
int64_t size() const
T * data()
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_pipeline_dynamic_graphics_build_commands(VKCommandBufferInterface &command_buffer, const VKViewportData &viewport, const std::optional< float > line_width, VKBoundPipelines &r_bound_pipelines)
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)
struct blender::gpu::render_graph::VKBoundPipelines::@245157173206043141117177130032265241203257234004 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
bool operator!=(const VKViewportData &other) const
bool operator==(const VKViewportData &other) const