diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-09-10 08:43:30 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-09-19 06:46:37 +0200 |
commit | 58b0ae84b56996304b6ad373e4f6cff2cf6bdd41 (patch) | |
tree | 9b7c3e28fa7445c78304902efe660356c59cad57 /src/video_core/renderer_vulkan/vk_command_pool.h | |
parent | Merge pull request #4663 from ReinUsesLisp/wswitch (diff) | |
download | yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar.gz yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar.bz2 yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar.lz yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar.xz yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.tar.zst yuzu-58b0ae84b56996304b6ad373e4f6cff2cf6bdd41.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_command_pool.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_command_pool.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.h b/src/video_core/renderer_vulkan/vk_command_pool.h new file mode 100644 index 000000000..3aee239b9 --- /dev/null +++ b/src/video_core/renderer_vulkan/vk_command_pool.h @@ -0,0 +1,35 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <cstddef> +#include <vector> + +#include "video_core/renderer_vulkan/vk_resource_pool.h" +#include "video_core/renderer_vulkan/wrapper.h" + +namespace Vulkan { + +class MasterSemaphore; +class VKDevice; + +class CommandPool final : public ResourcePool { +public: + explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device); + virtual ~CommandPool(); + + void Allocate(size_t begin, size_t end) override; + + VkCommandBuffer Commit(); + +private: + struct Pool { + vk::CommandPool handle; + vk::CommandBuffers cmdbufs; + }; + + const VKDevice& device; + std::vector<Pool> pools; +}; + +} // namespace Vulkan |