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

Side by Side 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: Layout transitions done through render passes 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_VULKAN_VULKAN_COMMAND_POOL_H_
6 #define GPU_VULKAN_VULKAN_COMMAND_POOL_H_
7
8 #include <vulkan/vulkan.h>
9
10 #include "base/memory/scoped_ptr.h"
11
12 namespace gpu {
13
14 class VulkanCommandBuffer;
15
16 class VulkanCommandPool {
17 public:
18 VulkanCommandPool(VkDevice device, uint32_t queue_index);
19 ~VulkanCommandPool();
20
21 bool Initialize();
22 void Destroy();
23
24 scoped_ptr<VulkanCommandBuffer> CreatePrimaryCommandBuffer();
25 scoped_ptr<VulkanCommandBuffer> CreateSecondaryCommandBuffer();
26
27 VkCommandPool handle() { return handle_; }
28
29 private:
30 friend class VulkanCommandBuffer;
31
32 void IncrementCommandBufferCount();
33 void DecrementCommandBufferCount();
34
35 VkDevice device_ = VK_NULL_HANDLE;
36 uint32_t queue_index_ = 0;
37 VkCommandPool handle_ = VK_NULL_HANDLE;
38 uint32_t command_buffer_count_ = 0;
39
40 DISALLOW_COPY_AND_ASSIGN(VulkanCommandPool);
41 };
42
43 } // namespace gpu
44
45 #endif // GPU_VULKAN_VULKAN_COMMAND_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698