Skip to content

KDGpu::Queue

Module: Public API

Queue is used to submit commands for execution and optionally present content. More...

#include <KDGpu/queue.h>

Public Functions

Name
Queue()
~Queue()
const Handle< Queue_t > & handle() const
Returns the handle used to retrieve the underlying API specific Queue.
bool isValid() const
Convenience function to check whether the Queue is actually referencing a valid API specific resource.
operator Handle< Queue_t >() const
QueueFlags flags() const
uint32_t timestampValidBits() const
Extent3D minImageTransferGranularity() const
uint32_t queueTypeIndex() const
void waitUntilIdle()
Forces a CPU side blocking wait until all pending commands on the queue have completed their execution.
void submit(const SubmitOptions & options)
Submit commands for execution based on the SubmitOptionsoptions provided.
PresentResult present(const PresentOptions & options)
Request the Queue present content to the swapchains referenced in the PresentOptionsoptions.
std::vector< PresentResult > lastPerSwapchainPresentResults() const
void waitForUploadBufferData(const WaitForBufferUploadOptions & options)
UploadStagingBuffer uploadBufferData(const BufferUploadOptions & options)
void waitForUploadTextureData(const WaitForTextureUploadOptions & options)
UploadStagingBuffer uploadTextureData(const TextureUploadOptions & options)

Friends

Name
class Device
class VulkanGraphicsApi

Detailed Description

1
class KDGpu::Queue;

Queue is used to submit commands for execution and optionally present content.

See: Device::queues

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using namespace KDGpu;

Adapter *selectedAdapter = instance.selectAdapter(AdapterDeviceType::Default);
Device device = selectedAdapter->createDevice();
Queue queue = device.queues()[0];

CommandRecorder commandRecorder = device.createCommandRecorder();
...
const CommandBuffer commands = commandRecorder.finish();

queue.submit(SubmitOptions{
            .commandBuffers = { commands },
});

Public Functions Documentation

function Queue

1
Queue()

function ~Queue

1
~Queue()

function handle

1
inline const Handle< Queue_t > & handle() const

Returns the handle used to retrieve the underlying API specific Queue.

See: ResourceManager

function isValid

1
inline bool isValid() const

Convenience function to check whether the Queue is actually referencing a valid API specific resource.

function operator Handle< Queue_t >

1
inline operator Handle< Queue_t >() const

function flags

1
inline QueueFlags flags() const

function timestampValidBits

1
inline uint32_t timestampValidBits() const

function minImageTransferGranularity

1
inline Extent3D minImageTransferGranularity() const

function queueTypeIndex

1
inline uint32_t queueTypeIndex() const

function waitUntilIdle

1
void waitUntilIdle()

Forces a CPU side blocking wait until all pending commands on the queue have completed their execution.

function submit

1
2
3
void submit(
    const SubmitOptions & options
)

Submit commands for execution based on the SubmitOptionsoptions provided.

function present

1
2
3
PresentResult present(
    const PresentOptions & options
)

Request the Queue present content to the swapchains referenced in the PresentOptionsoptions.

function lastPerSwapchainPresentResults

1
std::vector< PresentResult > lastPerSwapchainPresentResults() const

function waitForUploadBufferData

1
2
3
void waitForUploadBufferData(
    const WaitForBufferUploadOptions & options
)

function uploadBufferData

1
2
3
UploadStagingBuffer uploadBufferData(
    const BufferUploadOptions & options
)

function waitForUploadTextureData

1
2
3
void waitForUploadTextureData(
    const WaitForTextureUploadOptions & options
)

function uploadTextureData

1
2
3
UploadStagingBuffer uploadTextureData(
    const TextureUploadOptions & options
)

Friends

friend Device

1
2
3
friend class Device(
    Device 
);

friend VulkanGraphicsApi

1
2
3
friend class VulkanGraphicsApi(
    VulkanGraphicsApi 
);

Updated on 2024-07-23 at 00:07:39 +0000