Skip to content
Snippets Groups Projects
Commit f892820c authored by Sebastian Gaida's avatar Sebastian Gaida
Browse files

[#96] add docu to queueManager

parent d200f29b
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
Pipeline #27465 passed
...@@ -14,23 +14,64 @@ namespace vkcv { ...@@ -14,23 +14,64 @@ namespace vkcv {
class QueueManager { class QueueManager {
public: public:
/**
* creates a QueueManager with the given queue pairs
* @param device device that holds the queues that are specified in the queue pairs
* @param queuePairsGraphics graphic queue pairs of queueFamily and queueIndex
* @param queuePairsCompute compute queue pairs of queueFamily and queueIndex
* @param queuePairsTransfer transfer queue pairs of queueFamily and queueIndex
* @return a QueueManager with the specified queuePairs
*/
static QueueManager create(vk::Device device, static QueueManager create(vk::Device device,
std::vector<std::pair<int, int>> &queuePairsGraphics, std::vector<std::pair<int, int>> &queuePairsGraphics,
std::vector<std::pair<int, int>> &queuePairsCompute, std::vector<std::pair<int, int>> &queuePairsCompute,
std::vector<std::pair<int, int>> &queuePairsTransfer); std::vector<std::pair<int, int>> &queuePairsTransfer);
/**
* returns the default presentQueue. Recommended to use the presentQueue in the Swapchain
* @return a default presentQueue
*/
[[nodiscard]] [[nodiscard]]
const Queue &getPresentQueue() const; const Queue &getPresentQueue() const;
/**
* returns all queues with the graphics flag
* @return vector of graphic queues
*/
[[nodiscard]] [[nodiscard]]
const std::vector<Queue> &getGraphicsQueues() const; const std::vector<Queue> &getGraphicsQueues() const;
/**
* returns all queues with the compute flag
* @return vector of compute queues
*/
[[nodiscard]] [[nodiscard]]
const std::vector<Queue> &getComputeQueues() const; const std::vector<Queue> &getComputeQueues() const;
/**
* returns all queues with the transfer flag
* @return vector of transfer queues
*/
[[nodiscard]] [[nodiscard]]
const std::vector<Queue> &getTransferQueues() const; const std::vector<Queue> &getTransferQueues() const;
/**
* Given the @p physicalDevice and the @p queuePriorities, the @p queueCreateInfos are computed. First, the requested
* queues are sorted by priority depending on the availability of queues in the queue families of the given
* @p physicalDevice. Then check, if all requested queues are creatable. If so, the @p queueCreateInfos will be computed.
* Furthermore, lists of index pairs (queueFamilyIndex, queueIndex) for later referencing of the separate queues will
* be computed.
* @param[in] physicalDevice The physical device
* @param[in] queuePriorities The queue priorities used for the computation of @p queueCreateInfos
* @param[in] queueFlags The queue flags requesting the queues
* @param[in,out] queueCreateInfos The queue create info structures to be created
* @param[in,out] queuePairsGraphics The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
* vk::QueueFlagBits::eGraphics
* @param[in,out] queuePairsCompute The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
* vk::QueueFlagBits::eCompute
* @param[in,out] queuePairsTransfer The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
* vk::QueueFlagBits::eTransfer
* @throws std::runtime_error If the requested queues from @p queueFlags are not creatable due to insufficient availability.
*/
static void queueCreateInfosQueueHandles(vk::PhysicalDevice &physicalDevice, static void queueCreateInfosQueueHandles(vk::PhysicalDevice &physicalDevice,
const std::vector<float> &queuePriorities, const std::vector<float> &queuePriorities,
const std::vector<vk::QueueFlagBits> &queueFlags, const std::vector<vk::QueueFlagBits> &queueFlags,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment