| Index: gpu/vulkan/vulkan_descriptor_pool.h
|
| diff --git a/gpu/vulkan/vulkan_descriptor_pool.h b/gpu/vulkan/vulkan_descriptor_pool.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6d194602b95990af38c94fc0f761af36b8197216
|
| --- /dev/null
|
| +++ b/gpu/vulkan/vulkan_descriptor_pool.h
|
| @@ -0,0 +1,49 @@
|
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef GPU_VULKAN_VULKAN_DESCRIPTOR_POOL_H_
|
| +#define GPU_VULKAN_VULKAN_DESCRIPTOR_POOL_H_
|
| +
|
| +#include <vulkan/vulkan.h>
|
| +
|
| +#include <memory>
|
| +#include <vector>
|
| +
|
| +#include "base/macros.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +class VulkanDescriptorSet;
|
| +class VulkanDeviceQueue;
|
| +
|
| +class VulkanDescriptorPool {
|
| + public:
|
| + explicit VulkanDescriptorPool(VulkanDeviceQueue* device_queue);
|
| + ~VulkanDescriptorPool();
|
| +
|
| + bool Initialize(uint32_t max_descriptor_sets,
|
| + const std::vector<VkDescriptorPoolSize>& pool_sizes);
|
| + void Destroy();
|
| +
|
| + std::unique_ptr<VulkanDescriptorSet> CreateDescriptorSet(
|
| + const std::vector<VkDescriptorSetLayoutBinding>& layout);
|
| + VkDescriptorPool handle() { return handle_; }
|
| +
|
| + private:
|
| + friend class VulkanDescriptorSet;
|
| +
|
| + void IncrementDescriptorSetCount();
|
| + void DecrementDescriptorSetCount();
|
| +
|
| + VulkanDeviceQueue* device_queue_ = nullptr;
|
| + VkDescriptorPool handle_ = VK_NULL_HANDLE;
|
| + uint32_t max_descriptor_sets_ = 0;
|
| + uint32_t descriptor_count_ = 0;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(VulkanDescriptorPool);
|
| +};
|
| +
|
| +} // namespace gpu
|
| +
|
| +#endif // GPU_VULKAN_VULKAN_DESCRIPTOR_POOL_H_
|
|
|