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

The connection between the NDEVR API and the Vulkan library. See: https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Instance Creating this connection involves specifying some details about NDEVR library to the driver. More...

#include <VulkanInstance.h>

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

Public Member Functions

void cleanup ()
 
virtual uint04 deviceSuitableScore (VkPhysicalDevice device)
 
virtual void init ()
 
bool isSoftwareRendered () const
 
bool isValid () const
 
ProgressInfolog ()
 
const Buffer< VkPhysicalDevice > & physicalDevices () const
 
void setDeviceLost ()
 
void setLog (ProgressInfo *log)
 
bool supportsKHRSwapchain () const
 
bool supportsTriangleFan () const
 
bool supportsValidation () const
 
const StringsurfaceType () const
 
const Buffer< String > & validationLayers () const
 
VkInstance vkInstance () const
 
 VulkanInstance ()
 
 VulkanInstance (VulkanInstance &&instance) noexcept
 
String vulkanLibUsed () const
 
virtual ~VulkanInstance ()
 

Static Public Member Functions

static DynamicPointer< VulkanInstance > & DefaultVulkanInstance ()
 
static String HardwareRenderedVulkanLib ()
 
static void setupModule (Module &module)
 
static String SoftwareRenderedVulkanLib ()
 
static Module VulkanBackupModule ()
 

Static Public Attributes

static Buffer< VulkanInstance * > s_instances
 

Protected Member Functions

virtual VkApplicationInfo applicationInfo (const String &app_name)
 
bool checkExtensionSupport (const String &layer)
 
bool checkLayerSupport (const String &layer)
 
bool checkValidationSupport ()
 
virtual VkSurfaceFormatKHR chooseSwapSurfaceFormat (const Buffer< VkSurfaceFormatKHR, uint04, ObjectAllocator< true > > &availableFormats)
 
virtual VkInstanceCreateInfo createInfo ()
 
virtual VkResult createVkInstance (const VkInstanceCreateInfo &create_info)
 
Time creationTime () const
 
void initializeAll ()
 
virtual void setAvailableExtensionInfo ()
 
virtual void setAvailableLayerInfo ()
 
virtual void setAvailablePhysicalDevices ()
 
virtual void setupDebug ()
 
virtual uint04 setupExtensions (const char **&extensions)
 
virtual void setupInstance ()
 
virtual uint04 setupLayers (const char **&layers)
 

Protected Attributes

Buffer< VkExtensionProperties, uint04, ObjectAllocator< true > > m_available_extension_info
 
Buffer< VkLayerProperties, uint04, ObjectAllocator< true > > m_available_layer_info
 
Buffer< VkPhysicalDevicem_available_physical_devices
 
Time m_creation_time
 
VkDebugReportCallbackEXT m_debug_callback
 
Buffer< Stringm_extensions
 
bool m_is_init = false
 
bool m_is_software_rendered = false
 
ProgressInfom_log
 
bool m_supports_tri_fan
 
bool m_supports_validation
 
String m_surface_type
 
Buffer< Stringm_validation_layers
 
VkInstance m_vk_instance
 

Detailed Description

The connection between the NDEVR API and the Vulkan library. See: https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Instance Creating this connection involves specifying some details about NDEVR library to the driver.


Constructor & Destructor Documentation

◆ VulkanInstance() [1/2]

◆ VulkanInstance() [2/2]

VulkanInstance ( VulkanInstance && instance)
noexcept

◆ ~VulkanInstance()

virtual ~VulkanInstance ( )
virtual

Member Function Documentation

◆ applicationInfo()

virtual VkApplicationInfo applicationInfo ( const String & app_name)
protectedvirtual

◆ checkExtensionSupport()

bool checkExtensionSupport ( const String & layer)
protected

◆ checkLayerSupport()

bool checkLayerSupport ( const String & layer)
protected

◆ checkValidationSupport()

bool checkValidationSupport ( )
protected

◆ chooseSwapSurfaceFormat()

virtual VkSurfaceFormatKHR chooseSwapSurfaceFormat ( const Buffer< VkSurfaceFormatKHR, uint04, ObjectAllocator< true > > & availableFormats)
protectedvirtual

