HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_Instance Class Reference

Handle to the main interface of Vulkan. More...

#include <RV_Instance.h>

Public Member Functions

 ~RV_Instance ()
 
bool initializeDevice ()
 Set up Vulkan once the instance is created. More...
 
VkDevice getDevice ()
 Get the raw vulkan device assocated with this instance. More...
 
VkPhysicalDevice getPhysicalDevice ()
 Get the raw vulkan physical device assocated with this instance. More...
 
VkInstance getVkInst ()
 Get the raw vulkan instance. More...
 
const
VkPhysicalDeviceMemoryProperties
getMemoryProps () const
 Raw Vulkan memory properties of the physical device. More...
 
RV_VKMemAllocator & getMemAllocator ()
 Our Vulkan memory allocator implementation. More...
 
RV_DescriptorAllocatorgetDescAllocator ()
 Our Vulkan descriptor set allocator. More...
 
void fetchDriverInfo (UT_WorkBuffer &info)
 Get text information about the current driver and device. More...
 
uint32_t getDeviceVersion ()
 The Vulkan version as implemented by the device driver. More...
 
RV_GraphicsDevice getDeviceVendor () const
 The vendor of the device (AMD, Intel, NVidia, MoltenVK) More...
 
int getMaxColorSamples () const
 Maximum supported number of color samples in a multisample framebuffer. More...
 
int getMaxDepthSamples () const
 Maximum supported number of depth samples in a multisample framebuffer. More...
 
RV_VKExtgetExt ()
 Object containing function pointers to Vulkan extensions. More...
 
bool extEnabled (const char *vk_ext_name) const
 Query if the given Vulkan extension is enabled in the device. More...
 
void waitDeviceIdle ()
 Block until the device has finished all commands (Call with care!) More...
 
const voidgetPhysicalDeviceFeatures (VkStructureType feature_type) const
 

Static Public Member Functions

static RV_InstancegetInstance ()
 The global vulkan instance. May be null if it hasn't been created yet. More...
 
static void destroyInstance ()
 Destroy the global instance. For system exit. More...
 
static void exitCallback (void *)
 
static RV_Instancecreate ()
 Create the global vulkan instance. Used only at startup. More...
 
static uint32_t getInstanceVersion ()
 

Public Attributes

UT_UniquePtr< RV_VKQueue > myGraphicsQueue
 
UT_UniquePtr< RV_RendermyRender
 

Static Public Attributes

static const uint32_t requestedInstanceVersion
 

Detailed Description

Handle to the main interface of Vulkan.

Definition at line 36 of file RV_Instance.h.

Constructor & Destructor Documentation

RV_Instance::~RV_Instance ( )

Member Function Documentation

static RV_Instance* RV_Instance::create ( )
static

Create the global vulkan instance. Used only at startup.

static void RV_Instance::destroyInstance ( )
static

Destroy the global instance. For system exit.

static void RV_Instance::exitCallback ( void )
static

The exit callback that's called when the vulkan instance is about to be destroyed.

bool RV_Instance::extEnabled ( const char *  vk_ext_name) const

Query if the given Vulkan extension is enabled in the device.

void RV_Instance::fetchDriverInfo ( UT_WorkBuffer info)

Get text information about the current driver and device.

RV_DescriptorAllocator& RV_Instance::getDescAllocator ( )
inline

Our Vulkan descriptor set allocator.

Definition at line 68 of file RV_Instance.h.

VkDevice RV_Instance::getDevice ( )

Get the raw vulkan device assocated with this instance.

RV_GraphicsDevice RV_Instance::getDeviceVendor ( ) const

The vendor of the device (AMD, Intel, NVidia, MoltenVK)

uint32_t RV_Instance::getDeviceVersion ( )

The Vulkan version as implemented by the device driver.

RV_VKExt* RV_Instance::getExt ( )
inline

Object containing function pointers to Vulkan extensions.

Definition at line 90 of file RV_Instance.h.

static RV_Instance* RV_Instance::getInstance ( )
static

The global vulkan instance. May be null if it hasn't been created yet.

static uint32_t RV_Instance::getInstanceVersion ( )
static
int RV_Instance::getMaxColorSamples ( ) const

Maximum supported number of color samples in a multisample framebuffer.

int RV_Instance::getMaxDepthSamples ( ) const

Maximum supported number of depth samples in a multisample framebuffer.

RV_VKMemAllocator& RV_Instance::getMemAllocator ( )
inline

Our Vulkan memory allocator implementation.

Definition at line 66 of file RV_Instance.h.

const VkPhysicalDeviceMemoryProperties* RV_Instance::getMemoryProps ( ) const

Raw Vulkan memory properties of the physical device.

VkPhysicalDevice RV_Instance::getPhysicalDevice ( )

Get the raw vulkan physical device assocated with this instance.

const void* RV_Instance::getPhysicalDeviceFeatures ( VkStructureType  feature_type) const

returns a pointer to a VkPhysicalDevice*Features structure or a nullptr if feature is not found

VkInstance RV_Instance::getVkInst ( )

Get the raw vulkan instance.

bool RV_Instance::initializeDevice ( )

Set up Vulkan once the instance is created.

void RV_Instance::waitDeviceIdle ( )

Block until the device has finished all commands (Call with care!)

Member Data Documentation

UT_UniquePtr<RV_VKQueue> RV_Instance::myGraphicsQueue

Definition at line 73 of file RV_Instance.h.

UT_UniquePtr<RV_Render> RV_Instance::myRender

Definition at line 74 of file RV_Instance.h.

const uint32_t RV_Instance::requestedInstanceVersion
static

Definition at line 76 of file RV_Instance.h.


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