API Documentation
Loading...
Searching...
No Matches
VulkanDevice Class Reference

A GraphicsDevice for managing Vulkan limitations and actions. See: https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html. More...

#include <VulkanDevice.h>

Inheritance diagram for VulkanDevice:
[legend]
Collaboration diagram for VulkanDevice:
[legend]

Public Member Functions

void addSurface (VkSurfaceKHR surface)
 
VkCommandBuffer beginSingleTimeCommands (uint04 id=Constant< uint04 >::Invalid) const
 
virtual bool canServiceCaptureRequests () const final override
 
uint04 checkoutID () const
 
void checkoutID (uint04 id) const
 
VkPresentModeKHR chooseSwapPresentMode (const Buffer< VkPresentModeKHR > &availablePresentModes)
 
void cleanup ()
 
void destroyCommandPool (uint04 id)
 
void destroyImageView (VkImageView image_view)
 
VkDevice device () const
 
const VkPhysicalDeviceFeatures & enabledFeatures () const
 
void endSingleTimeCommands (VkCommandBuffer commandBuffer, bool wait_for_completion, uint04 id=Constant< uint04 >::Invalid) const
 
VkFormat findDepthFormat () const
 
uint04 findMemoryType (uint04 typeFilter, uint04 properties) const
 
VkCommandPool getCommandPool (uint04 id=Constant< uint04 >::Invalid) const
 
virtual uint04 getThreadedID () const
 
VkQueue graphicsQueue (uint04 id=Constant< uint04 >::Invalid) const
 
UUID id () const override
 
void init () override
 
const void * initLockPtr () const override
 
DynamicPointer< VulkanInstanceinstance () const
 
bool isInitialized () const override
 
bool isSoftwareRendered () const
 
bool isValid () const override
 
ProgressInfolog ()
 
void logPhysicalDevice ()
 
uint04 maxSupportedSamples () const override
 
const VkPhysicalDevicephysicalDevice () const
 
const VkPhysicalDeviceFeatures & physicalFeatures () const
 
const VkPhysicalDeviceProperties & physicalProperties () const
 
VkQueue presentQueue (uint04 id=Constant< uint04 >::Invalid) const
 
void removeSurface (VkSurfaceKHR surface)
 
void returnID (uint04 id=Constant< uint04 >::Invalid) const
 
void setDeviceLost ()
 
void setLog (ProgressInfo *log)
 
virtual bool supportsMultiThreading () const override
 
bool supportsTriangleFan () const
 
VkInstance vkInstance () const
 
 VulkanDevice (const DynamicPointer< VulkanInstance > &instance)
 
 VulkanDevice (VkPhysicalDevice physical_device, const DynamicPointer< VulkanInstance > &instance)
 
 VulkanDevice (VulkanDevice &&instance) noexcept
 
virtual void waitForGraphicsQueue (uint04 id=Constant< uint04 >::Invalid) const
 
virtual ~VulkanDevice ()
 
- Public Member Functions inherited from GraphicsDevice
virtual bool isReady () const
 
virtual bool updateFromLookup () const
 
virtual ~GraphicsDevice ()
 

Static Public Member Functions

static DynamicPointer< VulkanDevice > & DefaultVulkanDevice ()
 
- Static Public Member Functions inherited from GraphicsDevice
static const DynamicPointer< GraphicsDevice > & DefaultGraphicsDevice ()
 
static void SetDefaultGraphicsDevice (const DynamicPointer< GraphicsDevice > &device)
 

Protected Member Functions

virtual void autoChoosePhysicalDevice ()
 
bool checkDeviceExtensionSupport (VkPhysicalDevice device)
 
void createCommandPool (uint04 thread) const
 
virtual VkResult createLogicalDevice (const VkDeviceCreateInfo &create_info)
 
void setQueueFamilies ()
 
void setupLogicalDevice ()
 

Protected Attributes

Buffer< uint04m_checkouts
 
Dictionary< uint04, VkCommandPoolm_command_pools
 
Time m_creation_time
 
VkDevice m_device
 
Buffer< Stringm_device_extensions
 
Buffer< Stringm_device_layers
 
VkPhysicalDeviceFeatures * m_enabled_features
 
