PVRVk Functions#

pvrvk::createInstance#

Function Documentation#

Instance pvrvk::createInstance(const InstanceCreateInfo &createInfo)#

Create a PVRVk Instance.

Parameters

createInfo – The Create Info object for created Instance

Returns

A newly created instance. In case of failure, null instance

pvrvk::getVkBindings#

Function Documentation#

VkBindings &pvrvk::getVkBindings()#

Singleton global that returns vulkan non instance/device function pointers (vkGetInstanceProcAddr, vkCreateInstance, vkEnumerateInstanceExtensionProperties, etc)

Returns

A reference to the singleton VkBindings object

pvrvk::setElementAtIndex#

Function Documentation#

template<typename T>
static void pvrvk::setElementAtIndex(const uint32_t index, const T &newElement, std::vector<T> &elements)#

Sets an element in a vector at a specified index. If the index is outside the allocated size of the vector, create new elements using their default constructor to fill the vector with up to the specified index.

Template Parameters

T – Type of element to be inserted to the vector.

Parameters
  • index – Index to insert newElement into.

  • newElement – The new value/element to be inserted to the vector.

  • elements – The vector you want to insert the new element into.

pvrvk::appendPNext#

Function Documentation#

inline void pvrvk::appendPNext(VkBaseInStructure *baseStructure, const void *newPNext)#

Appends the provided pNext to the last pNext member of the provided base structure pNext chain.

Parameters
  • baseStructure – A pointer to a base structure to append the provided pNext to the end of the pNext chain

  • newPNext – An element to append to the pNext chain

pvrvk::impl::convert#

Function Documentation#

inline void pvrvk::impl::convert(VkVertexInputAttributeDescription &vkva, const VertexInputAttributeDescription &pvrva)#

Populate vulkan input attribute description.

Parameters
  • vkva – Return populated VkVertexInputAttributeDescription

  • pvrva – A vertex attribute info to convert from

pvrvk::impl::convert#

Function Documentation#

inline void pvrvk::impl::convert(VkStencilOpState &vkStencilState, const StencilOpState &stencilState)#

Populate vulkan stencil state.

Parameters
  • stencilState – A stencil state state to convert from

  • vkStencilState – Return populated VkStencilOpState

pvrvk::impl::convert#

Function Documentation#

inline void pvrvk::impl::convert(VkVertexInputBindingDescription &vkvb, const VertexInputBindingDescription &pvrvb)#

Populate vulkan input binding description.

Parameters
  • vkvb – Return populated VkVertexInputBindingDescription

  • pvrvb – A vertex input binding info to convert from

pvrvk::impl::populateShaderInfo#

Function Documentation#

inline void pvrvk::impl::populateShaderInfo(const VkShaderModule &shaderModule, pvrvk::ShaderStageFlags shaderStageFlags, const std::string &entryPoint, const ShaderConstantInfo *shaderConsts, uint32_t shaderConstCount, VkSpecializationInfo &specializationInfo, unsigned char *specializationInfoData, VkSpecializationMapEntry *mapEntries, VkPipelineShaderStageCreateInfo &outShaderCreateInfo)#

Populate a VkPipelineShaderStageCreateInfo.

Parameters
  • shaderModule – A shader module to use

  • shaderStageFlags – The shader stage flag bits

  • entryPoint – An std::string to use as the entry point for the pipeline shader stage

  • shaderConsts – A number of shader constants to use

  • shaderConstCount – The number of shader constants

  • specializationInfo – Memory backing for the specialization info structures

  • specializationInfoData – The memory backing for the specialization info

  • mapEntries – Memory backing for shaderConstCount number of VkSpecializationMapEntry structures

  • outShaderCreateInfo – The populated VkPipelineShaderStageCreateInfo

pvrvk::impl::convert#

Function Documentation#

inline void pvrvk::impl::convert(VkPipelineColorBlendAttachmentState &vkcb, const PipelineColorBlendAttachmentState &pvrcb)#

Populate vulkan pipeline color blend attachment state.

Parameters
  • vkcb – Return populated VkPipelineColorBlendAttachmentState

  • pvrcb – A color blend attachment state to convert from

pvrvk::impl::convert#

Function Documentation#

inline void pvrvk::impl::convert(VkViewport &vkvp, const Viewport &vp)#

Populate vulkan viewport.

Parameters
  • vp – A viewport to convert from

  • vkvp – Return populated Viewport

pvrvk::Extensions::enumerateInstanceExtensions#

Function Documentation#

void pvrvk::Extensions::enumerateInstanceExtensions(std::vector<ExtensionProperties> &outExtensions, const std::string &layerName)#

Get list of all supported instance extension properties for a given layer.

Parameters
  • outExtensions – Returned extensions

  • layerName – Layer from which to retrieve supported extensions

pvrvk::Extensions::filterExtensions#

Function Documentation#

VulkanExtensionList pvrvk::Extensions::filterExtensions(const std::vector<pvrvk::ExtensionProperties> &extensionProperties, const VulkanExtensionList &extensionsToEnable)#

Filter the extensions.

Parameters
  • extensionProperties – Extension properties

  • extensionsToEnable – Extensions to enable

Returns

VulkanExtensionList

pvrvk::Extensions::isInstanceExtensionSupported#

Function Documentation#

bool pvrvk::Extensions::isInstanceExtensionSupported(const std::string &extension)#

Query if an Instance Extension is supported.

Parameters

extension – The extension string

Returns

True if the instance supports the extension, otherwise false

pvrvk::Extensions::enumerateInstanceExtensions#

Function Documentation#

void pvrvk::Extensions::enumerateInstanceExtensions(std::vector<ExtensionProperties> &outExtensions)#

Get list of all supported instance extension properties.

Parameters

outExtensions – Returned extensions

pvrvk::Layers::isInstanceLayerSupported#

Function Documentation#

bool pvrvk::Layers::isInstanceLayerSupported(const std::string &layer)#

Query if an Instance Layer is supported.

Parameters

layer – The layer string

Returns

True if the instance supports the layer, otherwise false

pvrvk::Layers::filterLayers#

Function Documentation#

VulkanLayerList pvrvk::Layers::filterLayers(const std::vector<pvrvk::LayerProperties> &layerProperties, const VulkanLayerList &layersToEnable)#

Filter layers.

Parameters
  • layerProperties – Supportted layers

  • layersToEnable – layers to filter

Returns

Filtered layers

pvrvk::Layers::enumerateInstanceLayers#

Function Documentation#

void pvrvk::Layers::enumerateInstanceLayers(std::vector<LayerProperties> &outLayers)#

Enumerate instance layers.

Parameters

outLayers – Out layers

pvrvk::GpuDatatypesHelper::operator|#

Function Documentation#

inline Bits pvrvk::GpuDatatypesHelper::operator|(Bits lhs, Bits rhs)#

pvrvk::GpuDatatypesHelper::operator&#

Function Documentation#

inline Bits pvrvk::GpuDatatypesHelper::operator&(Bits lhs, Bits rhs)#

pvrvk::GpuDatatypesHelper::operator&=#

Function Documentation#

inline void pvrvk::GpuDatatypesHelper::operator&=(Bits &lhs, Bits rhs)#

pvrvk::GpuDatatypesHelper::operator|=#

Function Documentation#

inline void pvrvk::GpuDatatypesHelper::operator|=(Bits &lhs, Bits rhs)#