Skip to content
Snippets Groups Projects

Resolve "Command Submit Interface"

Merged Ghost User requested to merge 39-command-submit-interface into develop
8 files
+ 201
92
Compare changes
  • Side-by-side
  • Inline
Files
8
#pragma once
#pragma once
#include <vulkan/vulkan.hpp>
#include <vulkan/vulkan.hpp>
 
#include <unordered_set>
 
#include "QueueManager.hpp"
namespace vkcv {
namespace vkcv {
struct CommandResources {
struct CommandResources {
vk::CommandPool commandPool;
std::vector<vk::CommandPool> cmdPoolPerQueueFamily;
vk::CommandBuffer commandBuffer;
};
};
CommandResources createDefaultCommandResources(const vk::Device& device, const int graphicFamilyIndex);
std::unordered_set<int> generateQueueFamilyIndexSet(const QueueManager& queueManager);
void destroyCommandResources(const vk::Device& device, const CommandResources& resources);
CommandResources createCommandResources(const vk::Device& device, const std::unordered_set<int> &familyIndexSet);
 
void destroyCommandResources(const vk::Device& device, const CommandResources& resources);
 
vk::CommandBuffer allocateCommandBuffer(const vk::Device& device, const vk::CommandPool cmdPool);
 
vk::CommandPool chooseCmdPool(const Queue &queue, const CommandResources &cmdResources);
 
Queue getQueueForSubmit(const QueueType type, const QueueManager &queueManager);
 
void beginCommandBuffer(const vk::CommandBuffer cmdBuffer, const vk::CommandBufferUsageFlags flags);
 
 
void submitCommandBufferToQueue(
 
const vk::Queue queue,
 
const vk::CommandBuffer cmdBuffer,
 
const vk::Fence fence,
 
const std::vector<vk::Semaphore>& waitSemaphores,
 
const std::vector<vk::Semaphore>& signalSemaphores);
}
}
 
\ No newline at end of file
Loading