| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::QueuesVK Struct Reference

The collection of queues used by the context. The queues may all be the same. More...

`#include <queue_vk.h>`

## Public Member Functions
| QueuesVK ()
| QueuesVK (const vk::Device &device, QueueIndexVK graphics, QueueIndexVK compute, QueueIndexVK transfer)
bool | IsValid () const

## Public Attributes
std::shared_ptr< QueueVK > | graphics_queue
std::shared_ptr< QueueVK > | compute_queue
std::shared_ptr< QueueVK > | transfer_queue

## Detailed Description

The collection of queues used by the context. The queues may all be the same.

Definition at line 60 of file queue_vk.h.

## Constructor & Destructor Documentation

## ◆ QueuesVK() [1/2]

impeller::QueuesVK::QueuesVK | ( |  | ) |
| default

## ◆ QueuesVK() [2/2]

impeller::QueuesVK::QueuesVK | ( | const vk::Device & | device,
|  | QueueIndexVK | graphics,
|  | QueueIndexVK | compute,
|  | QueueIndexVK | transfer
| ) |  |

Definition at line 38 of file queue_vk.cc.

41 {
42 auto vk_graphics = device.getQueue(graphics.family, graphics.index);
43 auto vk_compute = device.getQueue(compute.family, compute.index);
44 auto vk_transfer = device.getQueue(transfer.family, transfer.index);
45
46 // Always set up the graphics queue.
47 graphics_queue = std::make_shared<QueueVK>(graphics, vk_graphics);
48 ContextVK::SetDebugName(device, vk_graphics, "ImpellerGraphicsQ");
49
50 // Setup the compute queue if its different from the graphics queue.
51 if (compute == graphics) {
52 compute_queue = graphics_queue;
53 } else {
54 compute_queue = std::make_shared<QueueVK>(compute, vk_compute);
55 ContextVK::SetDebugName(device, vk_compute, "ImpellerComputeQ");
56 }
57
58 // Setup the transfer queue if its different from the graphics or compute
59 // queues.
60 if (transfer == graphics) {
61 transfer_queue = graphics_queue;
62 } else if (transfer == compute) {
63 transfer_queue = compute_queue;
64 } else {
65 transfer_queue = std::make_shared<QueueVK>(transfer, vk_transfer);
66 ContextVK::SetDebugName(device, vk_transfer, "ImpellerTransferQ");
67 }
68 }

References compute_queue, impeller::QueueIndexVK::family, graphics_queue, impeller::QueueIndexVK::index, impeller::ContextVK::SetDebugName(), and transfer_queue.

## Member Function Documentation

## ◆ IsValid()

bool impeller::QueuesVK::IsValid | ( |  | ) | const

Definition at line 70 of file queue_vk.cc.

70 {
71 return graphics_queue && compute_queue && transfer_queue;
72 }

References compute_queue, graphics_queue, and transfer_queue.

## Member Data Documentation

## ◆ compute_queue

std::shared_ptr<QueueVK> impeller::QueuesVK::compute_queue

Definition at line 62 of file queue_vk.h.

Referenced by IsValid(), and QueuesVK().

## ◆ graphics_queue

std::shared_ptr<QueueVK> impeller::QueuesVK::graphics_queue

Definition at line 61 of file queue_vk.h.

Referenced by impeller::ContextVK::GetGraphicsQueue(), IsValid(), and QueuesVK().

## ◆ transfer_queue

std::shared_ptr<QueueVK> impeller::QueuesVK::transfer_queue

Definition at line 63 of file queue_vk.h.

Referenced by IsValid(), and QueuesVK().

The documentation for this struct was generated from the following files:

- impeller/renderer/backend/vulkan/queue_vk.h
- impeller/renderer/backend/vulkan/queue_vk.cc

impeller::QueuesVK::graphics_queue
std::shared_ptr< QueueVK > graphics_queue
Definition: queue_vk.h:61
impeller::QueuesVK::transfer_queue
std::shared_ptr< QueueVK > transfer_queue
Definition: queue_vk.h:63
impeller::QueuesVK::compute_queue
std::shared_ptr< QueueVK > compute_queue
Definition: queue_vk.h:62
impeller::ContextVK::SetDebugName
bool SetDebugName(T handle, std::string_view label) const
Definition: context_vk.h:100