Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
BlamRendering::Vulkan::Device Namespace Reference

Namespace containing functions relating to Vulkan physical device selection. More...

Functions

BLAM std::vector< VkPhysicalDevice > GetDeviceList ()
 Retrieves the list of physical devices available to Vulkan. More...
 
BLAM bool IsDeviceSuitable (VkPhysicalDevice device)
 Determines whether or not a given Vulkan device is suitable for the engine's requirements. More...
 
BLAM int RateDeviceSuitability (VkPhysicalDevice device)
 Rates a given physical device based on its capabilities and features. More...
 
BLAM void SelectManualDevice (int device_index)
 Instructs Vulkan to try to select a specific device. More...
 
BLAM void SelectBestDevice ()
 Instructs Vulkan to select the best compatiable device. More...
 
BLAM void SelectDefaultDevice ()
 Instructs Vulkan to select the first compatiable device. More...
 
BLAM void CreateLogicalDevice ()
 
BLAM void DestroyLogicalDevice ()
 

Detailed Description

Namespace containing functions relating to Vulkan physical device selection.

Function Documentation

◆ CreateLogicalDevice()

void BlamRendering::Vulkan::Device::CreateLogicalDevice ( )

◆ DestroyLogicalDevice()

void BlamRendering::Vulkan::Device::DestroyLogicalDevice ( )

◆ GetDeviceList()

std::vector< VkPhysicalDevice > BlamRendering::Vulkan::Device::GetDeviceList ( )

Retrieves the list of physical devices available to Vulkan.

Returns
A list of available physical devices.

◆ IsDeviceSuitable()

bool BlamRendering::Vulkan::Device::IsDeviceSuitable ( VkPhysicalDevice  device)

Determines whether or not a given Vulkan device is suitable for the engine's requirements.

Parameters
device- The device to check suitability.
Returns
true if the device is suitable, otherwise returns false.

◆ RateDeviceSuitability()

int BlamRendering::Vulkan::Device::RateDeviceSuitability ( VkPhysicalDevice  device)

Rates a given physical device based on its capabilities and features.

Parameters
device- The device to score.
Returns
The score of the device.

◆ SelectBestDevice()

void BlamRendering::Vulkan::Device::SelectBestDevice ( )

Instructs Vulkan to select the best compatiable device.

This function will check all GPUs available in the system and give each one a score depending on its capabilities, specifications, and whether or not it is an integrated or dedicated/discrete GPU.

This is the default way that a Vulkan device is selected and is used when the vulkan_device configuration setting is set to auto.

◆ SelectDefaultDevice()

void BlamRendering::Vulkan::Device::SelectDefaultDevice ( )

Instructs Vulkan to select the first compatiable device.

This function will not bother to check all GPUs available in the system, so it could result in a weaker GPU being selected in some cases. This is only used if the vulkan_device configuration setting is set to first.

◆ SelectManualDevice()

void BlamRendering::Vulkan::Device::SelectManualDevice ( int  device_index)

Instructs Vulkan to try to select a specific device.

This function will attempt to select a specific device within the system. It will not look at other devices, it will only check if the specified device is compatiable and, if so, use it. The device index should be the same index of the device in BlamRendering::Vulkan::Device::GetDeviceList().

Parameters
device_index-