| Index: gpu/vulkan/vulkan_descriptor_set.h
|
| diff --git a/gpu/vulkan/vulkan_descriptor_set.h b/gpu/vulkan/vulkan_descriptor_set.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..768c5d35e979608c96c9a7f0b9d812b4619ef196
|
| --- /dev/null
|
| +++ b/gpu/vulkan/vulkan_descriptor_set.h
|
| @@ -0,0 +1,61 @@
|
| +// 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_SET_H_
|
| +#define GPU_VULKAN_VULKAN_DESCRIPTOR_SET_H_
|
| +
|
| +#include <vulkan/vulkan.h>
|
| +
|
| +#include <memory>
|
| +#include <vector>
|
| +
|
| +#include "base/macros.h"
|
| +#include "gpu/vulkan/vulkan_export.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +class VulkanDescriptorPool;
|
| +class VulkanDeviceQueue;
|
| +
|
| +class VULKAN_EXPORT VulkanDescriptorSet {
|
| + public:
|
| + ~VulkanDescriptorSet();
|
| +
|
| + bool Initialize(const std::vector<VkDescriptorSetLayoutBinding>& layout);
|
| + void Destroy();
|
| +
|
| + void WriteToDescriptorSet(uint32_t dst_binding,
|
| + uint32_t dst_array_element,
|
| + uint32_t descriptor_count,
|
| + VkDescriptorType descriptor_type,
|
| + const VkDescriptorImageInfo* image_info,
|
| + const VkDescriptorBufferInfo* buffer_info,
|
| + const VkBufferView* texel_buffer_view);
|
| +
|
| + void CopyFromDescriptorSet(const VulkanDescriptorSet* source_set,
|
| + uint32_t src_binding,
|
| + uint32_t src_array_element,
|
| + uint32_t dst_binding,
|
| + uint32_t dst_array_element,
|
| + uint32_t descriptor_count);
|
| +
|
| + VkDescriptorSet handle() const { return handle_; }
|
| + VkDescriptorSetLayout layout() const { return layout_; }
|
| +
|
| + private:
|
| + friend class VulkanDescriptorPool;
|
| + explicit VulkanDescriptorSet(VulkanDeviceQueue* device_queue,
|
| + VulkanDescriptorPool* descriptor_pool);
|
| +
|
| + VulkanDeviceQueue* device_queue_ = nullptr;
|
| + VulkanDescriptorPool* descriptor_pool_ = nullptr;
|
| + VkDescriptorSet handle_ = VK_NULL_HANDLE;
|
| + VkDescriptorSetLayout layout_ = VK_NULL_HANDLE;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(VulkanDescriptorSet);
|
| +};
|
| +
|
| +} // namespace gpu
|
| +
|
| +#endif // GPU_VULKAN_VULKAN_DESCRIPTOR_SET_H_
|
|
|