| 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 13 of file queue_vk.cc.

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

## ◆ ~QueueVK()

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

## Member Function Documentation

## ◆ GetIndex()

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

Definition at line 18 of file queue_vk.cc.

18 {
19 return index_;
20 }

## ◆ InsertDebugMarker()

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

Definition at line 38 of file queue_vk.cc.

38 {
39 if (!HasValidationLayers()) {
40 return;
41 }
42 vk::DebugUtilsLabelEXT label_info;
43 label_info.pLabelName = label.data();
44 Lock lock(queue_mutex_);
45 queue_.insertDebugUtilsLabelEXT(label_info);
46 }
impeller::HasValidationLayers
bool HasValidationLayers()
Definition: context_vk.cc:53

References impeller::HasValidationLayers().

## ◆ Present()

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

Definition at line 33 of file queue_vk.cc.

33 {
34 Lock lock(queue_mutex_);
35 return queue_.presentKHR(present_info);
36 }

## ◆ Submit() [1/2]

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

Definition at line 28 of file queue_vk.cc.

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

## ◆ Submit() [2/2]

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

Definition at line 22 of file queue_vk.cc.

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

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