Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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< QueueVKgraphics_queue
 
std::shared_ptr< QueueVKcompute_queue
 
std::shared_ptr< QueueVKtransfer_queue
 

Detailed Description

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

Definition at line 61 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 43 of file queue_vk.cc.

46 {
47 auto vk_graphics = device.getQueue(graphics.family, graphics.index);
48 auto vk_compute = device.getQueue(compute.family, compute.index);
49 auto vk_transfer = device.getQueue(transfer.family, transfer.index);
50
51 // Always set up the graphics queue.
52 graphics_queue = std::make_shared<QueueVK>(graphics, vk_graphics);
53 ContextVK::SetDebugName(device, vk_graphics, "ImpellerGraphicsQ");
54
55 // Setup the compute queue if its different from the graphics queue.
56 if (compute == graphics) {
58 } else {
59 compute_queue = std::make_shared<QueueVK>(compute, vk_compute);
60 ContextVK::SetDebugName(device, vk_compute, "ImpellerComputeQ");
61 }
62
63 // Setup the transfer queue if its different from the graphics or compute
64 // queues.
65 if (transfer == graphics) {
67 } else if (transfer == compute) {
69 } else {
70 transfer_queue = std::make_shared<QueueVK>(transfer, vk_transfer);
71 ContextVK::SetDebugName(device, vk_transfer, "ImpellerTransferQ");
72 }
73}
bool SetDebugName(T handle, std::string_view label) const
Definition context_vk.h:108
VkDevice device
Definition main.cc:53
std::shared_ptr< QueueVK > compute_queue
Definition queue_vk.h:63
std::shared_ptr< QueueVK > transfer_queue
Definition queue_vk.h:64
std::shared_ptr< QueueVK > graphics_queue
Definition queue_vk.h:62

Member Function Documentation

◆ IsValid()

bool impeller::QueuesVK::IsValid ( ) const

Definition at line 75 of file queue_vk.cc.

75 {
77}

Member Data Documentation

◆ compute_queue

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

Definition at line 63 of file queue_vk.h.

◆ graphics_queue

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

Definition at line 62 of file queue_vk.h.

◆ transfer_queue

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

Definition at line 64 of file queue_vk.h.


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