Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 QueueVKs. More...

#include <queue_vk.h>

Public Member Functions

 QueueVK (QueueIndexVK index, vk::Queue queue)
 
 ~QueueVK ()
 
const QueueIndexVKGetIndex () const
 
vk::Result Submit (const vk::SubmitInfo &submit_info, 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 QueueVKs.

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

31 {
32 if (!HasValidationLayers()) {
33 return;
34 }
35 vk::DebugUtilsLabelEXT label_info;
36 label_info.pLabelName = label.data();
37 Lock lock(queue_mutex_);
38 queue_.insertDebugUtilsLabelEXT(label_info);
39}
bool HasValidationLayers()
Definition context_vk.cc:48

◆ Present()

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

Definition at line 26 of file queue_vk.cc.

26 {
27 Lock lock(queue_mutex_);
28 return queue_.presentKHR(present_info);
29}

◆ Submit()

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: