FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::vulkan::PhysicalDevice Class Reference

Vulkan physical device abstraction. More...

#include <C_physicalDevice.hpp>

Classes

struct  QueueFamilyIndices
 
struct  SwapChainSupportDetails
 

Public Member Functions

 PhysicalDevice (VkPhysicalDevice device=VK_NULL_HANDLE)
 
 PhysicalDevice (PhysicalDevice const &r)=default
 
 PhysicalDevice (PhysicalDevice &&r) noexcept
 
PhysicalDeviceoperator= (PhysicalDevice const &r)=default
 
PhysicalDeviceoperator= (PhysicalDevice &&r) noexcept
 
VkPhysicalDevice getDevice () const
 
bool checkDeviceExtensionSupport () const
 Check if the device support the required extensions.
 
unsigned int rateDeviceSuitability (VkSurfaceKHR surface) const
 Give a score to the device.
 
QueueFamilyIndices findQueueFamilies (VkSurfaceKHR surface) const
 Retrieve the QueueFamilyIndices.
 
SwapChainSupportDetails querySwapChainSupport (VkSurfaceKHR surface) const
 
uint32_t findMemoryType (uint32_t typeFilter, VkMemoryPropertyFlags properties) const
 
uint32_t getMaxImageDimension2D () const
 
uint32_t getMinUniformBufferOffsetAlignment () const
 
VkDeviceSize getMaxMemoryAllocationSize () const
 
uint32_t getMaxMemoryAllocationCount () const
 
VkPhysicalDeviceFeatures getFeatures () const
 
VkPhysicalDeviceFeatures2 getFeatures2 () const
 
VkPhysicalDeviceRobustness2FeaturesEXT getRobustness2Features () const
 

Detailed Description

Vulkan physical device abstraction.

Member Function Documentation

◆ checkDeviceExtensionSupport()

bool fge::vulkan::PhysicalDevice::checkDeviceExtensionSupport ( ) const
nodiscard

Check if the device support the required extensions.

This will check extensions in fge::vulkan::DeviceExtensions.

Returns
true if the device support the required extensions, false otherwise

◆ findQueueFamilies()

QueueFamilyIndices fge::vulkan::PhysicalDevice::findQueueFamilies ( VkSurfaceKHR surface) const
nodiscard

Retrieve the QueueFamilyIndices.

A QueueFamilyIndices is a struct containing the index of the graphic and present queue families if they exist.

Parameters
surfaceThe associated surface
Returns
The QueueFamilyIndices

◆ rateDeviceSuitability()

unsigned int fge::vulkan::PhysicalDevice::rateDeviceSuitability ( VkSurfaceKHR surface) const
nodiscard

Give a score to the device.

This score is used to choose the best device, the higher the score, the better the device. A discrete GPU will have a higher score than an integrated GPU.

A score of 0 means the device is not suitable.

Parameters
surfaceThe associated surface
Returns
The score of the device

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