Blender V4.5
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
70 VkPipeline vk_pipeline;
71 VkDescriptorSet vk_descriptor_set;
74};
75
77 VkBuffer buffer;
78 VkIndexType index_type;
79
80 bool operator==(const VKIndexBufferBinding &other) const
81 {
82 return buffer == other.buffer && index_type == other.index_type;
83 }
84 bool operator!=(const VKIndexBufferBinding &other) const
85 {
86 return !(*this == other);
87 }
88};
89
91 uint32_t buffer_count;
92 VkBuffer buffer[16];
93 VkDeviceSize offset[16];
94
103 bool operator!=(const VKVertexBufferBindings &other) const
104 {
105 return !(*this == other);
106 }
107};
108
124
132void vk_pipeline_data_copy(VKPipelineData &dst, const VKPipelineData &src);
133
139void vk_pipeline_viewport_set_commands(VKCommandBufferInterface &command_buffer,
140 const VKViewportData &viewport_data,
141 VKViewportData &r_viewport_state);
142
154void vk_pipeline_data_build_commands(VKCommandBufferInterface &command_buffer,
155 const VKPipelineData &pipeline_data,
156 VKBoundPipeline &r_bound_pipeline,
157 VkPipelineBindPoint vk_pipeline_bind_point,
158 VkShaderStageFlags vk_shader_stage_flags);
159
163void vk_pipeline_data_free(VKPipelineData &data);
164
165void vk_index_buffer_binding_build_links(VKResourceStateTracker &resources,
166 VKRenderGraphNodeLinks &node_links,
167 const VKIndexBufferBinding &index_buffer_binding);
168void vk_index_buffer_binding_build_commands(VKCommandBufferInterface &command_buffer,
169 const VKIndexBufferBinding &index_buffer_binding,
170 VKIndexBufferBinding &r_bound_index_buffer);
171void vk_vertex_buffer_bindings_build_links(VKResourceStateTracker &resources,
172 VKRenderGraphNodeLinks &node_links,
173 const VKVertexBufferBindings &vertex_buffer_bindings);
174void vk_vertex_buffer_bindings_build_commands(VKCommandBufferInterface &command_buffer,
175 const VKVertexBufferBindings &vertex_buffer_bindings,
176 VKVertexBufferBindings &r_bound_vertex_buffers);
177
178} // 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_vertex_buffer_bindings_build_links(VKResourceStateTracker &resources, VKRenderGraphNodeLinks &node_links, const VKVertexBufferBindings &vertex_buffers)
void vk_pipeline_data_free(VKPipelineData &data)
void vk_pipeline_viewport_set_commands(VKCommandBufferInterface &command_buffer, const VKViewportData &viewport_data, VKViewportData &r_viewport_state)
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::@030044156013015231354074031170364157315270372173 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