Merge pull request #4718 from lioncash/vk

vk_command_pool: Add missing header guard
This commit is contained in:
bunnei 2020-09-26 00:13:48 -07:00 committed by GitHub
commit fbb5ca2633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -12,6 +12,11 @@ namespace Vulkan {
constexpr size_t COMMAND_BUFFER_POOL_SIZE = 0x1000;
struct CommandPool::Pool {
vk::CommandPool handle;
vk::CommandBuffers cmdbufs;
};
CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device)
: ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device} {}

View file

@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <cstddef>
#include <vector>
@ -16,17 +18,14 @@ class VKDevice;
class CommandPool final : public ResourcePool {
public:
explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device);
virtual ~CommandPool();
~CommandPool() override;
void Allocate(size_t begin, size_t end) override;
VkCommandBuffer Commit();
private:
struct Pool {
vk::CommandPool handle;
vk::CommandBuffers cmdbufs;
};
struct Pool;
const VKDevice& device;
std::vector<Pool> pools;