SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::vk::VulkanGraphicsAdapter Class Referencefinal

Implementation of IGraphicsAdapter for Vulkan. More...

#include <VulkanGraphicsAdapter.h>

Inheritance diagram for spark::render::vk::VulkanGraphicsAdapter:
spark::render::IGraphicsAdapter spark::render::Resource< VkPhysicalDevice > spark::render::IResource< VkPhysicalDevice >

Classes

struct  Impl
 

Public Member Functions

 VulkanGraphicsAdapter (VkPhysicalDevice adapter)
 Initializes a new instance of the VulkanGraphicsAdapter class.
 
 VulkanGraphicsAdapter (const VulkanGraphicsAdapter &other)=delete
 
 VulkanGraphicsAdapter (VulkanGraphicsAdapter &&other) noexcept=delete
 
VulkanGraphicsAdapteroperator= (const VulkanGraphicsAdapter &other)=delete
 
VulkanGraphicsAdapteroperator= (VulkanGraphicsAdapter &&other) noexcept=delete
 
std::string name () const noexcept override
 Gets the name of the graphics adapter.
 
lib::Uuid uuid () const noexcept override
 Gets the unique identifier for the graphics adapter in the system.
 
unsigned vendorId () const noexcept override
 Gets an identifier representing the vendor of the graphics adapter.
 
unsigned deviceId () const noexcept override
 Gets an identifier representing the product.
 
GraphicsAdapterType type () const noexcept override
 Gets the type of the graphics adapter.
 
unsigned driverVersion () const noexcept override
 Gets the version of the driver for the graphics adapter.
 
unsigned apiVersion () const noexcept override
 Gets the version of the API supported by the graphics adapter.
 
unsigned long long dedicatedVideoMemory () const noexcept override
 Gets the amount of dedicated video memory (in bytes) available on the graphics adapter.
 
VkPhysicalDeviceLimits limits () const noexcept
 Gets the limits of the physical device.
 
std::vector< std::string > deviceExtensions () const noexcept
 Gets the features supported by the physical device.
 
bool validateDeviceExtensions (const std::vector< std::string > &extensions) const noexcept
 Validates the given device extensions against the physical device.
 
std::vector< std::string > deviceValidationLayers () const noexcept
 Gets the validation layers supported by the physical device.
 
bool validateDeviceValidationLayers (const std::vector< std::string > &layers) const noexcept
 Validates the given validation layers against the physical device.
 
- Public Member Functions inherited from spark::render::Resource< VkPhysicalDevice >
 Resource (VkPhysicalDevice handle) noexcept
 Initializes the managed resource with the given handle.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other) noexcept=delete
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (Resource &&other) noexcept=delete
 
const VkPhysicalDevice & handle () const final
 Gets the managed resource handle.
 

Additional Inherited Members

- Public Types inherited from spark::render::IResource< VkPhysicalDevice >
using handle_type
 
- Protected Member Functions inherited from spark::render::Resource< VkPhysicalDevice >
VkPhysicalDevice & handle () final
 Gets the managed resource handle.
 

Detailed Description

Implementation of IGraphicsAdapter for Vulkan.

Constructor & Destructor Documentation

◆ VulkanGraphicsAdapter()

spark::render::vk::VulkanGraphicsAdapter::VulkanGraphicsAdapter ( VkPhysicalDevice adapter)
explicit

Initializes a new instance of the VulkanGraphicsAdapter class.

Parameters
adapterThe Vulkan physical device to initialize the adapter with.

Member Function Documentation

◆ apiVersion()

unsigned spark::render::vk::VulkanGraphicsAdapter::apiVersion ( ) const
nodiscardoverridevirtualnoexcept

Gets the version of the API supported by the graphics adapter.

Returns
A uint32 representing the version of the API supported by the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ dedicatedVideoMemory()

unsigned long long spark::render::vk::VulkanGraphicsAdapter::dedicatedVideoMemory ( ) const
nodiscardoverridevirtualnoexcept

Gets the amount of dedicated video memory (in bytes) available on the graphics adapter.

Returns
A uint64 representing the amount of dedicated video memory (in bytes) available on the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ deviceExtensions()

std::vector< std::string > spark::render::vk::VulkanGraphicsAdapter::deviceExtensions ( ) const
nodiscardnoexcept

Gets the features supported by the physical device.

Returns
A std::vector containing the features supported by the physical device as std::string.

◆ deviceId()

unsigned spark::render::vk::VulkanGraphicsAdapter::deviceId ( ) const
nodiscardoverridevirtualnoexcept

Gets an identifier representing the product.

Returns
A uint32 representing the product.

Implements spark::render::IGraphicsAdapter.

◆ deviceValidationLayers()

std::vector< std::string > spark::render::vk::VulkanGraphicsAdapter::deviceValidationLayers ( ) const
nodiscardnoexcept

Gets the validation layers supported by the physical device.

Returns
A std::vector containing the validation layers supported by the physical device as std::string.

◆ driverVersion()

unsigned spark::render::vk::VulkanGraphicsAdapter::driverVersion ( ) const
nodiscardoverridevirtualnoexcept

Gets the version of the driver for the graphics adapter.

Returns
A uint32 representing the version of the driver for the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ limits()

VkPhysicalDeviceLimits spark::render::vk::VulkanGraphicsAdapter::limits ( ) const
nodiscardnoexcept

Gets the limits of the physical device.

Returns
A VkPhysicalDeviceLimits struct containing the limits of the physical device.

◆ name()

std::string spark::render::vk::VulkanGraphicsAdapter::name ( ) const
nodiscardoverridevirtualnoexcept

Gets the name of the graphics adapter.

Returns
A std::string containing the name of the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ type()

GraphicsAdapterType spark::render::vk::VulkanGraphicsAdapter::type ( ) const
nodiscardoverridevirtualnoexcept

Gets the type of the graphics adapter.

Returns
A GraphicsAdapter representing the type of the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ uuid()

lib::Uuid spark::render::vk::VulkanGraphicsAdapter::uuid ( ) const
nodiscardoverridevirtualnoexcept

Gets the unique identifier for the graphics adapter in the system.

Returns
A lib::Uuid containing the unique identifier for the graphics adapter.

Implements spark::render::IGraphicsAdapter.

◆ validateDeviceExtensions()

bool spark::render::vk::VulkanGraphicsAdapter::validateDeviceExtensions ( const std::vector< std::string > & extensions) const
nodiscardnoexcept

Validates the given device extensions against the physical device.

Parameters
extensionsA std::vector containing the device extensions to validate.
Returns
A boolean indicating whether the given device extensions are supported by the physical device.
Note
To return true, all given device extensions must be supported by the physical device.

◆ validateDeviceValidationLayers()

bool spark::render::vk::VulkanGraphicsAdapter::validateDeviceValidationLayers ( const std::vector< std::string > & layers) const
nodiscardnoexcept

Validates the given validation layers against the physical device.

Parameters
layersA std::vector containing the validation layers to validate.
Returns
A boolean indicating whether the given validation layers are supported by the physical device.
Note
To return true, all given validation layers must be supported by the physical device.

◆ vendorId()

unsigned spark::render::vk::VulkanGraphicsAdapter::vendorId ( ) const
nodiscardoverridevirtualnoexcept

Gets an identifier representing the vendor of the graphics adapter.

Returns
A uint32 representing the vendor of the graphics adapter.

Implements spark::render::IGraphicsAdapter.