1 #ifndef DALI_GRAPHICS_VULKAN_COMMANDPOOL
2 #define DALI_GRAPHICS_VULKAN_COMMANDPOOL
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/graphics/vulkan/vulkan-types.h>
34 using CommandPoolHandle = Handle<class CommandPool>;
36 class CommandPool : public VkManaged
47 static CommandPoolHandle New( Graphics& graphics, const vk::CommandPoolCreateInfo& createInfo );
54 static CommandPoolHandle New( Graphics& graphics );
56 ~CommandPool() override;
62 vk::CommandPool GetPool() const;
68 Graphics& GetGraphics() const;
75 Handle<CommandBuffer> NewCommandBuffer( const vk::CommandBufferAllocateInfo& allocateInfo );
82 Handle<CommandBuffer> NewCommandBuffer( bool isPrimary = true );
86 bool OnDestroy() override;
92 CommandPool( Graphics& graphics, const vk::CommandPoolCreateInfo& createInfo );
95 std::unique_ptr<Impl> mImpl;
100 } // namespace Vulkan
101 } // namespace Graphics
104 #endif // DALI_GRAPHICS_VULKAN_COMMANDPOOL