| Flutter Impeller |

Public Member Functions | List of all members
impeller::QueueVK Class Reference

A thread safe object that can be used to access device queues. If multiple objects are created with the same underlying queue, then the external synchronization guarantees of Vulkan queues cannot be met. So care must be taken the same device queue doesn't form the basis of multiple `QueueVK`s. More...

`#include <queue_vk.h>`

## Public Member Functions
| QueueVK (QueueIndexVK index, vk::Queue queue)
| ~QueueVK ()
const QueueIndexVK & | GetIndex () const
vk::Result | Submit (const vk::SubmitInfo &submit_info, const vk::Fence &fence) const
vk::Result | Submit (const vk::Fence &fence) const
vk::Result | Present (const vk::PresentInfoKHR &present_info)
void | InsertDebugMarker (std::string_view label) const

## Detailed Description

A thread safe object that can be used to access device queues. If multiple objects are created with the same underlying queue, then the external synchronization guarantees of Vulkan queues cannot be met. So care must be taken the same device queue doesn't form the basis of multiple `QueueVK`s.

Definition at line 31 of file queue_vk.h.

## Constructor & Destructor Documentation

## ◆ QueueVK()

impeller::QueueVK::QueueVK | ( | QueueIndexVK | index,
|  | vk::Queue | queue
| ) |  |

Definition at line 11 of file queue_vk.cc.

12 : index_(index), queue_(queue) {}

## ◆ ~QueueVK()

impeller::QueueVK::~QueueVK | ( |  | ) |
| default

## Member Function Documentation

## ◆ GetIndex()

const QueueIndexVK & impeller::QueueVK::GetIndex | ( |  | ) | const

Definition at line 16 of file queue_vk.cc.

16 {
17 return index_;
18 }

## ◆ InsertDebugMarker()

void impeller::QueueVK::InsertDebugMarker | ( | std::string_view | label | ) | const

Definition at line 36 of file queue_vk.cc.

36 {
37 if (!HasValidationLayers()) {
38 return;
39 }
40 vk::DebugUtilsLabelEXT label_info;
41 label_info.pLabelName = label.data();
42 Lock lock(queue_mutex_);
43 queue_.insertDebugUtilsLabelEXT(label_info);
44 }

References impeller::HasValidationLayers().

## ◆ Present()

vk::Result impeller::QueueVK::Present | ( | const vk::PresentInfoKHR & | present_info | ) |

Definition at line 31 of file queue_vk.cc.

31 {
32 Lock lock(queue_mutex_);
33 return queue_.presentKHR(present_info);
34 }

## ◆ Submit() [1/2]

vk::Result impeller::QueueVK::Submit | ( | const vk::Fence & | fence | ) | const

Definition at line 26 of file queue_vk.cc.

26 {
27 Lock lock(queue_mutex_);
28 return queue_.submit({}, fence);
29 }

## ◆ Submit() [2/2]

vk::Result impeller::QueueVK::Submit | ( | const vk::SubmitInfo & | submit_info,
|  | const vk::Fence & | fence
| ) |  | const

Definition at line 20 of file queue_vk.cc.

21 {
22 Lock lock(queue_mutex_);
23 return queue_.submit(submit_info, fence);
24 }

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

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

impeller::HasValidationLayers
bool HasValidationLayers()
Definition: context_vk.cc:48