14 : index_(index), queue_(queue) {}
23 const vk::Fence& fence)
const {
24 Lock lock(queue_mutex_);
25 return queue_.submit(submit_info, fence);
29 Lock lock(queue_mutex_);
30 return queue_.submit({}, fence);
34 Lock lock(queue_mutex_);
35 return queue_.presentKHR(present_info);
42 vk::DebugUtilsLabelEXT label_info;
43 label_info.pLabelName = label.data();
44 Lock lock(queue_mutex_);
45 queue_.insertDebugUtilsLabelEXT(label_info);
51 std::shared_ptr<QueueVK> compute_queue,
52 std::shared_ptr<QueueVK> transfer_queue)
53 : graphics_queue(
std::move(graphics_queue)),
54 compute_queue(
std::move(compute_queue)),
55 transfer_queue(
std::move(transfer_queue)) {}
59 uint32_t queue_family_index) {
71 auto vk_graphics = device.getQueue(graphics.
family, graphics.
index);
72 auto vk_compute = device.getQueue(compute.
family, compute.
index);
73 auto vk_transfer = device.getQueue(transfer.
family, transfer.
index);
76 auto graphics_queue = std::make_shared<QueueVK>(graphics, vk_graphics);
81 if (compute == graphics) {
84 compute_queue = std::make_shared<QueueVK>(compute, vk_compute);
91 if (transfer == graphics) {
93 }
else if (transfer == compute) {
bool SetDebugName(T handle, std::string_view label) const
QueueVK(QueueIndexVK index, vk::Queue queue)
const QueueIndexVK & GetIndex() const
void InsertDebugMarker(std::string_view label) const
vk::Result Present(const vk::PresentInfoKHR &present_info)
vk::Result Submit(const vk::SubmitInfo &submit_info, const vk::Fence &fence) const
bool HasValidationLayers()
The collection of queues used by the context. The queues may all be the same.
static QueuesVK FromEmbedderQueue(vk::Queue queue, uint32_t queue_family_index)
static QueuesVK FromQueueIndices(const vk::Device &device, QueueIndexVK graphics, QueueIndexVK compute, QueueIndexVK transfer)
std::shared_ptr< QueueVK > compute_queue
std::shared_ptr< QueueVK > transfer_queue
std::shared_ptr< QueueVK > graphics_queue