|
16 | 16 | // TODO: Compute stages. |
17 | 17 | // TODO: Uniform buffers. |
18 | 18 |
|
19 | | -// Forward declarations |
20 | 19 | namespace inexor::vulkan_renderer::wrapper { |
21 | | -class CommandBuffer; |
| 20 | +// Forward declaration |
22 | 21 | class Shader; |
23 | 22 | }; // namespace inexor::vulkan_renderer::wrapper |
24 | 23 |
|
| 24 | +namespace inexor::vulkan_renderer::wrapper::commands { |
| 25 | +// Forward declaration |
| 26 | +class CommandBuffer; |
| 27 | +} // namespace inexor::vulkan_renderer::wrapper::commands |
| 28 | + |
25 | 29 | namespace inexor::vulkan_renderer { |
26 | 30 |
|
27 | 31 | // Forward declarations |
28 | 32 | class PhysicalResource; |
29 | 33 | class PhysicalStage; |
30 | 34 | class RenderGraph; |
31 | 35 |
|
| 36 | +// Using declaration |
| 37 | +using wrapper::commands::CommandBuffer; |
| 38 | + |
32 | 39 | /// @brief Base class of all render graph objects (resources and stages). |
33 | 40 | /// @note This is just for internal use. |
34 | 41 | struct RenderGraphObject { |
@@ -167,7 +174,7 @@ class RenderStage : public RenderGraphObject { |
167 | 174 |
|
168 | 175 | std::vector<VkDescriptorSetLayout> m_descriptor_layouts; |
169 | 176 | std::vector<VkPushConstantRange> m_push_constant_ranges; |
170 | | - std::function<void(const PhysicalStage &, const wrapper::CommandBuffer &)> m_on_record{[](auto &, auto &) {}}; |
| 177 | + std::function<void(const PhysicalStage &, const CommandBuffer &)> m_on_record{[](auto &, auto &) {}}; |
171 | 178 |
|
172 | 179 | protected: |
173 | 180 | explicit RenderStage(std::string name) : m_name(std::move(name)) {} |
@@ -393,7 +400,7 @@ class RenderGraph { |
393 | 400 |
|
394 | 401 | // Functions for building stage related vulkan objects. |
395 | 402 | void build_pipeline_layout(const RenderStage *, PhysicalStage &) const; |
396 | | - void record_command_buffer(const RenderStage *, const wrapper::CommandBuffer &cmd_buf, |
| 403 | + void record_command_buffer(const RenderStage *, const wrapper::commands::CommandBuffer &cmd_buf, |
397 | 404 | std::uint32_t image_index) const; |
398 | 405 |
|
399 | 406 | // Functions for building graphics stage related vulkan objects. |
@@ -427,7 +434,7 @@ class RenderGraph { |
427 | 434 | /// @brief Submits the command frame's command buffers for drawing. |
428 | 435 | /// @param image_index The current image index, retrieved from Swapchain::acquire_next_image |
429 | 436 | /// @param cmd_buf The command buffer |
430 | | - void render(std::uint32_t image_index, const wrapper::CommandBuffer &cmd_buf); |
| 437 | + void render(std::uint32_t image_index, const wrapper::commands::CommandBuffer &cmd_buf); |
431 | 438 | }; |
432 | 439 |
|
433 | 440 | template <typename T> |
|
0 commit comments