Flutter Impeller
impeller::DescriptorPoolVK Class Reference

A short-lived dynamically-sized descriptor pool. Descriptors from this pool don't need to be freed individually. Instead, the pool must be collected after all the descriptors allocated from it are done being used. More...

#include <descriptor_pool_vk.h>

Public Member Functions

 DescriptorPoolVK (const std::weak_ptr< const DeviceHolder > &device_holder)
 
 ~DescriptorPoolVK ()
 
std::optional< vk::DescriptorSet > AllocateDescriptorSet (const vk::DescriptorSetLayout &layout, size_t command_count)
 

Detailed Description

A short-lived dynamically-sized descriptor pool. Descriptors from this pool don't need to be freed individually. Instead, the pool must be collected after all the descriptors allocated from it are done being used.

The pool or it's descriptors may not be accessed from multiple threads.

Encoders create pools as necessary as they have the same threading and lifecycle restrictions.

Definition at line 28 of file descriptor_pool_vk.h.

Constructor & Destructor Documentation

◆ DescriptorPoolVK()

impeller::DescriptorPoolVK::DescriptorPoolVK ( const std::weak_ptr< const DeviceHolder > &  device_holder)
explicit

Definition at line 13 of file descriptor_pool_vk.cc.

15  : device_holder_(device_holder) {
16  FML_DCHECK(device_holder.lock());
17 }

◆ ~DescriptorPoolVK()

impeller::DescriptorPoolVK::~DescriptorPoolVK ( )
default

Member Function Documentation

◆ AllocateDescriptorSet()

std::optional< vk::DescriptorSet > impeller::DescriptorPoolVK::AllocateDescriptorSet ( const vk::DescriptorSetLayout &  layout,
size_t  command_count 
)

Definition at line 40 of file descriptor_pool_vk.cc.

42  {
43  if (pools_.empty()) {
44  pool_size_ = command_count;
45  }
46  return AllocateDescriptorSet(layout);
47 }

The documentation for this class was generated from the following files:
impeller::DescriptorPoolVK::AllocateDescriptorSet
std::optional< vk::DescriptorSet > AllocateDescriptorSet(const vk::DescriptorSetLayout &layout, size_t command_count)
Definition: descriptor_pool_vk.cc:40