uint04 m_graphics_family_index
 
Dictionary< uint04, VkQueuem_graphics_queue
 
Dictionary< uint04, uint04m_graphics_queue_index
 
UUID m_id
 
DynamicPointer< VulkanInstancem_instance
 
bool m_is_init
 
bool m_is_software_rendered
 
ProgressInfom_log
 
VkPhysicalDevice m_physical_device
 
VkPhysicalDeviceFeatures * m_physical_features
 
VkPhysicalDeviceProperties * m_physical_properties
 
uint04 m_present_family_index
 
Dictionary< uint04, VkQueuem_present_queue
 
Buffer< VkQueueFamilyProperties, uint04, ObjectAllocator< true > > m_queue_families
 
Buffer< VkSurfaceKHRm_surfaces
 
Dictionary< uint04, uint04m_thread_checkouts
 

Additional Inherited Members

- Static Public Attributes inherited from GraphicsDevice
static DynamicPointer< GraphicsDevices_default_graphics_device
 

Detailed Description

A GraphicsDevice for managing Vulkan limitations and actions. See: https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html.


Constructor & Destructor Documentation

◆ VulkanDevice() [1/3]

VulkanDevice ( VkPhysicalDevice physical_device,
const DynamicPointer< VulkanInstance > & instance )

◆ VulkanDevice() [2/3]

VulkanDevice ( const DynamicPointer< VulkanInstance > & instance)

◆ VulkanDevice() [3/3]

VulkanDevice ( VulkanDevice && instance)
noexcept

◆ ~VulkanDevice()

virtual ~VulkanDevice ( )
inlinevirtual

Member Function Documentation

◆ addSurface()

void addSurface ( VkSurfaceKHR surface)

◆ autoChoosePhysicalDevice()

virtual void autoChoosePhysicalDevice ( )
protectedvirtual

Reimplemented in VulkanXRDevice.

◆ beginSingleTimeCommands()

VkCommandBuffer beginSingleTimeCommands ( uint04 id = Constantuint04 >::Invalid) const

◆ canServiceCaptureRequests()

virtual bool canServiceCaptureRequests ( ) const
finaloverridevirtual

Reimplemented from GraphicsDevice.

◆ checkDeviceExtensionSupport()

bool checkDeviceExtensionSupport ( VkPhysicalDevice device)
protected

◆ checkoutID() [1/2]

uint04 checkoutID ( ) const

◆ checkoutID() [2/2]

void checkoutID ( uint04 id) const

◆ chooseSwapPresentMode()

VkPresentModeKHR chooseSwapPresentMode ( const Buffer< VkPresentModeKHR > & availablePresentModes)

◆ cleanup()

void cleanup ( )

◆ createCommandPool()

void createCommandPool ( uint04 thread) const
protected

◆ createLogicalDevice()

virtual VkResult createLogicalDevice ( const VkDeviceCreateInfo & create_info)
protectedvirtual

Reimplemented in VulkanXRDevice.

◆ DefaultVulkanDevice()

static DynamicPointer< VulkanDevice > & DefaultVulkanDevice ( )
static

◆ destroyCommandPool()

void destroyCommandPool ( uint04 id)

◆ destroyImageView()

void destroyImageView ( VkImageView image_view)

◆ device()

VkDevice device ( ) const
inline

◆ enabledFeatures()

const VkPhysicalDeviceFeatures & enabledFeatures ( ) const

◆ endSingleTimeCommands()

void endSingleTimeCommands ( VkCommandBuffer commandBuffer,
bool wait_for_completion,
uint04 id = Constantuint04 >::Invalid ) const

◆ findDepthFormat()

VkFormat findDepthFormat ( ) const

◆ findMemoryType()

uint04 findMemoryType ( uint04 typeFilter,
uint04 properties ) const

◆ getCommandPool()

VkCommandPool getCommandPool ( uint04 id = Constantuint04 >::Invalid) const

◆ getThreadedID()

virtual uint04 getThreadedID ( ) const
virtual

◆ graphicsQueue()

VkQueue graphicsQueue ( uint04 id = Constantuint04 >::Invalid) const

◆ id()