◆ cleanup()

void cleanup ( )

◆ createInfo()

virtual VkInstanceCreateInfo createInfo ( )
protectedvirtual

◆ createVkInstance()

virtual VkResult createVkInstance ( const VkInstanceCreateInfo & create_info)
protectedvirtual

Reimplemented in VulkanXRInstance.

◆ creationTime()

Time creationTime ( ) const
inlineprotected

◆ DefaultVulkanInstance()

static DynamicPointer< VulkanInstance > & DefaultVulkanInstance ( )
static

◆ deviceSuitableScore()

virtual uint04 deviceSuitableScore ( VkPhysicalDevice device)
virtual

◆ HardwareRenderedVulkanLib()

static String HardwareRenderedVulkanLib ( )
static

◆ init()

virtual void init ( )
virtual

Reimplemented in VulkanXRInstance.

◆ initializeAll()

void initializeAll ( )
protected

◆ isSoftwareRendered()

bool isSoftwareRendered ( ) const

◆ isValid()

bool isValid ( ) const

◆ log()

ProgressInfo * log ( )
inline

◆ physicalDevices()

const Buffer< VkPhysicalDevice > & physicalDevices ( ) const
inline

◆ setAvailableExtensionInfo()

virtual void setAvailableExtensionInfo ( )
protectedvirtual

◆ setAvailableLayerInfo()

virtual void setAvailableLayerInfo ( )
protectedvirtual

◆ setAvailablePhysicalDevices()

virtual void setAvailablePhysicalDevices ( )
protectedvirtual

◆ setDeviceLost()

void setDeviceLost ( )

◆ setLog()

void setLog ( ProgressInfo * log)

◆ setupDebug()

virtual void setupDebug ( )
protectedvirtual

◆ setupExtensions()

virtual uint04 setupExtensions ( const char **& extensions)
protectedvirtual

Reimplemented in VulkanXRInstance.

◆ setupInstance()

virtual void setupInstance ( )
protectedvirtual

◆ setupLayers()

virtual uint04 setupLayers ( const char **& layers)
protectedvirtual

◆ setupModule()

static void setupModule ( Module & module)
static

◆ SoftwareRenderedVulkanLib()

static String SoftwareRenderedVulkanLib ( )
static

◆ supportsKHRSwapchain()

bool supportsKHRSwapchain ( ) const

◆ supportsTriangleFan()

bool supportsTriangleFan ( ) const

◆ supportsValidation()

bool supportsValidation ( ) const
inline

◆ surfaceType()

const String & surfaceType ( ) const

◆ validationLayers()

const Buffer< String > & validationLayers ( ) const
inline

◆ vkInstance()

VkInstance vkInstance ( ) const
inline

◆ VulkanBackupModule()

static Module VulkanBackupModule ( )
static

◆ vulkanLibUsed()

String vulkanLibUsed ( ) const

Member Data Documentation

◆ m_available_extension_info

Buffer<VkExtensionProperties, uint04, ObjectAllocator<true> > m_available_extension_info
protected

◆ m_available_layer_info

Buffer<VkLayerProperties, uint04, ObjectAllocator<true> > m_available_layer_info
protected

◆ m_available_physical_devices

Buffer<VkPhysicalDevice> m_available_physical_devices
protected

◆ m_creation_time

Time m_creation_time
protected

◆ m_debug_callback

VkDebugReportCallbackEXT m_debug_callback
protected

◆ m_extensions

Buffer<String> m_extensions
protected

◆ m_is_init

bool m_is_init = false
protected

◆ m_is_software_rendered

bool m_is_software_rendered = false
protected

◆ m_log

ProgressInfo* m_log
protected

◆ m_supports_tri_fan

bool m_supports_tri_fan
protected

◆ m_supports_validation

bool m_supports_validation
protected

◆ m_surface_type

String m_surface_type
protected

◆ m_validation_layers

Buffer<String> m_validation_layers
protected

◆ m_vk_instance

VkInstance m_vk_instance
protected

◆ s_instances

Buffer<VulkanInstance*> s_instances
static

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