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

Unified Diff: gpu/vulkan/vulkan_command_pool.h

Issue 1776453003: Added initial implementation of Vulkan Render Passes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_vulkan
Patch Set: Adding logging/macros headers Created 4 years, 9 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_command_buffer.cc ('k') | gpu/vulkan/vulkan_command_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/vulkan_command_pool.h
diff --git a/gpu/vulkan/vulkan_command_pool.h b/gpu/vulkan/vulkan_command_pool.h
new file mode 100644
index 0000000000000000000000000000000000000000..091fd4efb3b04e885e849199655e0f54e84a5eb7
--- /dev/null
+++ b/gpu/vulkan/vulkan_command_pool.h
@@ -0,0 +1,46 @@
+// 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_COMMAND_POOL_H_
+#define GPU_VULKAN_VULKAN_COMMAND_POOL_H_
+
+#include <vulkan/vulkan.h>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace gpu {
+
+class VulkanCommandBuffer;
+
+class VulkanCommandPool {
+ public:
+ VulkanCommandPool(VkDevice device, uint32_t queue_index);
+ ~VulkanCommandPool();
+
+ bool Initialize();
+ void Destroy();
+
+ scoped_ptr<VulkanCommandBuffer> CreatePrimaryCommandBuffer();
+ scoped_ptr<VulkanCommandBuffer> CreateSecondaryCommandBuffer();
+
+ VkCommandPool handle() { return handle_; }
+
+ private:
+ friend class VulkanCommandBuffer;
+
+ void IncrementCommandBufferCount();
+ void DecrementCommandBufferCount();
+
+ VkDevice device_ = VK_NULL_HANDLE;
+ uint32_t queue_index_ = 0;
+ VkCommandPool handle_ = VK_NULL_HANDLE;
+ uint32_t command_buffer_count_ = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(VulkanCommandPool);
+};
+
+} // namespace gpu
+
+#endif // GPU_VULKAN_VULKAN_COMMAND_POOL_H_
« no previous file with comments | « gpu/vulkan/vulkan_command_buffer.cc ('k') | gpu/vulkan/vulkan_command_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698