UUID id ( ) const
inlineoverridevirtual

Implements GraphicsDevice.

◆ init()

void init ( )
overridevirtual

Implements GraphicsDevice.

◆ initLockPtr()

const void * initLockPtr ( ) const
overridevirtual

Implements GraphicsDevice.

◆ instance()

DynamicPointer< VulkanInstance > instance ( ) const

◆ isInitialized()

bool isInitialized ( ) const
inlineoverridevirtual

Implements GraphicsDevice.

◆ isSoftwareRendered()

bool isSoftwareRendered ( ) const

◆ isValid()

bool isValid ( ) const
overridevirtual

Implements GraphicsDevice.

◆ log()

ProgressInfo * log ( )
inline

◆ logPhysicalDevice()

void logPhysicalDevice ( )

◆ maxSupportedSamples()

uint04 maxSupportedSamples ( ) const
overridevirtual

Implements GraphicsDevice.

◆ physicalDevice()

const VkPhysicalDevice & physicalDevice ( ) const
inline

◆ physicalFeatures()

const VkPhysicalDeviceFeatures & physicalFeatures ( ) const

◆ physicalProperties()

const VkPhysicalDeviceProperties & physicalProperties ( ) const

◆ presentQueue()

VkQueue presentQueue ( uint04 id = Constantuint04 >::Invalid) const

◆ removeSurface()

void removeSurface ( VkSurfaceKHR surface)

◆ returnID()

void returnID ( uint04 id = Constantuint04 >::Invalid) const

◆ setDeviceLost()

void setDeviceLost ( )

◆ setLog()

void setLog ( ProgressInfo * log)

◆ setQueueFamilies()

void setQueueFamilies ( )
protected

◆ setupLogicalDevice()

void setupLogicalDevice ( )
protected

◆ supportsMultiThreading()

virtual bool supportsMultiThreading ( ) const
inlineoverridevirtual

Reimplemented from GraphicsDevice.

◆ supportsTriangleFan()

bool supportsTriangleFan ( ) const
inline

◆ vkInstance()

VkInstance vkInstance ( ) const
inline

◆ waitForGraphicsQueue()

virtual void waitForGraphicsQueue ( uint04 id = Constantuint04 >::Invalid) const
virtual

Member Data Documentation

◆ m_checkouts

Buffer<uint04> m_checkouts
mutableprotected

◆ m_command_pools

Dictionary<uint04, VkCommandPool> m_command_pools
mutableprotected

◆ m_creation_time

Time m_creation_time
protected

◆ m_device

VkDevice m_device
protected

◆ m_device_extensions

Buffer<String> m_device_extensions
protected

◆ m_device_layers

Buffer<String> m_device_layers
protected

◆ m_enabled_features

VkPhysicalDeviceFeatures* m_enabled_features
mutableprotected

◆ m_graphics_family_index

uint04 m_graphics_family_index
protected

◆ m_graphics_queue

Dictionary<uint04, VkQueue> m_graphics_queue
mutableprotected

◆ m_graphics_queue_index

Dictionary<uint04, uint04> m_graphics_queue_index
mutableprotected

◆ m_id

UUID m_id
protected

◆ m_instance

DynamicPointer<VulkanInstance> m_instance
protected

◆ m_is_init

bool m_is_init
protected

◆ m_is_software_rendered

bool m_is_software_rendered
protected

◆ m_log

ProgressInfo* m_log
protected

◆ m_physical_device

VkPhysicalDevice m_physical_device
protected

◆ m_physical_features

VkPhysicalDeviceFeatures* m_physical_features
mutableprotected

◆ m_physical_properties

VkPhysicalDeviceProperties* m_physical_properties
mutableprotected

◆ m_present_family_index

uint04 m_present_family_index
protected

◆ m_present_queue

Dictionary<uint04, VkQueue> m_present_queue
mutableprotected

◆ m_queue_families

Buffer<VkQueueFamilyProperties, uint04, ObjectAllocator<true> > m_queue_families
protected

◆ m_surfaces

Buffer<VkSurfaceKHR> m_surfaces
protected

◆ m_thread_checkouts

Dictionary<uint04, uint04> m_thread_checkouts
mutableprotected

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