Blender V4.3
vk_resource_pool.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
14#include "vk_immediate.hh"
15
16namespace blender::gpu {
17class VKDevice;
18
30 friend class VKDevice;
31
32 private:
35 Vector<VkImageView> image_views_;
36 Vector<VkShaderModule> shader_modules_;
37 Vector<VkPipelineLayout> pipeline_layouts_;
38 std::mutex mutex_;
39
40 public:
41 void deinit(VKDevice &device);
42
43 void discard_image(VkImage vk_image, VmaAllocation vma_allocation);
44 void discard_image_view(VkImageView vk_image_view);
45 void discard_buffer(VkBuffer vk_buffer, VmaAllocation vma_allocation);
46 void discard_shader_module(VkShaderModule vk_shader_module);
47 void discard_pipeline_layout(VkPipelineLayout vk_pipeline_layout);
55 void move_data(VKDiscardPool &src_pool);
57};
58
71} // namespace blender::gpu
void init()
void discard_image_view(VkImageView vk_image_view)
void discard_shader_module(VkShaderModule vk_shader_module)
void discard_image(VkImage vk_image, VmaAllocation vma_allocation)
void discard_buffer(VkBuffer vk_buffer, VmaAllocation vma_allocation)
void deinit(VKDevice &device)
void move_data(VKDiscardPool &src_pool)
void discard_pipeline_layout(VkPipelineLayout vk_pipeline_layout)
void destroy_discarded_resources(VKDevice &device)
VKDescriptorSetTracker descriptor_set
void deinit(VKDevice &device)