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

#include <VulkanDevice.h>

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

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

ProgressInfom_log
 
DynamicPointer< VulkanInstancem_instance
 
VkDevice m_device
 
VkPhysicalDevice m_physical_device
 
Buffer< Stringm_device_extensions
 
Buffer< Stringm_device_layers
 
Buffer< VkSurfaceKHR > m_surfaces
 
UUID m_id
 
Buffer< VkQueueFamilyProperties, uint04, ObjectAllocator< true > > m_queue_families
 
VkPhysicalDeviceProperties * m_physical_properties
 
VkPhysicalDeviceFeatures * m_physical_features
 
VkPhysicalDeviceFeatures * m_enabled_features
 
uint04 m_graphics_family_index
 
uint04 m_present_family_index
 
Time m_creation_time
 
Dictionary< uint04, VkCommandPool > m_command_pools
 
Dictionary< uint04, VkQueue > m_present_queue
 
Dictionary< uint04, VkQueue > m_graphics_queue
 
Dictionary< uint04, uint04m_graphics_queue_index
 
Buffer< uint04m_checkouts
 
Dictionary< uint04, uint04m_thread_checkouts
 
bool m_is_software_rendered
 
bool m_is_init
 

Additional Inherited Members

- Static Public Attributes inherited from GraphicsDevice
static DynamicPointer< GraphicsDevices_default_graphics_device = nullptr
 

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()

void autoChoosePhysicalDevice ( )
protectedvirtual

◆ beginSingleTimeCommands()

VkCommandBuffer beginSingleTimeCommands ( uint04 id = Constant<uint04>::NaN) const

◆ canServiceCaptureRequests()

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()

VkResult createLogicalDevice ( const VkDeviceCreateInfo & create_info)
protectedvirtual

◆ DefaultVulkanDevice()

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 = Constant<uint04>::NaN ) const

◆ findDepthFormat()

VkFormat findDepthFormat ( ) const

◆ findMemoryType()

uint04 findMemoryType ( uint04 typeFilter,
uint04 properties ) const

◆ getCommandPool()

VkCommandPool getCommandPool ( uint04 id = Constant<uint04>::NaN) const

◆ getThreadedID()

uint04 getThreadedID ( ) const
virtual

◆ graphicsQueue()

VkQueue_T * graphicsQueue ( uint04 id = Constant<uint04>::NaN) 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_T * presentQueue ( uint04 id = Constant<uint04>::NaN) const

◆ removeSurface()

void removeSurface ( VkSurfaceKHR surface)

◆ returnID()

void returnID ( uint04 id = Constant<uint04>::NaN) 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()

void waitForGraphicsQueue ( uint04 id = Constant<uint04>::NaN) 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 files: