vpr namespace

The VulpesRender namespace containing this libraries objects.

Contents

Classes

class Allocation

Allocation class represents a singular allocation: can be a private allocation (i.e, only user of attached DeviceMemory) or a block allocation (bound to sub-region of device memory)
class AllocationCollection
An allocation collection is just a vector of MemoryBlocks of the same type.
struct AllocationRequirements
This struct is the primary item submitted to allocator methods for resource creation.
class Allocator
The primary interface and class of this subsystem.
class Buffer deprecated
class CommandPool
The CommandPool class is the primary interface through which one will acquire VkCommandBuffer objects.
class DescriptorPool
RAII wrapper around a VkDescriptorPool intended to facilitate sharing of descriptor pools between disparate objects, thus increasing resource sharing and avoiding allocating single-use descriptor pools (as this is an expensive operation).
class DescriptorSet
RAII wrapper around a descriptor set, simplifying adding individual descriptor bindings for whatever stage they're required at.
class DescriptorSetLayout
Simple wrapper around the VkDescriptorSetLayout object.
class Device
!The Device class is a wrapper around the vkLogicalDevice object.
class Event
Events are a unique synchronization primitive on Vulkan: unlike fences or semaphores they are not strictly intended for only use on the device or only use on the host.
class Fence
A fence is the most heavyweight of Vulkan synchronization primitives, and is for explicitly synchronizating the device and host.
class Framebuffer
The Framebuffer class merely handles lifetime of a VkFramebuffer object.
class GraphicsPipeline
The GraphicsPipeline object is an RAII wrapper around a vkGraphicsPipeline object, handling construction and destruction alone.
struct GraphicsPipelineInfo
This struct is used to define most of the pipeline state for a Vulkan vkGraphicsPipeline object.
class Image deprecated
class Instance
Instance is a wrapper around the base Vulkan object that must be initialized first.
class MemoryBlock
A MemoryBlock is a large contiguous region of Vulkan memory of a uniform type (device local, host coherent, host visible, etc) that other objects bind to subregions of.
class PhysicalDevice
! PhysicalDevice is a wrapper around a VkPhysicalDevice object, which is itself merely a handle representing a Vulkan-compatible hardware device in a user's system.
class PipelineCache
A PipelineCache is a wrapper around a VkPipelineCache that takes care of several important details that are otherwise difficult to handle: saving and loading pipeline cache data from a file, verifying integrity of pipeline cache files, and cleaning up / repairing old, unused, and outdated pipeline cache files.
class PipelineLayout
PipelineLayout is an RAII wrapper around a VkPipelineLayout object that also simplifies setting what resources the pipeline layout will have bound to it.
class Renderpass
RAII wrapper around a Vulkan object, with a few utility methods to avoid redundancy and clutter in command-recording methods for various scenes.
class Sampler
Bare minimum RAII wrapper around Vulkan sampler object.
class Semaphore
The semaphore is Vulkan's device-exclusive synchronization primitive.
class ShaderModule
A thoroughly thin wrapper around a VkShaderModule object, whose primary utility beyond RAII resource management is setting up the VkPipelineShaderStageCreateInfo required when creating/setting up an objects graphics pipeline.
struct Suballocation
During the process of finding a suitable region to bind to, we need to store things like "SuballocationType", which helps keep track of the precise kind of memory we are looking for and lets us know if its optimally/linearly tiled.
struct SuballocationRequest
Represents an in-progress allocation that we will shortly attempt to assign a slot to.
class SurfaceKHR
The bare-minimum required to wrap a VkSurfaceKHR object.
class Swapchain
This class abstracts away much of the detailed work and boilerplate code required to setup a swapchain in Vulkan.
struct VkDebugUtilsFunctions
This structure will be populated with function pointers used to call the functions (as named) when available, or requested.
struct vkQueueFamilyIndices
Simple wrapper struct for storing queue family indices.
struct VprExtensionPack
The VprExtensionPack structure makes requesting extensions in the device and instance constructors easier and more robust, by allowing the specification of required and optional extensions.

Enums

enum class ValidationCode: uint8_t { VALIDATION_PASSED = 0, NULL_MEMORY_HANDLE, ZERO_MEMORY_SIZE, INCORRECT_SUBALLOC_OFFSET, NEED_MERGE_SUBALLOCS, FREE_SUBALLOC_COUNT_MISMATCH, USED_SUBALLOC_IN_FREE_LIST, FREE_SUBALLOC_SORT_INCORRECT, FINAL_SIZE_MISMATCH, FINAL_FREE_SIZE_MISMATCH }
These validation codes are returned by the memory validation routine, giving information on the error encountered.
enum class vertical_sync_mode: uint32_t { None = 0, VerticalSync = 1, VerticalSyncRelaxed = 2, VerticalSyncMailbox = 3, SharedDemandRefresh = 4, SharedContinuousRefresh = 5 }
Used to select which of the presentation modes are to be used by a Swapchain.

Functions

static auto CheckBlocksOnSamePage(const VkDeviceSize& item_a_offset, const VkDeviceSize& item_a_size, const VkDeviceSize& item_b_offset, const VkDeviceSize& page_size) -> bool constexpr
Taken from the Vulkan specification, section 11.6 Essentially, we need to ensure that linear and non-linear resources are properly placed on separate memory pages so that they avoid any accidental aliasing.
static auto CheckBufferImageGranularityConflict(SuballocationType type_a, SuballocationType type_b) -> bool constexpr
Checks to make sure the two objects of type "type_a" and "type_b" wouldn't cause a conflict with the buffer-image granularity values.
auto operator<<(std::ostream& os, const ValidationCode& code) -> std::ostream&
This is a simple and common overload to print enum info to any stream (this also works, FYI, with easylogging++).
auto SetLoggingRepository_VprCore(void* logging_repo) -> VPR_API void
Pass an easyloggingpp logging repository pointer into this function, and it will be set as the repository for this module to use.
auto RecreateSwapchainAndSurface(Swapchain* swap, SurfaceKHR* surface) -> void VPR_API
Pass a swapchain and surface pointer to this to have the swapchain and surface destroyed and recreated in the proper order.
auto SetLoggingRepository_VprResource(void* repo) -> VPR_API void
Pass an easyloggingpp logging repository pointer into this function, and it will be set as the repository for this module to use.