Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: gpu/vulkan/vulkan_descriptor_set.h

Issue 1989013002: Added Vulkan Descriptor Sets and Samplers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separated out descriptor layout Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/vulkan/vulkan_descriptor_pool.cc ('k') | gpu/vulkan/vulkan_descriptor_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..71ba285460cc3e4eda322bcb3c058b09b98dc221
--- /dev/null
+++ b/gpu/vulkan/vulkan_descriptor_set.h
@@ -0,0 +1,60 @@
+// 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 VulkanDescriptorLayout;
+class VulkanDeviceQueue;
+
+class VULKAN_EXPORT VulkanDescriptorSet {
+ public:
+ ~VulkanDescriptorSet();
+
+ bool Initialize(const VulkanDescriptorLayout* 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_; }
+
+ private:
+ friend class VulkanDescriptorPool;
+ VulkanDescriptorSet(VulkanDeviceQueue* device_queue,
+ VulkanDescriptorPool* descriptor_pool);
+
+ VulkanDeviceQueue* device_queue_ = nullptr;
+ VulkanDescriptorPool* descriptor_pool_ = nullptr;
+ VkDescriptorSet handle_ = VK_NULL_HANDLE;
+
+ DISALLOW_COPY_AND_ASSIGN(VulkanDescriptorSet);
+};
+
+} // namespace gpu
+
+#endif // GPU_VULKAN_VULKAN_DESCRIPTOR_SET_H_
« no previous file with comments | « gpu/vulkan/vulkan_descriptor_pool.cc ('k') | gpu/vulkan/vulkan_descriptor_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698