Class VulkanDevice#

Class Documentation#

class VulkanDevice#

Public Functions

VulkanDevice(TRAP::Scope<VulkanPhysicalDevice> physicalDevice, std::vector<std::string> deviceExtensions)#

Constructor.

Parameters:
  • physicalDevice – Vulkan physical device.

  • deviceExtensions – Device extensions to use.

~VulkanDevice()#

Destructor.

consteval VulkanDevice(const VulkanDevice&) = delete#

Copy constructor.

consteval VulkanDevice &operator=(const VulkanDevice&) = delete#

Copy assignment operator.

VulkanDevice(VulkanDevice&&) noexcept = default#

Move constructor.

VulkanDevice &operator=(VulkanDevice&&) noexcept = default#

Move assignment operator.

constexpr VkDevice GetVkDevice() const noexcept#

Retrieve the VkDevice.

Returns:

VkDevice.

const VulkanPhysicalDevice &GetPhysicalDevice() const noexcept#

Retrieve the Vulkan physical device.

Returns:

Vulkan physical device.

constexpr const std::vector<std::string> &GetUsedPhysicalDeviceExtensions() const noexcept#

Retrieve a list of all used physical device extensions.

Returns:

List of physical device extensions.

void WaitIdle() const#

Wait for the completion of outstanding queue operations for all queues on the device.

constexpr u8 GetGraphicsQueueFamilyIndex() const noexcept#

Retrieve the graphics queue family index.

Returns:

Graphics queue family index.

constexpr u8 GetTransferQueueFamilyIndex() const noexcept#

Retrieve the transfer queue family index.

Returns:

Transfer queue family index.

constexpr u8 GetComputeQueueFamilyIndex() const noexcept#

Retrieve the compute queue family index.

Returns:

Compute queue family index.

constexpr std::array<u8, 3> GetQueueFamilyIndices() const noexcept#

Retrieve the all queue family (graphics, transfer, compute) indices.

Returns:

All queue family indices.

constexpr u8 GetGraphicsQueueIndex() const noexcept#

Retrieve the graphics queue index.

Returns:

Graphics queue index.

constexpr u8 GetTransferQueueIndex() const noexcept#

Retrieve the transfer queue index.

Returns:

Transfer queue index.

constexpr u8 GetComputeQueueIndex() const noexcept#

Retrieve the compute queue index.

Returns:

Compute queue index.