mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Vulkan: Document lifetime for desc set pool.
This commit is contained in:
parent
8d06431ea7
commit
c2c16032fe
@ -137,16 +137,20 @@ private:
|
||||
VkBufferUsageFlags usage_;
|
||||
};
|
||||
|
||||
// Only appropriate for use in a per-frame pool.
|
||||
class VulkanDescSetPool {
|
||||
public:
|
||||
VulkanDescSetPool(const char *tag, bool grow) : tag_(tag), grow_(grow) {
|
||||
}
|
||||
~VulkanDescSetPool();
|
||||
|
||||
// Must call this before use: defines how to clear cache of ANY returned values from Allocate().
|
||||
void Setup(const std::function<void()> &clear) {
|
||||
clear_ = clear;
|
||||
}
|
||||
void Create(VulkanContext *vulkan, const VkDescriptorPoolCreateInfo &info, const std::vector<VkDescriptorPoolSize> &sizes);
|
||||
// Allocate a new set, which may resize and empty the current sets.
|
||||
// Use only for the current frame, unless in a cache cleared by clear_.
|
||||
VkDescriptorSet Allocate(int n, const VkDescriptorSetLayout *layouts);
|
||||
void Reset();
|
||||
void Destroy();
|
||||
|
Loading…
Reference in New Issue
Block a user