Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Fling::PhysicalDevice Class Reference

A physical device represents the Vulkan physical device (the GPU) that we are currently using. More...

#include <PhyscialDevice.h>

Public Member Functions

 PhysicalDevice (class Instance *t_Instance)
 
 ~PhysicalDevice () noexcept=default
 The physical device will get cleaned up when the Instance does automatically. More...
 
 operator const VkPhysicalDevice & () const
 
const VkPhysicalDevice & GetVkPhysicalDevice () const
 
const VkPhysicalDeviceProperties & GetDeviceProps () const
 
const VkPhysicalDeviceFeatures & GetDeivceFeatures () const
 
void LogPhysicalDeviceInfo ()
 Logs info about this physical device (vendor, model, ID, etc) to the console/Log file. More...
 
VkFormatProperties GetFormatProperties (VkFormat t_Form) const
 Checks hte given format properties that are supported on this physical device. More...
 
VkSampleCountFlagBits GetMaxUsableSampleCount ()
 
VkBool32 GetSupportedDepthFormat (VkFormat *depthFormat) const
 

Static Public Member Functions

static const char * GetDeviceType (VkPhysicalDeviceProperties t_Props)
 Get a string representing the device vendor. More...
 
static const char * GetDeviceVendor (VkPhysicalDeviceProperties t_Props)
 

Private Member Functions

VkPhysicalDevice ChooseBestPhyscialDevice (std::vector< VkPhysicalDevice > &t_AvailableDevices)
 Choose the best available physical device on this machine favoring discrete GPU's and those who match all instance extensions. More...
 

Private Attributes

VkPhysicalDevice m_PhysicalDevice = VK_NULL_HANDLE
 The Vulkan physical device. More...
 
const class Instancem_Instance
 Owning instance of this physical device. More...
 
VkPhysicalDeviceProperties m_DeviceProperties {}
 Misc. More...
 
VkPhysicalDeviceFeatures m_DeviceFeatures {}
 
VkPhysicalDeviceMemoryProperties m_MemoryProperties {}
 
VkSampleCountFlagBits m_MSAASamples = VK_SAMPLE_COUNT_1_BIT
 The max supported MSSA level on this device. More...
 

Detailed Description

A physical device represents the Vulkan physical device (the GPU) that we are currently using.

Constructor & Destructor Documentation

◆ PhysicalDevice()

Fling::PhysicalDevice::PhysicalDevice ( class Instance t_Instance)
explicit

◆ ~PhysicalDevice()

Fling::PhysicalDevice::~PhysicalDevice ( )
defaultnoexcept

The physical device will get cleaned up when the Instance does automatically.

Member Function Documentation

◆ ChooseBestPhyscialDevice()

VkPhysicalDevice Fling::PhysicalDevice::ChooseBestPhyscialDevice ( std::vector< VkPhysicalDevice > &  t_AvailableDevices)
private

Choose the best available physical device on this machine favoring discrete GPU's and those who match all instance extensions.

◆ GetDeivceFeatures()

const VkPhysicalDeviceFeatures& Fling::PhysicalDevice::GetDeivceFeatures ( ) const
inline

◆ GetDeviceProps()

const VkPhysicalDeviceProperties& Fling::PhysicalDevice::GetDeviceProps ( ) const
inline

◆ GetDeviceType()

const char * Fling::PhysicalDevice::GetDeviceType ( VkPhysicalDeviceProperties  t_Props)
static

Get a string representing the device vendor.

Parameters
t_Props
Returns
const char*

◆ GetDeviceVendor()

const char * Fling::PhysicalDevice::GetDeviceVendor ( VkPhysicalDeviceProperties  t_Props)
static

◆ GetFormatProperties()

VkFormatProperties Fling::PhysicalDevice::GetFormatProperties ( VkFormat  t_Form) const

Checks hte given format properties that are supported on this physical device.

◆ GetMaxUsableSampleCount()

VkSampleCountFlagBits Fling::PhysicalDevice::GetMaxUsableSampleCount ( )

◆ GetSupportedDepthFormat()

VkBool32 Fling::PhysicalDevice::GetSupportedDepthFormat ( VkFormat *  depthFormat) const

◆ GetVkPhysicalDevice()

const VkPhysicalDevice& Fling::PhysicalDevice::GetVkPhysicalDevice ( ) const
inline

◆ LogPhysicalDeviceInfo()

void Fling::PhysicalDevice::LogPhysicalDeviceInfo ( )

Logs info about this physical device (vendor, model, ID, etc) to the console/Log file.

◆ operator const VkPhysicalDevice &()

Fling::PhysicalDevice::operator const VkPhysicalDevice & ( ) const
inline

Field Documentation

◆ m_DeviceFeatures

VkPhysicalDeviceFeatures Fling::PhysicalDevice::m_DeviceFeatures {}
private

◆ m_DeviceProperties

VkPhysicalDeviceProperties Fling::PhysicalDevice::m_DeviceProperties {}
private

Misc.

Device properties that may be useful

◆ m_Instance

const class Instance* Fling::PhysicalDevice::m_Instance
private

Owning instance of this physical device.

◆ m_MemoryProperties

VkPhysicalDeviceMemoryProperties Fling::PhysicalDevice::m_MemoryProperties {}
private

◆ m_MSAASamples

VkSampleCountFlagBits Fling::PhysicalDevice::m_MSAASamples = VK_SAMPLE_COUNT_1_BIT
private

The max supported MSSA level on this device.

◆ m_PhysicalDevice

VkPhysicalDevice Fling::PhysicalDevice::m_PhysicalDevice = VK_NULL_HANDLE
private

The Vulkan physical device.


The documentation for this class was generated from the following files: