PVRVk Classes#

AccelerationStructure_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkAccelerationStructureKHR, ObjectType::e_ACCELERATION_STRUCTURE_KHR > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::DeviceObjectDebugUtils< AccelerationStructure_ > (DeviceObjectDebugUtils)

Class Documentation#

class AccelerationStructure_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkAccelerationStructureKHR, ObjectType::e_ACCELERATION_STRUCTURE_KHR>, public pvrvk::impl::DeviceObjectDebugUtils<AccelerationStructure_>#

Top level acceleration structure implementation for the Vulkan Ray Tracing extension.

AccelerationStructure_::make_shared_enabler#

Nested Relationships#

This class is a nested type of AccelerationStructure_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class AccelerationStructure_

BufferView_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class BufferView_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkBufferView, ObjectType::e_BUFFER_VIEW>, public pvrvk::impl::DeviceObjectDebugUtils<BufferView_>#

pvrvk implementation of a BufferView.

Public Functions

inline BufferViewCreateFlags getFlags() const#

Get the buffer view creation flags.

Returns

The set of buffer view creation flags

inline const Buffer &getBuffer() const#

Get Buffer.

Returns

The Buffer used in the buffer view

inline Format getFormat() const#

Get Buffer view format.

Returns

Buffer view format (Format)

inline DeviceSize getOffset() const#

Get the buffer view creation offset.

Returns

The set of buffer view creation offset

inline DeviceSize getRange() const#

Get the buffer view creation range.

Returns

The set of buffer view creation range

inline const BufferViewCreateInfo &getCreateInfo() const#

Get this buffer view’s create flags.

Returns

BufferViewCreateInfo

BufferView_::make_shared_enabler#

Nested Relationships#

This class is a nested type of BufferView_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class BufferView_

Buffer_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Buffer_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkBuffer, ObjectType::e_BUFFER>, public pvrvk::impl::DeviceObjectDebugUtils<Buffer_>#

Vulkan implementation of the Buffer.

Public Functions

inline DeviceMemory &getDeviceMemory()#

Return the DeviceMemory bound to this buffer. Note.

: only nonsparse buffer can have a bound memory block

Returns

MemoryBlock

inline BufferCreateFlags getFlags() const#

Get this buffer’s creation flags.

Returns

The set of buffer creation flags

inline bool hasCreateFlag(pvrvk::BufferCreateFlags flags) const#

Indicates whether the buffers creation flags includes the given flag.

Parameters

flags – A buffer creation flag

Returns

True if the buffers creation flags includes the given flag

inline bool hasUsageFlag(pvrvk::BufferUsageFlags flags) const#

Indicates whether the buffers usage flags includes the given flag.

Parameters

flags – A buffer usage flag

Returns

True if the buffers usage flags includes the given flag

inline DeviceSize getSize() const#

Get this buffer’s size.

Returns

The size of this buffer

inline SharingMode getSharingMode() const#

Get this buffer’s supported sharing mode.

Returns

A SharingMode structure specifying this buffer’s supported sharing mode

inline BufferUsageFlags getUsageFlags() const#

Get this buffer’s supported usage flags.

Returns

A BufferUsageFlags structure specifying this buffer’s supported usage flags

inline uint32_t getNumQueueFamilyIndices() const#

Get the number of queue families supported by this buffer.

Returns

The size of the list of supported queue family indices

inline const uint32_t *getQueueFamilyIndices() const#

Get this buffer’s pointer to supported queue families.

Returns

A pointer to a list of supported queue family indices

inline void bindMemory(DeviceMemory deviceMemory, VkDeviceSize offset)#

Call only on Non-sparse buffer. Binds a non-sparse memory block. This function must be called once after this buffer creation. Calling second time don’t do anything.

Parameters
  • deviceMemory – Device memory block to bind

  • offset – begin offset in the memory block

inline BufferCreateInfo getCreateInfo() const#

Get this buffer’s create flags.

Returns

BufferCreateInfo

inline bool isSparseBuffer() const#

Return true if this is a sparse buffer.

Returns

bool

inline const MemoryRequirements &getMemoryRequirement() const#

Get thus buffer memory requirements.

Returns

VkMemoryRequirements

inline VkDeviceAddress getDeviceAddress(const Device device)#

Helper function to obtain the device adddress of a buffer.

Parameters

device – Device this acceleration structure was built with.

Returns

The device address of the buffer given as parameter.

Buffer_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Buffer_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Buffer_

CommandBufferBase_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Derived Types#

Class Documentation#

class CommandBufferBase_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkCommandBuffer, ObjectType::e_COMMAND_BUFFER>, public pvrvk::impl::DeviceObjectDebugUtils<CommandBufferBase_>#

Contains all the commands and states that need to be recorded for later submission to the gpu including pipelines, textures, descriptor sets. Virtually everything that needs to happen on the GPU is submitted to the CommandBuffer.

Subclassed by pvrvk::impl::CommandBuffer_, pvrvk::impl::SecondaryCommandBuffer_

Public Functions

void begin(const CommandBufferUsageFlags flags = CommandBufferUsageFlags(0))#

Call this function before beginning to record commands.

Parameters

flags – Flags is a bitmask of CommandBufferUsageFlags specifying usage behavior for the command buffer.

void end()#

Call this function when you are done recording commands. BeginRecording must be called first.

inline void beginDebugUtilsLabel(const pvrvk::DebugUtilsLabel &labelInfo)#

Begins identifying a region of work submitted to this command buffer. The calls to beginDebugUtilsLabel and endDebugUtilsLabel must be matched and balanced.

Parameters

labelInfo – Specifies the parameters of the label region to open

inline void endDebugUtilsLabel()#

Ends a label region of work submitted to this command buffer.

inline void insertDebugUtilsLabel(const pvrvk::DebugUtilsLabel &labelInfo)#

Inserts a single debug label any time.

Parameters

labelInfo – Specifies the parameters of the label region to insert

inline void debugMarkerBeginEXT(pvrvk::DebugMarkerMarkerInfo &markerInfo)#

Begins a debug marked region.

Parameters

markerInfo – Specifies the creation info for a marked region.

inline void debugMarkerEndEXT()#

Ends a debug marked region.

inline void debugMarkerInsertEXT(pvrvk::DebugMarkerMarkerInfo &markerInfo)#

Inserts a debug marker.

Parameters

markerInfo – Specifies creation info for the marker.

void resetQueryPool(QueryPool &queryPool, uint32_t firstQuery, uint32_t queryCount)#

Resets a particular range of queries for a particular QueryPool and sets their status’ to unavailable which also makes their numerical results undefined.

Parameters
  • queryPool – Specifies the query pool managing the queries being reset.

  • firstQuery – The first query index to reset.

  • queryCount – The number of queries to reset.

void resetQueryPool(QueryPool &queryPool, uint32_t queryIndex)#

Resets a particular range of queries for a particular QueryPool and sets their status’ to unavailable which also makes their numerical results undefined.

Parameters
  • queryPool – Specifies the query pool managing the queries being reset.

  • queryIndex – The query to reset.

void beginQuery(QueryPool &queryPool, uint32_t queryIndex, QueryControlFlags flags = QueryControlFlags(0))#

Begins a query for a particular QueryPool.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • queryIndex – The query index within the QueryPool which will contain the results.

  • flags – Specifies the Query Control Flag bits which provide constraints on the type of queries that can be performed.

void endQuery(QueryPool &queryPool, uint32_t queryIndex)#

Ends a query for a particular QueryPool.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • queryIndex – The query index within the QueryPool which will contain the results.

void copyQueryPoolResults(QueryPool &queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer &dstBuffer, VkDeviceSize offset, VkDeviceSize stride, QueryResultFlags flags)#

Copies the query statuses and numerical results directly to buffer memory.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • firstQuery – The first query index within the QueryPool which will contain the results.

  • queryCount – The number of queries.

  • dstBuffer – A buffer object which will receive the results of the copy command.

  • offset – An offset into dstBuffer.

  • stride – The stride in bytes between results for individual queries within dstBuffer.

  • flags – Specifies how and when the results are returned.

void writeTimestamp(QueryPool &queryPool, uint32_t queryIndex, PipelineStageFlags pipelineStage)#

Requests a timestamp for a particular QueryPool to be written to the query.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • queryIndex – The query index within the QueryPool which will contain the results.

  • pipelineStage – Specifies the stage of the pipeline to write a timestamp for.

inline bool isRecording()#

Queries if a command buffer is in the recording state.

Returns

True if recording, false otherwise

inline void bindPipeline(const GraphicsPipeline &pipeline)#

Bind a graphics pipeline.

Parameters

pipeline – The GraphicsPipeline to bind.

inline void bindPipeline(ComputePipeline &pipeline)#

Bind a compute pipeline.

Parameters

pipeline – The ComputePipeline to bind

inline void bindPipeline(RaytracingPipeline &pipeline)#

Bind a ray tracing pipeline.

Parameters

pipeline – The RaytracingPipeline to bind

void bindDescriptorSets(PipelineBindPoint bindingPoint, const PipelineLayout &pipelineLayout, uint32_t firstSet, const DescriptorSet *sets, uint32_t numDescriptorSets, const uint32_t *dynamicOffsets = nullptr, uint32_t numDynamicOffsets = 0)#

Bind descriptorsets.

32_t values specifying dynamic offsets

Parameters
  • bindingPointPipeline binding point

  • pipelineLayoutPipeline layout

  • firstSet – The set number of the first descriptor set to be bound

  • sets – Pointer to the descriptor sets to be bound

  • numDescriptorSets – Number of descriptor sets

  • dynamicOffsets – Pointer to an array of uint

  • numDynamicOffsets – Number of dynamic offsets

inline void bindDescriptorSet(PipelineBindPoint bindingPoint, const PipelineLayout &pipelineLayout, uint32_t firstSet, const DescriptorSet set, const uint32_t *dynamicOffsets = nullptr, uint32_t numDynamicOffsets = 0)#

Bind descriptorset.

32_t values specifying dynamic offsets

Parameters
  • bindingPointPipeline binding point

  • pipelineLayoutPipeline layout

  • firstSet – The set number of the first descriptor set to be bound

  • set – Descriptor set to be bound

  • dynamicOffsets – Pointer to an array of uint

  • numDynamicOffsets – Number of dynamic offsets

inline void bindVertexBuffers(const Buffer *buffers, uint32_t firstBinding, uint16_t bindingCount, const uint32_t *offsets = nullptr)#

Bind vertex buffer.

Parameters
  • buffers – A set of vertex buffers to bind

  • firstBinding – The first index into buffers

  • bindingCount – The number of vertex buffers to bind

  • offsets – A pointer to an array of bindingCount buffer offsets

inline void bindVertexBuffer(const Buffer &buffer, uint32_t offset, uint16_t bindingIndex)#

Bind vertex buffer.

Parameters
  • buffer – Buffer

  • offset – Buffer offset

  • bindingIndex – The index of the vertex input binding whose state is updated by the command.

void bindVertexBuffer(Buffer const *buffers, uint32_t *offsets, uint16_t numBuffers, uint16_t startBinding, uint16_t numBindings)#

Bind vertex buffer.

Parameters
  • buffers – Buffers to be bound

  • offsets – Pointer to an array of buffer offsets.

  • numBuffers – number of buffers

  • startBinding – The indices of the first vertex input binding whose state is updated by the command.

  • numBindings – Number of bindings

inline void bindIndexBuffer(const Buffer &buffer, uint32_t offset, IndexType indexType)#

Bind index bufer.

Parameters
  • buffer – Imdex buffer

  • offset – Buffer offset

  • indexType – IndexType

void pipelineBarrier(PipelineStageFlags srcStage, PipelineStageFlags dstStage, const MemoryBarrierSet &barriers, bool dependencyByRegion = true)#

Add a memory barrier to the command stream, forcing preceeding commands to be written before succeeding commands are executed.

Parameters
  • srcStage – A bitmask of PipelineStageFlags specifying the src stage mask.

  • dstStage – A bitmask of PipelineStageFlags specifying the dst stage mask.

  • barriers – A set of memory barriers to be used in the pipeline barrier.

  • dependencyByRegion – A Specifes whether the dependencies in terms of how the execution and memory dependencies are formed.

void pipelineBarrier2(const MemoryBarrierSet2 &barriers, bool dependencyByRegion = true)#

Add a memory barrier to the command stream, forcing preceeding commands to be written before succeeding commands are executed, using the APIs from the extension VK_KHR_synchronization2.

Parameters
  • barriers – A set of memory barriers to be used in the pipeline barrier.

  • dependencyByRegion – A Specifes whether the dependencies in terms of how the execution and memory dependencies are formed.

void waitForEvent(const Event &event, PipelineStageFlags srcStage, PipelineStageFlags dstStage, const MemoryBarrierSet &barriers)#

Defines a memory dependency between prior event signal operations and subsequent commands.

Parameters
  • event – The event object to wait on.

  • srcStage – A bitmask of PipelineStageFlags specifying the src stage mask.

  • dstStage – A bitmask of PipelineStageFlags specifying the dst stage mask.

  • barriers – A set of memory barriers to be used in the pipeline barrier.

void waitForEvents(const Event *events, uint32_t numEvents, PipelineStageFlags srcStage, PipelineStageFlags dstStage, const MemoryBarrierSet &barriers)#

Defines a set of memory dependencies between prior event signal operations and subsequent commands.

Parameters
  • events – A pointer to an array of Event objects to wait on.

  • numEvents – The number of event objects to wait on.

  • srcStage – A bitmask of PipelineStageFlags specifying the src stage mask.

  • dstStage – A bitmask of PipelineStageFlags specifying the dst stage mask.

  • barriers – A set of .

inline void setEvent(Event &event, PipelineStageFlags pipelineStageFlags = PipelineStageFlags::e_ALL_COMMANDS_BIT)#

Defines an execution dependency on commands that were submitted before it, and defines an event signal operation which sets the event to the signaled state.

Parameters
  • event – The event object that will be signaled.

  • pipelineStageFlags – Specifies the src stage mask used to determine when the event is signaled.

inline void resetEvent(Event &event, PipelineStageFlags pipelineStageFlags = PipelineStageFlags::e_ALL_COMMANDS_BIT)#

Defines an execution dependency on commands that were submitted before it, and defines an event unsignal operation which resets the event to the unsignaled state.

Parameters
  • event – The event object that will be unsignaled.

  • pipelineStageFlags – Is a bitmask of PipelineStageFlags specifying the src stage mask used to determine when the event is unsignaled.

inline void reset(CommandBufferResetFlags resetFlags = CommandBufferResetFlags::e_NONE)#

Clears this CommandBuffer discarding any previously recorded commands and puts the command buffer in the initial state.

param resetFlags

Is a bitmask of CommandBufferResetFlagBits controlling the reset operation.

void copyImage(const Image &srcImage, const Image &dstImage, ImageLayout srcImageLayout, ImageLayout dstImageLayout, uint32_t numRegions, const ImageCopy *regions)#

Copy data between Images.

Parameters
  • srcImage – Source image

  • dstImage – Destination image

  • srcImageLayout – Source image layout

  • dstImageLayout – Destination image layout

  • regions – Regions to copy

  • numRegions – Number of regions

void copyImageToBuffer(const Image &srcImage, ImageLayout srcImageLayout, Buffer &dstBuffer, const BufferImageCopy *regions, uint32_t numRegions)#

Copy image to buffer.

Parameters
  • srcImage – Source image to copy from

  • srcImageLayout – Current src image layout

  • dstBuffer – Destination buffer

  • regions – Regions to copy

  • numRegions – Number of regions

void copyBuffer(const Buffer &srcBuffer, const Buffer &dstBuffer, uint32_t numRegions, const BufferCopy *regions)#

Copy Buffer.

Parameters
  • srcBuffer – Source buffer

  • dstBuffer – Destination buffer

  • numRegions – Number of regions to copy

  • regions – Pointer to an array of BufferCopy structures specifying the regions to copy. Each region in pRegions is copied from the source buffer to the same region of the destination buffer. srcBuffer and dstBuffer can be the same buffer or alias the same memory, but the result is undefined if the copy regions overlap in memory.

void copyBufferToImage(const Buffer &buffer, const Image &image, ImageLayout dstImageLayout, uint32_t regionsCount, const BufferImageCopy *regions)#

Copy buffer to image.

Parameters
  • buffer – Source Buffer

  • image – Destination image

  • dstImageLayout – Destination image’s current layout

  • regionsCount – Copy regions

  • regions – Number of regions

void fillBuffer(const Buffer &dstBuffer, uint32_t dstOffset, uint32_t data, uint64_t size = VK_WHOLE_SIZE)#

Clear buffer data.

Parameters
  • dstBuffer – Destination buffer to be filled

  • dstOffset – The byte offset into the buffer at which to start filling.

  • data – A 4-byte word written repeatedly to the buffer to fill size bytes of data. The data word is written to memory according to the host endianness.

  • size – The number of bytes to fill, and must be either a multiple of 4, or VK_WHOLE_SIZE to fill the range from offset to the end of the buffer

void setViewport(const Viewport &viewport)#

Set viewport.

Parameters

viewport – Viewport

void clearAttachments(const uint32_t numAttachments, const ClearAttachment *clearAttachments, uint32_t numRectangles, const ClearRect *clearRectangles)#

Clear a set of attacments using a number of regions for each selected attachment to clear whilst inside a renderpass.

Parameters
  • numAttachments – The number of entries in the clearAttachments array.

  • clearAttachments – Is a pointer to an array of ClearAttachment structures which defines the attachments to clear and the clear values to use.

  • numRectangles – Is the number of entries in the clearRects array.

  • clearRectangles – Points to an array of ClearRect structures defining regions within each selected attachment to clear.

inline void clearAttachment(const ClearAttachment &clearAttachment, const ClearRect &clearRectangle)#

Clears a particular attachment using a provided region whilst inside of a renderpass.

Parameters
  • clearAttachment – A single ClearAttachment structure defining the attachment to clear and the clear value to use

  • clearRectangle – A ClearRect structure defining a region within the attachment to clear

void draw(uint32_t firstVertex, uint32_t numVertices, uint32_t firstInstance = 0, uint32_t numInstances = 1)#

Non-indexed drawing command.

Parameters
  • firstVertex – The index of the first vertex to draw.

  • numVertices – The number of vertices to draw.

  • firstInstance – The instance ID of the first instance to draw.

  • numInstances – The number of instances to draw.

void drawIndexed(uint32_t firstIndex, uint32_t numIndices, int32_t vertexOffset = 0, uint32_t firstInstance = 0, uint32_t numInstances = 1)#

Indexed drawing command.

Parameters
  • firstIndex – The base index within the index buffer.

  • numIndices – The number of vertices to draw.

  • vertexOffset – The value added to the vertex index before indexining into the vertex buffer.

  • firstInstance – The instance ID of the first instance to draw.

  • numInstances – The number of instances to draw.

void drawIndirect(const Buffer &buffer, uint32_t offset, uint32_t count, uint32_t stride)#

Non-indexed indirect drawing command.

Parameters
  • buffer – The buffer containing draw parameters.

  • offset – The byte offset into buffer where parameters begin.

  • count – The number of draws to execute.

  • stride – The byte stride between successive sets of draw commands.

void drawIndexedIndirect(const Buffer &buffer, uint32_t offset, uint32_t count, uint32_t stride)#

Non-indexed indirect drawing command.

Parameters
  • buffer – The buffer containing draw parameters.

  • offset – The byte offset into buffer where parameters begin.

  • count – The number of draws to execute.

  • stride – The byte stride between successive sets of draw commands.

void dispatch(uint32_t numGroupX, uint32_t numGroupY, uint32_t numGroupZ)#

Dispatching work provokes work in a compute pipeline. A compute pipeline must be bound to the command buffer before any dispatch commands are recorded.

Parameters
  • numGroupX – The number of local workgroups to dispatch in the X dimension.

  • numGroupY – The number of local workgroups to dispatch in the Y dimension.

  • numGroupZ – The number of local workgroups to dispatch in the Z dimension.

void dispatchIndirect(Buffer &buffer, uint32_t offset)#

Dispatching work provokes work in a compute pipeline. A compute pipeline must be bound to the command buffer before any dispatch commands are recorded. dispatchIndirect behaves similarly to dispatch except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in a DispatchIndirectCommand structure taken from buffer starting at offset.

Parameters
  • buffer – The buffer containing dispatch parameters.

  • offset – The byte offset into buffer where parameters begin.

void clearColorImage(const ImageView &image, const ClearColorValue &clearColor, ImageLayout currentLayout, const uint32_t baseMipLevel = 0, const uint32_t numLevels = 1, const uint32_t baseArrayLayer = 0, const uint32_t numLayers = 1)#

Clears a color image outside of a renderpass instance.

Parameters
  • image – Image to clear

  • clearColor – Clear color value

  • currentLayout – Image current layout

  • baseMipLevel – Base mip map level to clear

  • numLevels – Number of mipmap levels to clear

  • baseArrayLayer – Base array layer to clear

  • numLayers – Number of array layers to clear

void clearColorImage(const ImageView &image, const ClearColorValue &clearColor, ImageLayout currentLayout, const uint32_t *baseMipLevels, const uint32_t *numLevels, const uint32_t *baseArrayLayers, const uint32_t *numLayers, uint32_t numRanges)#

Clears a color image outside of a renderpass instance using a number of ranges.

Parameters
  • image – Image to clear.

  • clearColor – Clear color value.

  • currentLayout – Image current layout.

  • baseMipLevels – Base mip map level to clear.

  • numLevels – A pointer to an array of a number of mipmap levels to clear.

  • baseArrayLayers – A pointer to an array of base array layers to clear.

  • numLayers – A pointer to an array array layers to clear.

  • numRanges – The number of elements in the baseMipLevel, numLevels, baseArrayLayers and numLayers arrays.

void clearDepthStencilImage(const Image &image, float clearDepth, uint32_t clearStencil, const uint32_t baseMipLevel, const uint32_t numLevels, const uint32_t baseArrayLayer, const uint32_t numLayers, ImageLayout layout)#

Clear depth stencil image outside of a renderpass instance.

Parameters
  • image – Image to clear

  • clearDepth – Clear depth value

  • clearStencil – Clear stencil value

  • baseMipLevel – Base mip map level to clear

  • numLevels – Number of mipmap levels to clear

  • baseArrayLayer – Base array layer to clear

  • numLayers – Number of array layers to clear

  • layout – Image current layout

void clearDepthStencilImage(const Image &image, float clearDepth, uint32_t clearStencil, const uint32_t *baseMipLevels, const uint32_t *numLevels, const uint32_t *baseArrayLayers, const uint32_t *numLayers, uint32_t numRanges, ImageLayout layout)#

Clear depth stencil image outside of a renderpass instance using a number of ranges.

Parameters
  • image – Image to clear

  • clearDepth – Clear depth value

  • clearStencil – Clear stencil value

  • baseMipLevels – A pointer to an array of base mip map levels to clear

  • numLevels – A pointer to an array of the number of mipmap levels to clear

  • baseArrayLayers – A pointer to an array of base array layers to clear

  • numLayers – A pointer to an array of the number of layers to clear

  • numRanges – A number of ranges of the depth stencil image to clear. This number will be used as the number of array elements in the arrays passed to baseMipLevels, numLevels, baseArrayLayers and numLayers

  • layout – Image current layout

void clearStencilImage(const Image &image, uint32_t clearStencil, const uint32_t baseMipLevel, const uint32_t numLevels, const uint32_t baseArrayLayer, const uint32_t numLayers, ImageLayout layout)#

Clears a stencil image outside of a renderpass instance.

Parameters
  • image – Image to clear

  • clearStencil – Clear stencil value

  • baseMipLevel – Base mip map level to clear

  • numLevels – Number of mipmap levels to clear

  • baseArrayLayer – Base array layer to clear

  • numLayers – Number of array layers to clear

  • layout – Image current layout

void clearStencilImage(const Image &image, uint32_t clearStencil, const uint32_t *baseMipLevels, const uint32_t *numLevels, const uint32_t *baseArrayLayers, const uint32_t *numLayers, uint32_t numRanges, ImageLayout layout)#

Clear stencil image outside of a renderpass instance using a number of ranges.

Parameters
  • image – Image to clear

  • clearStencil – Clear stencil value

  • baseMipLevels – A pointer to an array of base mip map levels to clear

  • numLevels – A pointer to an array of the number of mipmap levels to clear

  • baseArrayLayers – A pointer to an array of base array layers to clear

  • numLayers – A pointer to an array of the number of layers to clear

  • numRanges – A number of ranges of the stencil image to clear. This number will be used as the number of array elements in the arrays passed to baseMipLevels, numLevels, baseArrayLayers and numLayers

  • layout – Image current layout

void clearDepthImage(const Image &image, float clearDepth, const uint32_t baseMipLevel, const uint32_t numLevels, const uint32_t baseArrayLayer, const uint32_t numLayers, ImageLayout layout)#

Clear depth image outside of a renderpass instance.

Parameters
  • image – Image to clear

  • clearDepth – Clear value

  • baseMipLevel – Base mip map level to clear

  • numLevels – Number of mipmap levels to clear

  • baseArrayLayer – Base arraylayer to clear

  • numLayers – Number of array layers to clear

  • layout – Current layout of the image

void clearDepthImage(const Image &image, float clearDepth, const uint32_t *baseMipLevels, const uint32_t *numLevels, const uint32_t *baseArrayLayers, const uint32_t *numLayers, uint32_t numRanges, ImageLayout layout)#

Clears the depth image outside of a renderpass instance using a number of ranges.

Parameters
  • image – Image to clear

  • clearDepth – Clear depth value

  • baseMipLevels – A pointer to an array of base mip map levels to clear

  • numLevels – A pointer to an array of the number of mipmap levels to clear

  • baseArrayLayers – A pointer to an array of base array layers to clear

  • numLayers – A pointer to an array of the number of layers to clear

  • numRanges – A number of ranges of the stencil image to clear. This number will be used as the number of array elements in the arrays passed to baseMipLevels, numLevels, baseArrayLayers and numLayers

  • layout – Image current layout

void setScissor(uint32_t firstScissor, uint32_t numScissors, const Rect2D *scissors)#

Sets the dynamic scissor state affecting pipeline objects created with VK_DYNAMIC_STATE_SCISSOR enabled.

Parameters
  • firstScissor – The index of the first scissor whose state is updated.

  • numScissors – The number of scissors whose rectangles are updated.

  • scissors – A pointer to an array of Rect2Di structures defining scissor rectangles.

void setDepthBounds(float min, float max)#

Sets the dynamic depth bounds state affecting pipeline objects created with VK_DYNAMIC_STATE_DEPTH_BOUNDS enabled.

Parameters
  • min – The lower bound of the range of depth values used in the depth bounds test.

  • max – The upper bound of the range.

void setStencilWriteMask(StencilFaceFlags face, uint32_t writeMask)#

Sets the dynamic stencil write mask state affecting pipeline objects created with VK_DYNAMIC_STATE_STENCIL_WRITE_MASK enabled.

Parameters
  • face – A bitmask of StencilFaceFlags specifying the set of stencil state for which to update the write mask.

  • writeMask – The new value to use as the stencil write mask

void setStencilReference(StencilFaceFlags face, uint32_t reference)#

Sets the dynamic stencil reference mask state affecting pipeline objects created with VK_DYNAMIC_STATE_STENCIL_REFERENCE enabled.

Parameters
  • face – A bitmask of StencilFaceFlags specifying the set of stencil state for which to update the reference value.

  • reference – The new value to use as the stencil reference value.

void setStencilCompareMask(StencilFaceFlags face, uint32_t compareMask)#

Sets the dynamic stencil compare mask state affecting pipeline objects created with VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK enabled.

Parameters
  • face – A bitmask of StencilFaceFlags specifying the set of stencil state for which to update the compare mask.

  • compareMask – The new value to use as the stencil compare value.

void setDepthBias(float constantFactor, float clamp, float slopeFactor)#

Sets the dynamic depth bias state affecting pipeline objects created where depthBiasEnable is enabled.

Parameters
  • constantFactor – A scalar factor controlling the constant depth value added to each fragment.

  • clamp – The maximum (or minimum) depth bias of a fragment.

  • slopeFactor – A scalar factor applied to a fragment’s slope in depth bias calculations.

void setBlendConstants(float rgba[4])#

Sets the dynamic blend constant bias state affecting pipeline objects created with VK_DYNAMIC_STATE_BLEND_CONSTANTS enabled.

Parameters

rgba – An array of four values specifying the R, G, B, and A components of the blend constant color used in blending, depending on the blend factor

void setLineWidth(float lineWidth)#

Sets the dynamic line width state affecting pipeline objects created with VK_DYNAMIC_STATE_LINE_WIDTH enabled.

Parameters

lineWidth – The width of rasterized line segments.

void blitImage(const Image &srcImage, const Image &dstImage, const ImageBlit *regions, uint32_t numRegions, Filter filter, ImageLayout srcLayout, ImageLayout dstLayout)#

Copies regions of a src image into a dst image, potentially also performing format conversions, aritrary scaling and filtering.

Parameters
  • srcImage – The src Image in the copy.

  • dstImage – The dst image.

  • regions – A pointer to an array of ImageBlitRange structures specifying the regions to blit.

  • numRegions – The number of regions to blit.

  • filter – A Filter specifying the filter to apply if the blits require scaling

  • srcLayout – The layout of the src image subresrcs for the blit.

  • dstLayout – The layout of the dst image subresrcs for the blit.

void resolveImage(const Image &srcImage, const Image &dstImage, const ImageResolve *regions, uint32_t numRegions, ImageLayout srcLayout, ImageLayout dstLayout)#

Copies regions of a src image into a dst image, potentially also performing format conversions, aritrary scaling and filtering.

Parameters
  • srcImage – The src Image in the copy.

  • dstImage – The dst image.

  • regions – A pointer to an array of ImageBlitRange structures specifying the regions to blit.

  • numRegions – The number of regions to blit.

  • srcLayout – The layout of the src image subresrcs for the blit.

  • dstLayout – The layout of the dst image subresrcs for the blit.

void updateBuffer(const Buffer &buffer, const void *data, uint32_t offset, uint32_t length)#

Updates buffer data inline in a command buffer. The update is only allowed outside of a renderpass and is treated as a transfer operation for the purposes of syncrhonization.

Parameters
  • buffer – The buffer to be updated.

  • data – A pointer to the src data for the buffer update. The data must be at least length bytes in size.

  • offset – The byte offset into the buffer to start updating, and must be a multiple of 4.

  • length – The number of bytes to update, and must be a multiple of 4.

void pushConstants(const PipelineLayout &pipelineLayout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *data)#

Updates the value of shader push constants at the offset specified.

Parameters
  • pipelineLayout – The pipeline layout used to program the push constant updates.

  • stageFlags – A bitmask of ShaderStageFlag specifying the shader stages that will use the push constants in the updated range.

  • offset – The start offset of the push constant range to update, in units of bytes.

  • size – The size of the push constant range to update, in units of bytes.

  • data – An array of size bytes containing the new push constant values.

void bindTransformFeedbackBuffers(pvrvk::Buffer buffer, VkDeviceSize offset, VkDeviceSize size = VK_WHOLE_SIZE)#

Binds a transform feedback buffer to the command buffer for use in subsequent draw commands.

Parameters
  • buffer – A buffer to bind the command buffer.

  • offset – A buffer offset.

  • size – An optional buffer size, which specifies the maximum number of bytes to capture to the corresponding transform feedback buffer.

void bindTransformFeedbackBuffers(uint32_t firstBinding, uint32_t bindingCount, const pvrvk::Buffer *buffers, const VkDeviceSize *offsets, const VkDeviceSize *sizes = nullptr)#

Binds a set of transform feedback buffers to the command buffer for use in subsequent draw commands.

Parameters
  • firstBinding – The index of the first transform feedback binding whose state is updated by the command.

  • bindingCount – The number of transform feedback bindings whose state is updated by the command.

  • buffers – A list of buffers to bind the command buffer.

  • offsets – Pointer to an array of buffer offsets.

  • sizes – An optional array of buffer sizes, which specifies the maximum number of bytes to capture to the corresponding transform feedback buffer.

void beginTransformFeedback(uint32_t firstCounterBuffer, uint32_t numCounterBuffers, const pvrvk::Buffer *counterBuffers = nullptr, const VkDeviceSize *counterBufferOffsets = nullptr)#

Makes active transform feedback for specific transform feedback buffers.

Parameters
  • firstCounterBuffer – Index of the first transform feedback buffer.

  • numCounterBuffers – The number of buffers.

  • counterBuffers – An optional list of buffers where the handles of the buffers correspond to the counter buffers which contain a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data.

  • counterBufferOffsets – An optional array of offsets within each of the pCounterBuffers where the counter values were previously written.

void beginTransformFeedback(pvrvk::Buffer counterBuffer, VkDeviceSize counterBufferOffset = 0)#

Makes active transform feedback for specific transform feedback buffers.

Parameters
  • counterBuffer – The handle of the buffer correspond to the counter buffer which contains a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data.

  • counterBufferOffset – An optional offset within the counterBuffer where the counter values were previously written.

void endTransformFeedback(uint32_t firstCounterBuffer, uint32_t numCounterBuffers, const pvrvk::Buffer *counterBuffers = nullptr, const VkDeviceSize *counterBufferOffsets = nullptr)#

Makes inactive transform feedback for specific transform feedback buffers.

Parameters
  • firstCounterBuffer – Index of the first transform feedback buffer.

  • numCounterBuffers – The number of buffers.

  • counterBuffers – An optional list of buffers where the handles of the buffers correspond to the counter buffers which contain a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data.

  • counterBufferOffsets – An optional array of offsets within each of the pCounterBuffers where the counter values were previously written.

void endTransformFeedback(pvrvk::Buffer counterBuffer, VkDeviceSize counterBufferOffset = 0)#

Makes inactive transform feedback for specific transform feedback buffers.

Parameters
  • counterBuffer – The handle of the buffer correspond to the counter buffer which contains a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data.

  • counterBufferOffset – An optional offset within the counterBuffer where the counter values were previously written.

void beginQueryIndexed(QueryPool &queryPool, uint32_t queryIndex, QueryControlFlags flags = QueryControlFlags(0), uint32_t index = 0)#

Begins a query for a particular QueryPool.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • queryIndex – The query index within the QueryPool which will contain the results.

  • flags – Specifies the Query Control Flag bits which provide constraints on the type of queries that can be performed.

  • index – The query type specific index.

void endQueryIndexed(QueryPool &queryPool, uint32_t queryIndex, uint32_t index = 0)#

Ends a query for a particular QueryPool.

Parameters
  • queryPool – Specifies the query pool which will manage the results of the query.

  • queryIndex – The query index within the QueryPool which will contain the results.

  • index – The query type specific index.

void drawIndirectByteCount(uint32_t instanceCount, uint32_t firstInstance, pvrvk::Buffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride)#

Records a non-indexed draw call, where the vertex count is based on a byte count read from a buffer and the passed in vertex stride parameter.

Parameters
  • instanceCount – The number of instances to draw.

  • firstInstance – The instance ID of the first instance to draw.

  • counterBuffer – The buffer handle from where the byte count is read.

  • counterBufferOffset – The offset into the buffer used to read the byte count, which is used to calculate the vertex count for this draw call.

  • counterOffset – Is subtracted from the byte count read from the counterBuffer at the counterBufferOffset.

  • vertexStride – The stride in bytes between each element of the vertex data that is used to calculate the vertex count from the counter value

inline const CommandPool getCommandPool() const#

Const getter for the command pool used to allocate this command buffer.

Returns

The command pool used to allocate this command buffer.

void setFragmentShadingRate(Extent2D fragmentSize, FragmentShadingRateCombinerOpKHR combinerOpPipelinePrimitive, FragmentShadingRateCombinerOpKHR combinerOpResultAttachment)#

Set pipeline fragment shading rate.

Parameters
  • fragmentSize – The fragment size to be used for pipeline fragment shading rate.

  • combinerOpPipelinePrimitive – Defines how the pipeline fragment size (Axy) interacts with the primitive fragment size (Bxy). The resulting fragment size is Cxy = CombineOp(Axy, Bxy) as described in the vulkan spec. Default value is KEEP, resulting in Cxy = Axy.

  • combinerOpResultAttachment – Defines how the resulting fragment size from the pipeline/primitive combine operation (Axy) interacts with the attachment fragment size (Bxy). The final fragment size is Cxy = CombineOp(Axy, Bxy) as described in the vulkan spec. Default value is KEEP, resulting in Cxy = Axy.

inline void traceRays(pvrvk::StridedDeviceAddressRegionKHR &raygenTable, pvrvk::StridedDeviceAddressRegionKHR &missTable, pvrvk::StridedDeviceAddressRegionKHR &hitTable, pvrvk::StridedDeviceAddressRegionKHR &callableTable, int width, int height, int depth)#
inline void setVKSynchronization2IsSupported(bool value)#

Setter of member variablle _VKSynchronization2IsSupported.

Parameters

value – Value to set _VKSynchronization2IsSupported to.

Protected Attributes

std::vector<std::shared_ptr<void>> _objectReferences#

Holds a list of references to the objects currently in use by this command buffer. This ensures that objects are kept alive through reference counting until the command buffer is finished with them.

CommandPool _pool#

The command pool from which this command buffer was allocated.

bool _isRecording#

Specifies whether the command buffer is currently in the recording state which is controlled via calling the begin function.

bool _VKSynchronization2IsSupported#

True in case the extension VK_KHR_synchronization2 is supported, needed to use synchronizaton APIs using this extension like pipelineBarrier2///.

Protected Static Functions

static inline CommandBufferBase constructShared(const DeviceWeakPtr &device, CommandPool &pool, VkCommandBuffer myHandle)#

Protected function used to create a pvrvk::CommandBufferBase. Note that this function shouldn’t normally be called directly and will be called by a friend of CommandBufferBase_ which will generally be a CommandPool.

Parameters
  • device – The device used to allocate the command buffer.

  • pool – The pool from which the command buffer will be allocated.

  • myHandle – The vulkan handle for this command buffer.

Returns

Returns a successfully created pvrvk::CommandBufferBase

class make_shared_enabler#

A class which restricts the creation of a pvrvk::CommandBufferBase to children or friends of a pvrvk::impl::CommandBufferBase_.

Subclassed by pvrvk::impl::CommandBuffer_::make_shared_enabler, pvrvk::impl::SecondaryCommandBuffer_::make_shared_enabler

Protected Functions

make_shared_enabler() = default#

Constructor for a make_shared_enabler.

Friends

friend class CommandBufferBase_

CommandBufferBase_::make_shared_enabler#

Nested Relationships#

This class is a nested type of CommandBufferBase_.

Inheritance Relationships#

Derived Types#

Class Documentation#

class make_shared_enabler

A class which restricts the creation of a pvrvk::CommandBufferBase to children or friends of a pvrvk::impl::CommandBufferBase_.

Subclassed by pvrvk::impl::CommandBuffer_::make_shared_enabler, pvrvk::impl::SecondaryCommandBuffer_::make_shared_enabler

Protected Functions

make_shared_enabler() = default

Constructor for a make_shared_enabler.

Friends

friend class CommandBufferBase_

CommandBuffer_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class CommandBuffer_ : public pvrvk::impl::CommandBufferBase_#

Contains all the commands and states that need to be recorded for later submission to the gpu including pipelines, textures, descriptor sets. Virtually everything that needs to happen on the GPU is submitted to the CommandBuffer.

Public Functions

void executeCommands(const SecondaryCommandBuffer &secondaryCmdBuffer)#

Record commands from the secondary command buffer.

Parameters

secondaryCmdBuffer – Record all commands from a secondary command buffer

void executeCommands(const SecondaryCommandBuffer *secondaryCmdBuffers, uint32_t numCommandBuffers)#

Record commands from an array of secondary command buffer.

Parameters
  • secondaryCmdBuffers – A c-style array of SecondaryCommandBuffers

  • numCommandBuffers – The number of SecondaryCommandBuffers in secondaryCmdBuffers

void beginRenderPass(const Framebuffer &framebuffer, const RenderPass &renderPass, const Rect2D &renderArea, bool inlineFirstSubpass = false, const ClearValue *clearValues = nullptr, uint32_t numClearValues = 0)#

Begins the renderpass for the provided Framebuffer and renderpass and using a specific renderable area.

Parameters
  • framebuffer – A Framework wrapped Vulkan Framebuffer object to use as part of the VkRenderPassBeginInfo structure.

  • renderPass – A Framework wrapped Vulkan RenderPass object to use as part of the VkRenderPassBeginInfo structure.

  • renderArea – Specifies the render area that is affected by the renderpass instance.

  • inlineFirstSubpass – Specifies whether the renderpass uses an inline subpass as its first subpass.

  • clearValues – A pointer to a list of ClearValue structures which will be used as part of the VkRenderPassBeginInfo structure.

  • numClearValues – The number or ClearValue structures passed to the VkRenderPassBeginInfo structure.

void beginRenderPass(const Framebuffer &framebuffer, const Rect2D &renderArea, bool inlineFirstSubpass = false, const ClearValue *clearValues = nullptr, uint32_t numClearValues = 0)#

Begins a renderpass for the provided Framebuffer taking the renderpass from the provided Framebuffer and using a specific renderable area.

Parameters
  • framebuffer – A Framework wrapped Vulkan Framebuffer object to use as part of the VkRenderPassBeginInfo structure.

  • renderArea – Specifies the render area that is affected by the renderpass instance.

  • inlineFirstSubpass – Specifies whether the renderpass uses an inline subpass as its first subpass.

  • clearValues – A pointer to a list of ClearValue structures which will be used as part of the VkRenderPassBeginInfo structure.

  • numClearValues – The number or ClearValue structures passed to the VkRenderPassBeginInfo structure.

void beginRenderPass(const Framebuffer &framebuffer, bool inlineFirstSubpass = false, const ClearValue *clearValues = nullptr, uint32_t numClearValues = 0)#

Begins a renderpass for the provided Framebuffer taking the renderpass from the provided Framebuffer and taking the renderable area from the Framebuffer.

Parameters
  • framebuffer – A Framework wrapped Vulkan Framebuffer object to use as part of the VkRenderPassBeginInfo structure.

  • inlineFirstSubpass – Specifies whether the renderpass uses an inline subpass as its first subpass.

  • clearValues – A pointer to a list of ClearValue structures which will be used as part of the VkRenderPassBeginInfo structure.

  • numClearValues – The number or ClearValue structures passed to the VkRenderPassBeginInfo structure.

inline void endRenderPass()#

Finish the a renderpass (executes the StoreOp).

inline void nextSubpass(SubpassContents contents)#

Record next sub pass commands from a secondary-commandbuffer.

Parameters

contents – Specifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter of beginRenderPass.

Protected Static Functions

static inline CommandBuffer constructShared(const DeviceWeakPtr &device, CommandPool pool, VkCommandBuffer myHandle)#

Protected function used to create a pvrvk::CommandBuffer. Note that this function shouldn’t normally be called directly and will be called by a friend of CommandBuffer_ which will generally be a CommandPool.

Parameters
  • device – The device used to allocate the secondary command buffer.

  • pool – The pool from which the command buffer will be allocated.

  • myHandle – The vulkan handle for this command buffer.

Returns

Returns a successfully created pvrvk::CommandBuffer

Friends

friend class CommandPool_
class make_shared_enabler : public pvrvk::impl::CommandBufferBase_::make_shared_enabler#

A class which restricts the creation of a pvrvk::CommandBuffer to children or friends of a pvrvk::impl::CommandBuffer_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Protected Attributes

friend CommandBuffer_

Indicates that a pvrvk::impl::CommandBuffer_ is a friend.

CommandBuffer_::make_shared_enabler#

Nested Relationships#

This class is a nested type of CommandBuffer_.

Inheritance Relationships#

Base Type#

Class Documentation#

class make_shared_enabler : public pvrvk::impl::CommandBufferBase_::make_shared_enabler

A class which restricts the creation of a pvrvk::CommandBuffer to children or friends of a pvrvk::impl::CommandBuffer_.

Protected Functions

inline make_shared_enabler()

Constructor for a make_shared_enabler.

Protected Attributes

friend CommandBuffer_

Indicates that a pvrvk::impl::CommandBuffer_ is a friend.

CommandPool_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkCommandPool, ObjectType::e_COMMAND_POOL > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::DeviceObjectDebugUtils< CommandPool_ > (DeviceObjectDebugUtils)

  • public std::enable_shared_from_this< CommandPool_ >

Class Documentation#

class CommandPool_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkCommandPool, ObjectType::e_COMMAND_POOL>, public pvrvk::impl::DeviceObjectDebugUtils<CommandPool_>, public std::enable_shared_from_this<CommandPool_>#

Vulkan implementation of the Command Pool class. Destroying the commandpool will also destroys the commandbuffers allocated from this pool.

Public Functions

CommandBuffer allocateCommandBuffer()#

Allocate a primary commandBuffer.

Returns

Return a valid commandbuffer if allocation is successful, otherwise a null CommandBuffer

void allocateCommandBuffers(uint32_t numCommandbuffers, CommandBuffer *outCmdBuffers)#

Allocate primary commandbuffers.

Parameters
  • numCommandbuffers – Number of commandbuffers to allocate

  • outCmdBuffers – Allocated commandbuffers

SecondaryCommandBuffer allocateSecondaryCommandBuffer()#

Allocate a secondary commandBuffer.

Returns

Return a valid commandbuffer if allocation success, otherwise a null CommandBuffer

void allocateSecondaryCommandBuffers(uint32_t numCommandbuffers, SecondaryCommandBuffer *outCmdBuffers)#

Allocate secondary commandbuffers.

Parameters
  • numCommandbuffers – Number of commmandbuffers to allocate

  • outCmdBuffers – allocated commandbuffers

inline CommandPoolCreateFlags getFlags() const#

Get the command pool creation flags.

Returns

The set of command pool creation flags

inline uint32_t getQueueFamilyIndex() const#

Get the queue family index.

Returns

The queue family index, all command buffers allocated from this command pool must be submitted to queues from the same queue family

void reset(pvrvk::CommandPoolResetFlags flags)#

Resets the command pool and also optionally recycles all of the resoources of all of the command buffers allocated from the command pool.

Parameters

flags – VkCommandPoolResetFlags controls the reset operation

Returns

Return true if success

CommandPool_::make_shared_enabler#

Nested Relationships#

This class is a nested type of CommandPool_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class CommandPool_

ComputePipeline_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::Pipeline< ComputePipeline, ComputePipelineCreateInfo > (Pipeline)

Class Documentation#

class ComputePipeline_ : public pvrvk::impl::Pipeline<ComputePipeline, ComputePipelineCreateInfo>#

Vulkan Computepipeline wrapper.

ComputePipeline_::make_shared_enabler#

Nested Relationships#

This class is a nested type of ComputePipeline_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class ComputePipeline_

DebugReportCallback_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkDebugReportCallbackEXT, ObjectType::e_DEBUG_REPORT_CALLBACK_EXT > (PVRVkInstanceObjectBase)

Class Documentation#

class DebugReportCallback_ : public pvrvk::impl::PVRVkInstanceObjectBase<VkDebugReportCallbackEXT, ObjectType::e_DEBUG_REPORT_CALLBACK_EXT>#

Vulkan DebugReportCallback wrapper.

DebugReportCallback_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DebugReportCallback_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class DebugReportCallback_

DebugUtilsMessenger_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkDebugUtilsMessengerEXT, ObjectType::e_DEBUG_UTILS_MESSENGER_EXT > (PVRVkInstanceObjectBase)

Class Documentation#

class DebugUtilsMessenger_ : public pvrvk::impl::PVRVkInstanceObjectBase<VkDebugUtilsMessengerEXT, ObjectType::e_DEBUG_UTILS_MESSENGER_EXT>#

Vulkan DebugUtilsMessenger wrapper.

DebugUtilsMessenger_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DebugUtilsMessenger_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class DebugUtilsMessenger_

DescriptorPool_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorPool, ObjectType::e_DESCRIPTOR_POOL > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::DeviceObjectDebugUtils< DescriptorPool_ > (DeviceObjectDebugUtils)

  • public std::enable_shared_from_this< DescriptorPool_ >

Class Documentation#

class DescriptorPool_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkDescriptorPool, ObjectType::e_DESCRIPTOR_POOL>, public pvrvk::impl::DeviceObjectDebugUtils<DescriptorPool_>, public std::enable_shared_from_this<DescriptorPool_>#

A descriptor pool - an object used to allocate (and recycle) Descriptor Sets.

Public Functions

DescriptorSet allocateDescriptorSet(const DescriptorSetLayout &layout)#

Allocate descriptor set.

Parameters

layout – Descriptor set layout

Returns

Return DescriptorSet else null if fails.

inline const DescriptorPoolCreateInfo &getCreateInfo() const#

Return the descriptor pool create info from which this descriptor pool was allocated.

Returns

The descriptor pool create info

DescriptorPool_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DescriptorPool_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class DescriptorPool_

DescriptorSetLayout_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorSetLayout, ObjectType::e_DESCRIPTOR_SET_LAYOUT > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::DeviceObjectDebugUtils< DescriptorSetLayout_ > (DeviceObjectDebugUtils)

Class Documentation#

class DescriptorSetLayout_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkDescriptorSetLayout, ObjectType::e_DESCRIPTOR_SET_LAYOUT>, public pvrvk::impl::DeviceObjectDebugUtils<DescriptorSetLayout_>#

Constructor. . Vulkan implementation of a DescriptorSet.

Public Functions

inline const DescriptorSetLayoutCreateInfo &getCreateInfo() const#

Get the DescriptorSetCreateInfo object that was used to create this layout.

Returns

The DescriptorSetCreateInfo object that was used to create this layout.

inline void clearCreateInfo()#

Clear the descriptor set layout create param list.

DescriptorSetLayout_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DescriptorSetLayout_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class DescriptorSetLayout_

DescriptorSet_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class DescriptorSet_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkDescriptorSet, ObjectType::e_DESCRIPTOR_SET>, public pvrvk::impl::DeviceObjectDebugUtils<DescriptorSet_>#

Vulkan implementation of a DescriptorSet.

Public Functions

inline const DescriptorSetLayout &getDescriptorSetLayout() const#

Return the layout of this DescriptorSet.

Returns

This DescriptorSet’s DescriptorSetLayout

inline const DescriptorPool &getDescriptorPool() const#

Return the descriptor pool from which this descriptor set was allocated.

Returns

The descriptor pool

inline DescriptorPool &getDescriptorPool()#

Return the descriptor pool from which this descriptor set was allocated.

Returns

The descriptor pool

Friends

friend struct ::pvrvk::WriteDescriptorSet

DescriptorSet_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DescriptorSet_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class DescriptorSet_

DescriptorStore#

Class Documentation#

template<typename T, uint32_t ArraySize>
class DescriptorStore#

Internal class.

DeviceDebugUtilsImpl#

Class Documentation#

class DeviceDebugUtilsImpl#

Implementation for the Debug Marker wrapper for PVRVk objects. Handles the actual naming and tagging calls for the debug extensions “VK_EXT_debug_maker” or “VK_EXT_debug_utils” depending on thier support.

Public Functions

inline ~DeviceDebugUtilsImpl()#

Destructor.

void setObjectName(const Device_ &device, uint64_t vkHandle, ObjectType objectType, const std::string &objectName)#

Makes use of the extension VK_EXT_debug_marker or VK_EXT_debug_utils to provide a name for a specified object.

Parameters
  • device – The device from which the object being named was created

  • vkHandle – The Vulkan object handle of the object being named

  • objectType – The object type of the object being named

  • objectName – The name to use for the object

void setObjectTag(const Device_ &device, uint64_t vkHandle, ObjectType objectType, uint64_t tagName, size_t tagSize, const void *tag)#

Makes use of the extension VK_EXT_debug_marker or VK_EXT_debug_utils to provide a tag for a specified object.

Parameters
  • device – The device from which the object getting tagged was created

  • vkHandle – The Vulkan object handle of the object getting a tag was created.

  • objectType – The object type of the object being named

  • tagName – A numerical identifier of the tag for the object

  • tagSize – The number of bytes of data to attach to the object.

  • tag – An array of tagSize bytes containing the data to be associated with the object.

inline void resetObjectName(const Device_ &device, uint64_t vkHandle, ObjectType objectType)#

Resets the name of a specified object using the extension VK_EXT_debug_marker or VK_EXT_debug_utils.

Parameters
  • device – The device from which the object having its name reset was created

  • vkHandle – The Vulkan object handle of the object having its name reset.

  • objectType – The object type of the object being named

inline bool hasName() const#

Returns whether the specified object has already been provided with a name.

Returns

True if the object has a name, otherwise false.

inline const std::string &getName() const#

Returns the specified object’s name.

Returns

The object name

Friends

friend class DeviceObjectDebugUtils

DeviceMemory_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class DeviceMemory_ : public pvrvk::impl::IDeviceMemory_, public pvrvk::impl::DeviceObjectDebugUtils<DeviceMemory_>#

VkDeviceMemory wrapper.

Public Functions

inline virtual bool isMappable() const#

Return true if this memory block is mappable by the host (const).

Returns

bool

inline virtual pvrvk::MemoryPropertyFlags getMemoryFlags() const#

Return the memory flags(const)

Returns

pvrvk::MemoryPropertyFlags

inline virtual VkDeviceSize getMappedOffset() const#

Return this mapped memory offset (const)

Returns

VkDeviceSize

inline virtual void *getMappedData()#

Return a pointer to the mapped memory.

Returns

Mapped memory

inline virtual VkDeviceSize getMappedSize() const#

Return this mapped memory size (const)

Returns

VkDeviceSize

inline virtual VkDeviceSize getSize() const#

Return this memory size (const)

Returns

uint64_t

inline virtual bool isMapped() const#

Return true if this memory is being mapped by the host (const)

Returns

VkDeviceSize

inline virtual void *map(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE, pvrvk::MemoryMapFlags memoryMapFlags = pvrvk::MemoryMapFlags::e_NONE)#

map this memory. NOTE: Only memory created with HostVisible flag can be mapped and unmapped

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object.

  • size – Size of the memory range to map, or VK_WHOLE_SIZE to map from offset to the end of the allocation

  • memoryMapFlags – A pvrvk::MemoryMapFlags flag defining the how memory mapping should occur.

inline virtual void unmap()#

Unmap this memory block.

inline virtual void flushRange(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE)#

Flush ranges of non-coherent memory from the host caches:

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object

  • size – Either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation.

inline virtual void invalidateRange(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE)#

To invalidate ranges of non-coherent memory from the host caches.

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object.

  • size – Either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation.

Returns

VkResult

inline virtual uint32_t getMemoryType() const#
Returns

.

Protected Static Functions

static inline DeviceMemory constructShared(const DeviceWeakPtr &device, const MemoryAllocationInfo &allocationInfo, pvrvk::MemoryPropertyFlags memPropFlags, VkDeviceMemory vkMemoryHandle = VK_NULL_HANDLE, MemoryAllocateFlags memoryAllocateFlags = pvrvk::MemoryAllocateFlags::e_NONE)#

Protected function used to create a pvrvk::DeviceMemory. Note that this function shouldn’t normally be called directly and will be called by a friend of DeviceMemory_ which will generally be a Device.

Parameters
  • device – The device used to allocate the DeviceMemory from.

  • allocationInfo – The allocation information structure.

  • memPropFlags – A set of memory property flags which will define the way in which the allocated memory may be used.

  • vkMemoryHandle – The vulkan handle for this DeviceMemory.

Returns

Returns a successfully created pvrvk::DeviceMemory

Friends

friend class Device_
class make_shared_enabler#

A class which restricts the creation of a pvrvk::DeviceMemory to children or friends of a pvrvk::impl::DeviceMemory_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Friends

friend class DeviceMemory_

DeviceMemory_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DeviceMemory_.

Class Documentation#

class make_shared_enabler

A class which restricts the creation of a pvrvk::DeviceMemory to children or friends of a pvrvk::impl::DeviceMemory_.

Protected Functions

inline make_shared_enabler()

Constructor for a make_shared_enabler.

Friends

friend class DeviceMemory_

DeviceObjectDebugUtils#

Inheritance Relationships#

Derived Types#

  • public pvrvk::impl::Pipeline< ComputePipeline, ComputePipelineCreateInfo > (Pipeline)

  • public pvrvk::impl::Pipeline< GraphicsPipeline, GraphicsPipelineCreateInfo > (Pipeline)

  • public pvrvk::impl::Pipeline< RaytracingPipeline, RaytracingPipelineCreateInfo > (Pipeline)

Class Documentation#

template<class PVRVkDeviceObject>
class DeviceObjectDebugUtils#

A Debug Marker wrapper for PVRVk Device allocated objects. Handles naming and tagging calls for the extension “VK_EXT_debug_maker”.

Subclassed by pvrvk::impl::Pipeline< ComputePipeline, ComputePipelineCreateInfo >, pvrvk::impl::Pipeline< GraphicsPipeline, GraphicsPipelineCreateInfo >, pvrvk::impl::Pipeline< RaytracingPipeline, RaytracingPipelineCreateInfo >

Public Functions

inline explicit DeviceObjectDebugUtils()#

Constructor for a DeviceObjectDebugUtils.

inline void setObjectName(const std::string &objectName)#

Makes use of the extension VK_EXT_debug_marker or VK_EXT_debug_utils to provide a name for a specified object.

Parameters

objectName – The name to use for the object

inline const std::string &getObjectName() const#

Gets the Debug Marker name.

Returns

The object name

inline void resetObjectName()#

Resets the name of a specified object using the extension VK_EXT_debug_marker or VK_EXT_debug_utils.

inline void setObjectTag(uint64_t tagName, size_t tagSize, const void *tag)#

Makes use of the extension VK_EXT_debug_marker or VK_EXT_debug_utils to provide a tag for a specified object.

Parameters
  • tagName – A numerical identifier of the tag for the object

  • tagSize – The number of bytes of data to attach to the object.

  • tag – An array of tagSize bytes containing the data to be associated with the object.

Device_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDevice, ObjectType::e_DEVICE > (PVRVkPhysicalDeviceObjectBase)

  • public std::enable_shared_from_this< Device_ >

Class Documentation#

class Device_ : public pvrvk::impl::PVRVkPhysicalDeviceObjectBase<VkDevice, ObjectType::e_DEVICE>, public std::enable_shared_from_this<Device_>#

GpuDevice implementation that supports Vulkan.

Public Functions

void retrieveQueues()#

Retrieve and initialise the list of queues.

void waitIdle()#

Wait on the host for the completion of outstanding queue operations for all queues on this device This is equivalent to calling waitIdle for all queues owned by this device.

ComputePipeline createComputePipeline(const ComputePipelineCreateInfo &createInfo, const PipelineCache &pipelineCache = PipelineCache())#

createComputePipeline

.

Parameters
  • createInfo – create info

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

Returns

Return a valid compute pipeline on success

Returns

Return a valid pipeline on success

void createComputePipelines(const ComputePipelineCreateInfo *createInfo, uint32_t numCreateInfos, const PipelineCache &pipelineCache, ComputePipeline *outPipelines)#

create array of compute pipelines

Parameters
  • createInfo – Compute pipeline create Infos

  • numCreateInfos – Number of compute pipleine to create

  • outPipelines – Out pipelines

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

RaytracingPipeline createRaytracingPipeline(const RaytracingPipelineCreateInfo &createInfo, const PipelineCache &pipelineCache = PipelineCache())#

createRaytracingPipeline

.

Parameters
  • createInfo – create info

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

Returns

Return a valid ray tracing pipeline on success

Returns

Return a valid pipeline on success

void createRaytracingPipelines(const RaytracingPipelineCreateInfo *createInfo, uint32_t numCreateInfos, const PipelineCache &pipelineCache, RaytracingPipeline *outPipelines)#

create array of ray tracing pipelines

Parameters
  • createInfo – Raytracing pipeline create Infos

  • numCreateInfos – Number of ray tracing pipeline to create

  • outPipelines – Out pipelines

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

GraphicsPipeline createGraphicsPipeline(const GraphicsPipelineCreateInfo &createInfo, const PipelineCache &pipelineCache = PipelineCache())#

create graphicsPipeline

.

Parameters
  • createInfoPipeline create info

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

Returns

Return a valid pipeline on success

void createGraphicsPipelines(const GraphicsPipelineCreateInfo *createInfos, uint32_t numCreateInfos, const PipelineCache &pipelineCache, GraphicsPipeline *outPipelines)#

create array of graphics pipelines

Parameters
  • createInfosPipeline create infos

  • numCreateInfos – Number of pipeline to create

  • outPipelines – Out pipeline

  • pipelineCache – Either null handle, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

Sampler createSampler(const SamplerCreateInfo &createInfo)#

Create sampler object.

.

Parameters

createInfo – Sampler Create info

Returns

Return a valid sampler object on success

Image createImage(const ImageCreateInfo &createInfo)#

create an image using this device.

Parameters

createInfo – The image creation descriptor

Returns

The created Image object on success

ImageView createImageView(const ImageViewCreateInfo &createInfo)#

Create image view object.

Parameters

createInfo – The image view creation descriptor

Returns

The created ImageView object on success

BufferView createBufferView(const BufferViewCreateInfo &createInfo)#

Create buffer view.

Parameters

createInfo – The buffer view creation descriptor

Returns

The created BufferView object on success

Buffer createBuffer(const BufferCreateInfo &createInfo)#

Create a new buffer object and (optionally) allocate and bind memory for it.

.

Parameters

createInfo – The buffer creation descriptor

Returns

Return a valid object if success

AccelerationStructure createAccelerationStructure(const AccelerationStructureCreateInfo &createInfo, pvrvk::Buffer asBuffer)#

Create a new acceleration structure object.

.

Parameters
  • createInfo – The acceleration structure creation descriptor

  • asBuffer – The acceleration structure buffer needed to build the acceleration structure

Returns

Return a valid object if success

DeviceMemory allocateMemory(const MemoryAllocationInfo &allocationInfo, const pvrvk::MemoryAllocateFlags memoryAllocateFlags = pvrvk::MemoryAllocateFlags::e_NONE)#

Create device memory block.

.

Parameters

allocationInfo – memory allocation info

Returns

Return a valid object if success

ShaderModule createShaderModule(const ShaderModuleCreateInfo &createInfo)#

Create Shader Object.

Parameters

createInfo – Shader module createInfo

Returns

Return a valid shader if success

Framebuffer createFramebuffer(const FramebufferCreateInfo &createInfo)#

createFramebuffer Create Framebuffer object

.

Parameters

createInfo – Framebuffer createInfo

Returns

return a valid object if success

RenderPass createRenderPass(const RenderPassCreateInfo &createInfo)#

create renderpass

.

Parameters

createInfo – RenderPass createInfo

Returns

return a valid object if success

DescriptorPool createDescriptorPool(const DescriptorPoolCreateInfo &createInfo)#

Create DescriptorPool.

.

Parameters

createInfo – DescriptorPool createInfo

Returns

return a valid object if success

DescriptorSetLayout createDescriptorSetLayout(const DescriptorSetLayoutCreateInfo &createInfo)#

create Descriptor set layout

.

Parameters

createInfo – Descriptor layout createInfo

Returns

Return a valid object if success

PipelineCache createPipelineCache(const PipelineCacheCreateInfo &createInfo = PipelineCacheCreateInfo())#

Create PipelineCache object.

Parameters

createInfoPipeline cache creation info descriptor.

Returns

Return a valid Pipeline cache object.

void mergePipelineCache(const PipelineCache *srcPipeCaches, uint32_t numSrcPipeCaches, PipelineCache destPipeCache)#

Merge PipelineCache objects.

.

Parameters
  • srcPipeCachesPipeline caches, which will be merged into destPipeCache

  • numSrcPipeCaches – Number of source pipeline caches to be merged

  • destPipeCachePipeline cache to merge results into. The previous contents of destPipeCache are included after the merge

Returns

Return result

PipelineLayout createPipelineLayout(const PipelineLayoutCreateInfo &createInfo)#

Create pipeline layout.

.

Parameters

createInfoPipeline layout create info

Returns

Return a valid object if success

bool waitForFences(uint32_t numFences, const Fence *fences, const bool waitAll, const uint64_t timeout)#

Wait this device for an array of fences.

.

Parameters
  • numFences – Number of fence to wait

  • fences – Fences to wait for

  • waitAll – Wait for all fence if flags set to true

  • timeout – Wait timeout

Returns

Return true if fence waits successfull, false if timed out.

void resetFences(uint32_t numFences, const Fence *fences)#

Reset an array of fences.

Parameters
  • numFences – Number of fence to reset

  • fences – Fence to reset

CommandPool createCommandPool(const CommandPoolCreateInfo &createInfo)#

Create commandpool.

.

Parameters

createInfo – Command Pool creation info structure

Returns

Return a valid object if success

Fence createFence(const FenceCreateInfo &createInfo = FenceCreateInfo())#

Create Fence.

.

Parameters

createInfo – Fence create info

Returns

Return a valid object if success

Event createEvent(const EventCreateInfo &createInfo = EventCreateInfo())#

Create Event.

.

Parameters

createInfo – Event create info

Returns

Return a valid object if success

Semaphore createSemaphore(const SemaphoreCreateInfo &createInfo = SemaphoreCreateInfo())#

Create semaphore.

.

Parameters

createInfo – Semaphore create info

Returns

Return a valid object if success

TimelineSemaphore createTimelineSemaphore(SemaphoreCreateInfo &createInfo)#

Create timeline semaphore.

.

Parameters

createInfo – Semaphore create info

Returns

Return a valid object if success

QueryPool createQueryPool(const QueryPoolCreateInfo &createInfo)#

Create QueryPool.

.

Parameters

createInfo – QueryPool create info

Returns

return a valid object if success

Swapchain createSwapchain(const SwapchainCreateInfo &createInfo, const Surface &surface)#

Create Swapchain.

.

Parameters
  • createInfo – Swapchain createInfo

  • surface – Swapchain’s surface

Returns

Return a valid object if success

inline Queue getQueue(uint32_t queueFamily, uint32_t queueId)#

Get Queue.

Parameters
  • queueFamily – Queue Family id

  • queueId – Queue Id

Returns

Return the queue

inline const VulkanExtensionList &getEnabledExtensionList()#

Get a list of enabled extensions which includes names and spec versions.

Returns

VulkanExtensionList&

inline const DeviceExtensionTable &getEnabledExtensionTable() const#

Return a table which contains boolean members set to true/false corresponding to whether specific extensions have been enabled.

Returns

A table of extensions

void updateDescriptorSets(const WriteDescriptorSet *writeDescSets, uint32_t numWriteDescSets, const CopyDescriptorSet *copyDescSets, uint32_t numCopyDescSets)#

Update Descriptorsets.

Parameters
  • writeDescSets – Write descriptor sets

  • numWriteDescSets – Number of write Descriptor sets

  • copyDescSets – Copy operation happens after the Write operation.

  • numCopyDescSets – Number of copy descriptor sets

inline const VkDeviceBindings &getVkBindings() const#

Gets the device dispatch table.

Returns

The device dispatch table

inline const PhysicalDeviceTransformFeedbackProperties &getTransformFeedbackProperties() const#

Gets the Transform feedback properties.

Returns

The physical device transform feedback properties

inline PhysicalDeviceTransformFeedbackProperties getTransformFeedbackProperties()#

Gets the Transform feedback properties.

Returns

The physical device transform feedback properties

inline const PhysicalDeviceTransformFeedbackFeatures &getTransformFeedbackFeatures() const#

Gets the Transform feedback features.

Returns

The physical device transform feedback features

inline PhysicalDeviceTransformFeedbackFeatures getTransformFeedbackFeatures()#

Gets the Transform feedback features.

Returns

The physical device transform feedback features

Device_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Device_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Device_

DisplayMode_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class DisplayMode_ : public pvrvk::impl::PVRVkPhysicalDeviceObjectBase<VkDisplayModeKHR, ObjectType::e_DISPLAY_MODE_KHR>#

Each display has one or more supported modes associated with it by default. These are called the display modes.

Public Functions

inline DisplayModeParametersKHR getParameters() const#

Returns the display mode parameters.

Returns

A DisplayModeParametersKHR structure specifying the display mode parameters for the display mode

DisplayMode_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DisplayMode_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class DisplayMode_

DisplayPlaneSurface_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::Surface_ (Surface_)

Class Documentation#

class DisplayPlaneSurface_ : public pvrvk::impl::Surface_#

A DisplayPlane Surface.

Public Functions

inline const DisplayModeWeakPtr &getDisplayMode() const#

Get Display Mode Properties.

Returns

DisplayModePropertiesKHR&

inline const DisplaySurfaceCreateFlagsKHR &getFlags() const#

Get DisplaySurfaceCreateFlagsKHR flags.

Returns

DisplaySurfaceCreateFlagsKHR&

inline uint32_t getPlaneIndex() const#

Get display plane index.

Returns

Plane index

inline uint32_t getPlaneStackIndex() const#

Get display plane stack index.

Returns

Plane stack index

inline const SurfaceTransformFlagsKHR &getTransformFlags() const#

Get SurfaceTransformFlagsKHR flags.

Returns

SurfaceTransformFlagsKHR&

inline float getGlobalAlpha() const#

Get display plane global alpha.

Returns

Plane global alpha

inline const DisplayPlaneAlphaFlagsKHR &getAlphaFlags() const#

Get DisplayPlaneAlphaFlagsKHR flags.

Returns

DisplayPlaneAlphaFlagsKHR&

inline const Extent2D &getImageExtent() const#

Get Extent2D.

Returns

Extent2D&

DisplayPlaneSurface_::make_shared_enabler#

Nested Relationships#

This class is a nested type of DisplayPlaneSurface_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Protected Attributes

friend DisplayPlaneSurface_

Display_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class Display_ : public pvrvk::impl::PVRVkPhysicalDeviceObjectBase<VkDisplayKHR, ObjectType::e_DISPLAY_KHR>#

A display device can in some environments be used directly for Vulkan rendering without using intermediate windowing systems.

Public Functions

inline size_t getNumDisplayModes() const#

Get the number of supported display modes.

Returns

Returns the number of supported display modes

inline DisplayMode &getDisplayMode(uint32_t displayModeIndex)#

Get the supported display mode at displayModeIndex.

Parameters

displayModeIndex – The index of the display mode to retrieve

Returns

Returns one of supported display modes

inline const DisplayMode &getDisplayMode(uint32_t displayModeIndex) const#

Get the supported display mode at displayModeIndex (const)

Parameters

displayModeIndex – The index of the display mode to retrieve

Returns

Returns one of supported display modes (const)

inline const char *getDisplayName() const#

Gets the name of the display.

Returns

The name of the display

inline const Extent2D &getPhysicalDimensions() const#

Gets the physical dimensions of the display.

Returns

The physical dimensions of the display

inline const Extent2D &getPhysicalResolution() const#

Gets the physical resolutions of the display.

Returns

The physical resolutions of the display

inline SurfaceTransformFlagsKHR getSupportedTransforms() const#

Gets the set of supported surface transform flags for the display.

Returns

A SurfaceTransformFlagsKHR structure specifying the supported surface transform flags.

inline bool getPlaneReorderPossible() const#

Indicates whether the planes on this display can have their z order changed.

Returns

If True then the application can re-arrange the planes on this display in any order relative to each other.

inline bool getPersistentContent() const#

Indicates whether the display supports self-refresh/internal buffering.

Returns

True if the application can submit persistent present operations on swapchains created against this display

Display_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Display_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Display_

Event_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Event_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkEvent, ObjectType::e_EVENT>, public pvrvk::impl::DeviceObjectDebugUtils<Event_>#

Vulkan implementation of the Event class. Event can be used by the host to do fine-grained synchronization of commands, and it can be signalled either from the host (calling set()) or the device (submitting a setEvent() command).

Public Functions

void set()#

Set this event.

void reset()#

Reset this event.

bool isSet()#

Return true if this event is set.

Returns

Return true if this event is set

inline EventCreateFlags getFlags() const#

Get the event creation flags.

Returns

The set of event creation flags

inline EventCreateInfo getCreateInfo() const#

Get this event’s create flags.

Returns

EventCreateInfo

Event_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Event_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Event_

Fence_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Fence_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkFence, ObjectType::e_FENCE>, public pvrvk::impl::DeviceObjectDebugUtils<Fence_>#

Vulkan implementation of the Fence class Fence can be used by the host to determine completion of execution of subimmisions to queues. The host can be polled for the fence signal

Public Functions

bool wait(uint64_t timeoutNanos = static_cast<uint64_t>(-1))#

Host to wait for this fence to be signaled.

Parameters

timeoutNanos – Time out period in nanoseconds

Returns

True if successfully waited, false if timed out

bool isSignalled()#

Return true if this fence is signaled.

Returns

True if the fence is signalled, otherwise false

void reset()#

Reset this fence.

inline FenceCreateFlags getFlags() const#

Get the fence creation flags.

Returns

The set of fence creation flags

inline FenceCreateInfo getCreateInfo() const#

Get this fence’s create flags.

Returns

FenceCreateInfo

Fence_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Fence_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Fence_

Framebuffer_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Framebuffer_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkFramebuffer, ObjectType::e_FRAMEBUFFER>, public pvrvk::impl::DeviceObjectDebugUtils<Framebuffer_>#

Vulkan implementation of the Framebuffer (Framebuffer object) class.

Public Functions

inline const RenderPass &getRenderPass() const#

Return the renderpass that this framebuffer uses.

Returns

The renderpass that this Framebuffer uses.

inline const FramebufferCreateInfo &getCreateInfo() const#

Return this object create param(const)

Returns

const FramebufferCreateInfo&

inline Extent2D getDimensions() const#

Get the Dimension of this framebuffer(const)

Returns

Framebuffer Dimension

inline const ImageView &getAttachment(uint32_t index) const#

Get the color attachment at a specific index.

Parameters

index – A color attachment index.

Returns

The Texture that is bound as a color attachment at index.

inline ImageView &getAttachment(uint32_t index)#

Get the color attachment at a specific index.

Parameters

index – A color attachment index.

Returns

The Texture that is bound as a color attachment at index.

inline uint32_t getNumAttachments() const#

getNumAttachments

Returns

Get number of attachments

Framebuffer_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Framebuffer_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Framebuffer_

GraphicsPipeline_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::Pipeline< GraphicsPipeline, GraphicsPipelineCreateInfo > (Pipeline)

Class Documentation#

class GraphicsPipeline_ : public pvrvk::impl::Pipeline<GraphicsPipeline, GraphicsPipelineCreateInfo>#

A Graphics Pipeline is a PVRVk adapter to a Vulkan Pipeline to a pipeline created for VK_PIPELINE_BINDING_POINT_COMPUTE, and as such only supports the part of Vulkan that is supported for Graphics pipelines.

GraphicsPipeline_::make_shared_enabler#

Nested Relationships#

This class is a nested type of GraphicsPipeline_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class GraphicsPipeline_

ImageView_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class ImageView_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkImageView, ObjectType::e_IMAGE_VIEW>, public pvrvk::impl::DeviceObjectDebugUtils<ImageView_>#

pvrvk::ImageView implementation of a Vulkan VkImageView

Public Functions

inline ImageViewCreateFlags getFlags() const#

Get Image view creation Flags.

Returns

Image view creation flags (ImageViewCreateFlags)

inline Image &getImage()#

Get Image.

Returns

The Image used in the image view

inline const Image &getImage() const#

Get Image.

Returns

The Image used in the image view

inline ImageViewType getViewType() const#

Get Image view creation type.

Returns

Image view creation image view type (ImageViewType)

inline Format getFormat() const#

Get Image view format.

Returns

Image view format (Format)

inline const ComponentMapping &getComponents() const#

Get Image view components.

Returns

The Image view components used for remapping color components

inline const ImageSubresourceRange &getSubresourceRange() const#

Get Image view sub resource range.

Returns

The Image view sub resource range used for selecting mipmap levels and array layers to be accessible to the view

inline ImageViewCreateInfo getCreateInfo() const#

Get this images view’s create flags.

Returns

BufferViewCreateInfo

ImageView_::make_shared_enabler#

Nested Relationships#

This class is a nested type of ImageView_.

Class Documentation#

class make_shared_enabler#

A class which restricts the creation of a pvrvk::ImageView to children or friends of a pvrvk::impl::ImageView_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Friends

friend class ImageView_

Image_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Derived Type#

Class Documentation#

class Image_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkImage, ObjectType::e_IMAGE>, public pvrvk::impl::DeviceObjectDebugUtils<Image_>#

ImageVk implementation that wraps the Vulkan Texture object.

Subclassed by pvrvk::impl::SwapchainImage_

Public Functions

pvrvk::SubresourceLayout getSubresourceLayout(const pvrvk::ImageSubresource &subresource) const#

Query and return a SubresourceLayout object describing the layout of the image.

Parameters

subresource – A subresource used to retrieve a subresource layout

Returns

The SubresourceLayout of the image

inline pvrvk::ImageCreateInfo getCreateInfo() const#

Return a reference to the creation descriptor of the image.

Returns

The reference to the ImageCreateInfo

inline ImageCreateFlags getFlags() const#

Get Image creation Flags.

Returns

Image creation flags (ImageCreateFlags)

inline ImageType getImageType() const#

Get Image creation type.

Returns

Image creation type (ImageType)

inline Extent3D getExtent() const#

Get Extent.

Returns

Extent

inline uint32_t getNumMipLevels() const#

Get the number of Image mip map levels.

Returns

Image mip map levels

inline uint32_t getNumArrayLayers() const#

Get the number of Image array layers.

Returns

Image array layers

inline SampleCountFlags getNumSamples() const#

Get the number of samples taken for the Image.

Returns

Image number of samples (SampleCountFlags)

inline Format getFormat() const#

Get Image format.

Returns

Image format (Format)

inline SharingMode getSharingMode() const#

Get Image sharing mode.

Returns

Image sharing mode (SharingMode)

inline ImageUsageFlags getUsageFlags() const#

Get Image usage flags.

Returns

Image usage flags (ImageUsageFlags)

inline ImageLayout getInitialLayout() const#

Get Image initial layout.

Returns

Image initial layout (ImageLayout)

inline ImageTiling getTiling() const#

Get Image tiling mode.

Returns

Image initial tiling mode (ImageTiling)

inline uint32_t getNumQueueFamilyIndices() const#

Get the number of queue family inidices for the image.

Returns

The number of Image queue families

inline const uint32_t *const getQueueFamilyIndices() const#

Get a pointer to a list of queue family inidices for the image.

Returns

A pointer to the list of Image queue families

inline bool isCubeMap() const#

Check if this texture is a cubemap.

Returns

true if the texture is a cubemap, otherwise false

inline bool isAllocated() const#

Check if this texture is allocated.

Returns

true if the texture is allocated. Otherwise, the texture is empty and must be constructed.

inline uint16_t getWidth() const#

Get the width of this texture (number of columns of texels in the lowest mipmap)

Returns

Texture width

inline uint16_t getHeight() const#

Get the height of this texture (number of rows of texels in the lowest mipmap)

Returns

Texture height

inline uint16_t getDepth() const#

Get the depth of this texture (number of (non-array) layers of texels in the lowest mipmap)

Returns

Texture depth

inline const DeviceMemory &getDeviceMemory() const#

If a memory object has been bound to the object, return it. Otherwise, return empty device memory.

Returns

If a memory object has been bound to the object, the memory object. Otherwise, empty device memory.

inline DeviceMemory &getDeviceMemory()#

If a memory object has been bound to the object, return it. Otherwise, return empty device memory.

Returns

If a memory object has been bound to the object, the memory object. Otherwise, empty device memory.

inline void bindMemoryNonSparse(DeviceMemory memory, VkDeviceSize offset = 0)#

Bind memory to this non sparse image.

Parameters
  • memory – The memory to attach to the given image object

  • offset – The offset into the given memory to attach to the given image object

inline const pvrvk::MemoryRequirements &getMemoryRequirement() const#

Get the memory requirements of the image.

Returns

The memory requirements of the image (MemoryRequirements)

Protected Attributes

pvrvk::MemoryRequirements _memReqs#

Image specific memory requirements.

DeviceMemory _memory#

Device memory bound to this image (Only for non sparse image).

pvrvk::ImageCreateInfo _createInfo#

Creation information used when creating the image.

Protected Static Functions

static inline Image constructShared(const DeviceWeakPtr &device, const ImageCreateInfo &createInfo)#

Protected function used to construct a pvrvk::Image. Note that this function shouldn’t normally be called directly and will be called by a friend of Image_ which will generally be a Device.

Parameters
  • device – The Device from which the image will be creted

  • createInfo – The ImageCreateInfo descriptor specifying creation parameters

Returns

Returns a successfully created pvrvk::Image

static inline Image constructShared(const DeviceWeakPtr &device)#

Protected function used to construct a pvrvk::Image. Note that this function shouldn’t normally be called directly and will be called by a friend of Image_ which will generally be a Device.

Parameters

device – The Device from which the image will be creted

Returns

Returns a successfully created pvrvk::Image

Friends

friend class Device_
class make_shared_enabler#

A class which restricts the creation of a pvrvk::Image to children or friends of a pvrvk::impl::Image_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Friends

friend class Image_

Image_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Image_.

Class Documentation#

class make_shared_enabler

A class which restricts the creation of a pvrvk::Image to children or friends of a pvrvk::impl::Image_.

Protected Functions

inline make_shared_enabler()

Constructor for a make_shared_enabler.

Friends

friend class Image_

Instance_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkObjectBase< VkInstance, ObjectType::e_INSTANCE > (PVRVkObjectBase)

  • public std::enable_shared_from_this< Instance_ >

Class Documentation#

class Instance_ : public pvrvk::impl::PVRVkObjectBase<VkInstance, ObjectType::e_INSTANCE>, public std::enable_shared_from_this<Instance_>#

The Instance is a system-wide vulkan “implementation”, similar in concept to the “installation” of Vulkan libraries on a system. Contrast with the “Physical Device” which for example represents a particular driver implementing Vulkan for a specific Device. Conceptually, the Instance “Forwards” to the “Physical Device / Device”.

Public Functions

void retrievePhysicalDevices()#

Retrieve and initialise the list of physical devices.

inline const InstanceCreateInfo &getCreateInfo() const#

Get instance create info(const)

Returns

const InstanceCreateInfo&

inline DisplayPlaneSurface createDisplayPlaneSurface(const DisplayMode &displayMode, Extent2D imageExtent, const DisplaySurfaceCreateFlagsKHR flags = DisplaySurfaceCreateFlagsKHR::e_NONE, uint32_t planeIndex = 0, uint32_t planeStackIndex = 0, SurfaceTransformFlagsKHR transformFlags = SurfaceTransformFlagsKHR::e_IDENTITY_BIT_KHR, float globalAlpha = 0.0f, DisplayPlaneAlphaFlagsKHR alphaFlags = DisplayPlaneAlphaFlagsKHR::e_PER_PIXEL_BIT_KHR)#

Create a DisplayPlane surface.

Parameters
  • displayMode – A display mode to use for creating the DisplayPlane Surface

  • imageExtent – The image extent to use for creating the DisplayPlane Surface

  • flags – A set of DisplaySurfaceCreateFlagsKHR flags to use when creating the DisplayPlane surface

  • planeIndex – A plane index

  • planeStackIndex – A plane stack index

  • transformFlags – A set of SurfaceTransformFlagsKHR flags to use when creating the DisplayPlane surface

  • globalAlpha – A global alpha value

  • alphaFlags – A set of DisplayPlaneAlphaFlagsKHR flags to use when creating the DisplayPlane surface

Returns

Valid DisplayPlane object if success.

inline const VulkanExtensionList &getEnabledExtensionsList()#

Get a list of enabled extensions which includes names and spec versions.

Returns

VulkanExtensionList&

inline const VulkanLayerList &getEnabledLayersList()#

Get a list of enabled layers which includes names and spec versions.

Returns

VulkanLayerList&

inline const InstanceExtensionTable &getEnabledExtensionTable() const#

Return a table which contains boolean members set to true/false corresponding to whether specific extensions have been enabled.

Returns

A table of extensions

inline DebugUtilsMessenger createDebugUtilsMessenger(const DebugUtilsMessengerCreateInfo &createInfo)#

Creates a debug utils messenger object.

Parameters

createInfoDebugUtilsMessengerCreateInfo structure specifying how the debug utils messenger should function.

Returns

Returns the created debug utils messenger object.

inline DebugReportCallback createDebugReportCallback(const DebugReportCallbackCreateInfo &createInfo)#

Creates a debug report callback object.

Parameters

createInfoDebugReportCallbackCreateInfo structure specifying how the debug report callback function should work.

Returns

Returns the created debug report callback object.

inline void debugReportMessage(DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string &layerPrefix, const std::string &message)#

Submits a debug report message directly into the debug stream.

Parameters
  • flags – Specifies the DebugReportFlagsEXT classification of this message.

  • objectType – Specifies the type of object being used or created at the time the event was triggered.

  • object – The object where the issue was detected. object can be VK_NULL_HANDLE if there is no object associated with the event.

  • location – An application defined value.

  • messageCode – An application defined value.

  • layerPrefix – The abbreviation of the component making this event/message.

  • message – The message itself detailing the trigger conditions.

inline void debugReportMessage(DebugReportFlagsEXT flags, PVRVkObjectBase object, size_t location, int32_t messageCode, const std::string &layerPrefix, const std::string &message)#

Submits a debug report message directly into the debug stream.

Parameters
  • flags – Specifies the DebugReportFlagsEXT classification of this message.

  • object – A PVRVkObjectBase object where the issue was detected.

  • location – An application defined value.

  • messageCode – An application defined value.

  • layerPrefix – The abbreviation of the component making this event/message.

  • message – The message itself detailing the trigger conditions.

inline void submitDebugUtilsMessage(DebugUtilsMessageSeverityFlagsEXT inMessageSeverity, DebugUtilsMessageTypeFlagsEXT inMessageTypes, const DebugUtilsMessengerCallbackData &inCallbackData)#

Submits a debug utils message directly into the debug stream.

Parameters
  • inMessageSeverity – the DebugUtilsMessageSeverityFlagBitsEXT severity of this event/message.

  • inMessageTypes – A bitmask of DebugUtilsMessageTypeFlagBitsEXT specifying which type of event(s) to identify with this message.

  • inCallbackData – Contains all the callback related data in the DebugUtilsMessengerCallbackDataEXT structure.

inline const VkInstanceBindings &getVkBindings() const#

Gets the instance dispatch table.

Returns

The instance dispatch table

const std::vector<PhysicalDevice> &getPhysicalDevices() const#

Get the list of physical devices (const)

Returns

const PhysicalDevice&

const PhysicalDevice &getPhysicalDevice(uint32_t id) const#

Get physical device (const)

Parameters

id – Physcialdevice id

Returns

const PhysicalDevice&

PhysicalDevice &getPhysicalDevice(uint32_t id)#

Get physical device (const)

Parameters

id – Physcialdevice id

Returns

const PhysicalDevice&

inline uint32_t getNumPhysicalDevices() const#

Get number of physcial device available.

Returns

uint32_t

Instance_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Instance_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Instance_

IDeviceMemory_#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDeviceMemory, ObjectType::e_DEVICE_MEMORY > (PVRVkDeviceObjectBase)

Derived Type#

Class Documentation#

class IDeviceMemory_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkDeviceMemory, ObjectType::e_DEVICE_MEMORY>#

VkDeviceMemory wrapper.

Subclassed by pvrvk::impl::DeviceMemory_

Public Functions

inline IDeviceMemory_()#

Constructor.

inline explicit IDeviceMemory_(DeviceWeakPtr device)#

Constructor.

Parameters

device – The device to use for allocating the device memory

inline IDeviceMemory_(const DeviceWeakPtr &device, VkDeviceMemory memory)#

Constructor.

Parameters
  • device – The device to use for allocating the device memory

  • memory – The vulkan device memory object

inline virtual ~IDeviceMemory_()#
virtual bool isMappable() const = 0#

Return true if this memory block is mappable by the host (const).

Returns

True is this memory block can be mapped, otherwise false.

virtual uint32_t getMemoryType() const = 0#
Returns

.

virtual pvrvk::MemoryPropertyFlags getMemoryFlags() const = 0#

Return the memory flags(const)

Returns

The flags of the memory

inline bool hasPropertyFlag(pvrvk::MemoryPropertyFlags flags) const#

Indicates whether the device memory’s property flags includes the given flag.

Parameters

flags – A device memory property flag

Returns

True if the device memory’s property flags includes the given flag

virtual VkDeviceSize getMappedOffset() const = 0#

Return this mapped memory offset (const)

Returns

The offset of the mapped range, if any.

virtual void *getMappedData() = 0#

Return a pointer to the mapped memory.

Returns

Mapped memory

virtual VkDeviceSize getMappedSize() const = 0#

Return this mapped memory size.

Returns

The size of the mapped range, if any.

virtual VkDeviceSize getSize() const = 0#

Return this memory size.

Returns

The memory size

virtual bool isMapped() const = 0#

Return true if this memory is being mapped by the host.

Returns

True if memory is already mapped, otherwise false.

virtual void *map(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE, pvrvk::MemoryMapFlags memoryMapFlags = pvrvk::MemoryMapFlags::e_NONE) = 0#

map this memory. NOTE: Only memory created with HostVisible flag can be mapped and unmapped

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object.

  • size – Size of the memory range to map, or VK_WHOLE_SIZE to map from offset to the end of the allocation.

  • memoryMapFlags – A pvrvk::MemoryMapFlags flag defining the how memory mapping should occur.

virtual void unmap() = 0#

Unmap this memory block.

virtual void flushRange(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE) = 0#

Flush ranges of non-coherent memory from the host caches:

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object

  • size – Either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation.

virtual void invalidateRange(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE) = 0#

To invalidate ranges of non-coherent memory from the host caches.

Parameters
  • offset – Zero-based byte offset from the beginning of the memory object.

  • size – Either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation.

PhysicalDevice_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkPhysicalDevice, ObjectType::e_PHYSICAL_DEVICE > (PVRVkInstanceObjectBase)

  • public std::enable_shared_from_this< PhysicalDevice_ >

Class Documentation#

class PhysicalDevice_ : public pvrvk::impl::PVRVkInstanceObjectBase<VkPhysicalDevice, ObjectType::e_PHYSICAL_DEVICE>, public std::enable_shared_from_this<PhysicalDevice_>#

The representation of an entire actual, physical GPU device (as opposed to Device, which is a local, logical part of it). A Physical device is “determined”, or “found”, or “enumerated”, (while a logical device is “created”). You can use the physical device to create logical Devices, determine Extensions etc. See Vulkan spec.

Public Functions

inline const PhysicalDeviceProperties &getProperties() const#

Get device properties.

Returns

Returns PhysicalDeviceProperties

const std::vector<Display> &getDisplays() const#

Get the list of displays (const)

Returns

const std::vector<Display>&

const Display &getDisplay(uint32_t id) const#

Get Display (const)

Parameters

id – Display id

Returns

const Display&

Display &getDisplay(uint32_t id)#

Get Display (const)

Parameters

id – Display id

Returns

const Display&

inline uint32_t getNumDisplays() const#

Get the number of displays.

Returns

Returns the number of supported displays

inline const PhysicalDeviceMemoryProperties &getMemoryProperties() const#

Get supported memory properties (const)

Returns

PhysicalDeviceMemoryProperties

bool getSurfaceSupport(uint32_t queueFamilyIndex, Surface surface) const#

Determine whether the specified surface supports presentation.

Parameters
  • queueFamilyIndex – The queue family to check for WSI support

  • surface – The surface to check for WSI support for the specified queue family index

Returns

True if the specified queue family supports Window System Integration (WSI) with the specified surface

FormatProperties getFormatProperties(pvrvk::Format format)#

Get format properties.

Parameters

format – Format

Returns

FormatProperties

SurfaceCapabilitiesKHR getSurfaceCapabilities(const Surface &surface) const#

Get surface capabilities for a surface created using this physical device.

Parameters

surface – The surface to retrieve capabilities for

Returns

SurfaceCapabilities

inline const PhysicalDeviceFeatures &getFeatures() const#

Get This physical device features.

Returns

PhysicalDeviceFeatures

DisplayMode createDisplayMode(pvrvk::Display &display, const pvrvk::DisplayModeCreateInfo &displayModeCreateInfo)#

Create a display mode.

Parameters
  • display – The display from which to create a display mode

  • displayModeCreateInfo – Display Mode create info

Returns

The created DisplayMode

Device createDevice(const DeviceCreateInfo &deviceCreateInfo)#

create gpu device.

Parameters

deviceCreateInfo – Device create info

Returns

Device

inline const std::vector<QueueFamilyProperties> &getQueueFamilyProperties() const#

Get the list of queue family properties.

Returns

A list of QueueFamilyProperties for the physical device

std::vector<PresentModeKHR> getSurfacePresentModes(const Surface &surface) const#

Retrieves the set of supported surface presentation modes.

Parameters

surface – The surface to retrieve supported presentation modes for

Returns

vector of pvrvk::PresentModeKHR

std::vector<SurfaceFormatKHR> getSurfaceFormats(const Surface &surface) const#

Retrieves the set of supported surface formats.

Parameters

surface – The surface to retrieve supported formats for

Returns

vector of pvrvk::ExtensionProperties

std::vector<ExtensionProperties> &getDeviceExtensionsProperties()#

Enumerate device extensions properties.

Returns

vector of pvrvk::ExtensionProperties

const ImageFormatProperties getImageFormatProperties(pvrvk::Format format, pvrvk::ImageType imageType, pvrvk::ImageTiling tiling, pvrvk::ImageUsageFlags usage, pvrvk::ImageCreateFlags flags)#

Returns the image format properties for a given set of image creation parameters.

Parameters
  • format – The image format to get sparse image properties for.

  • imageType – The image type to get sparse image properties for.

  • tiling – The image tiling mode.

  • usage – The image usage flags.

  • flags – The image creation flags.

Returns

An ImageFormatProperties structure

const std::vector<SparseImageFormatProperties> getSparseImageFormatProperties(pvrvk::Format format, pvrvk::ImageType imageType, pvrvk::SampleCountFlags sampleCount, pvrvk::ImageUsageFlags usage, pvrvk::ImageTiling tiling)#

Returns the sparse image format properties for a given set of image creation parameters.

Parameters
  • format – The image format to get sparse image properties for.

  • imageType – The image type to get sparse image properties for.

  • sampleCount – The image sample count.

  • usage – The image usage flags.

  • tiling – The image tiling mode.

Returns

A list of SparseImageFormatProperties structures

uint32_t getMemoryTypeIndex(uint32_t allowedMemoryTypeBits, pvrvk::MemoryPropertyFlags requiredMemoryProperties, pvrvk::MemoryPropertyFlags &usedMemoryProperties) const#

Attempts to find the index for a suitable memory type supporting the memory type bits required from the set of memory type bits supported.

Parameters
  • allowedMemoryTypeBits – The memory type bits allowed. The required memory type chosen must be one of those allowed.

  • requiredMemoryProperties – The memory type property flags required.

  • usedMemoryProperties – The memory type property flags found which support the memory type bits and memory property flags. Note that the use memory property flags may be different to those that were provided as required although they will be a superset of those required.

Returns

The memory type index found supporting the specified MemoryPropertyFlags.

inline uint32_t getNumDisplayPlanes()#

Returns the number of supported display planes.

Returns

The number of supported display planes.

Display getDisplayPlaneProperties(uint32_t displayPlaneIndex, uint32_t &currentStackIndex)#

Attempts to find the display plane properties for a given display.

Parameters
  • displayPlaneIndex – The display plane index to get display plane properties for.

  • currentStackIndex – The display to find display plane properties for.

Returns

The DisplayPlanePropertiesKHR for the given display else VK_NULL_HANDLE if the display does not currently have an associated display plane.

std::vector<Display> getDisplayPlaneSupportedDisplays(uint32_t planeIndex)#

Attempts to find the supported displays for a given display plane.

Parameters

planeIndex – The display plane index to check for supported displays.

Returns

The list of supported displays for the given plane.

DisplayPlaneCapabilitiesKHR getDisplayPlaneCapabilities(DisplayMode &mode, uint32_t planeIndex)#

Attempts to find the supported displays for a given display plane.

Parameters
  • mode – The display mode object to get display plane capabilities for.

  • planeIndex – The display plane index to check for supported displays.

Returns

The list of supported displays for the given plane.

bool populateExtensionFeatures(ExtensionFeatures &extensionFeatures)#

Populate an extension features class with the enabled features for this physical device.

Parameters

extensionFeatures – A physical device extension features instance.

Returns

True if features were populated

template<class VkPhysicalDeviceExtensionFeatures>
inline bool populateExtensionFeaturesVk(pvrvk::StructureType type, VkPhysicalDeviceExtensionFeatures *featuresStruct)#

Populate an extension features struct with the enabled features for this physical device using vkGetPhysicalDeviceFeatures2KHR.

Template Parameters

VkPhysicalDeviceExtensionFeatures – A vulkan VkPhysicalDevice*Features structure.

Parameters

featuresStruct – Physical device extension features struct to be put in the pNext chain of VkPhysicalDeviceFeatures2KHR. Make sure pNext has been set! Easiest way is to initialize the struct as your_vk_features_struct = {};

Returns

True if struct was populated

template<class VkPhysicalDeviceExtensionProperties>
inline bool populateExtensionPropertiesVk(pvrvk::StructureType type, VkPhysicalDeviceExtensionProperties *propertiesStruct)#

Populate an extension properties struct for this physical device using vkGetPhysicalDeviceProperties2KHR.

Template Parameters

VkPhysicalDeviceExtensionProperties – A vulkan VkPhysicalDevice*Properties structure.

Parameters

propertiesStruct – Physical device extension properties struct to be put in the pNext chain of vkGetPhysicalDeviceProperties2KHR. Make sure pNext has been set! Easiest way is to initialize the struct as your_vk_properties_struct = {};

Returns

True if struct was populated

std::vector<FragmentShadingRate> getAvailableFragmentShadingRates()#

Returns the possible fragment shading rate combinations for this physical device. Each member returned contains a possible fragment size and a bitmask of the possible MSAA sample counts that can be used with that FSR fragment size.

Returns

Vector of available fragment shading rates.

PhysicalDevice_::make_shared_enabler#

Nested Relationships#

This class is a nested type of PhysicalDevice_.

Class Documentation#

class make_shared_enabler#

A class which restricts the creation of a pvrvk::PhysicalDevice to children or friends of a pvrvk::impl::PhysicalDevice_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Friends

friend class PhysicalDevice_

Pipeline#

Inheritance Relationships#

Base Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkPipeline, ObjectType::e_PIPELINE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::DeviceObjectDebugUtils< Pipeline< PVRVkPipeline, PVRVkPipelineCreateInfo > > (DeviceObjectDebugUtils)

Class Documentation#

template<class PVRVkPipeline, class PVRVkPipelineCreateInfo>
class Pipeline : public pvrvk::impl::PVRVkDeviceObjectBase<VkPipeline, ObjectType::e_PIPELINE>, public pvrvk::impl::DeviceObjectDebugUtils<Pipeline<PVRVkPipeline, PVRVkPipelineCreateInfo>>#

A Graphics Pipeline is a PVRVk adapter to a Vulkan Pipeline to a pipeline created for VK_PIPELINE_BINDING_POINT_COMPUTE, and as such only supports the part of Vulkan that is supported for Graphics pipelines.

Public Functions

inline const PipelineLayout &getPipelineLayout() const#

Return pipeline layout.

Returns

const PipelineLayout&

inline const PVRVkPipelineCreateInfo &getCreateInfo() const#

return pipeline create param used to create the child pipeline

Returns

const PipelineCreateInfo<PVRVkPipeline>&

Protected Functions

inline ~Pipeline()#

Destructor for a PVRVk pipeline object.

inline Pipeline(const DeviceWeakPtr &device, VkPipeline vkPipeline, const PVRVkPipelineCreateInfo &desc)#

Constructor for a PVRVk pipeline object. This constructor shouldn’t be called directly and should instead be called indirectly via the creation of Graphics and Compute pipelines.

Parameters
  • device – The device from which this PVRVk pipeline will be created from.

  • vkPipeline – The Vulkan pipeline object itself.

  • desc – The pipeline creation information.

Protected Attributes

PVRVkPipelineCreateInfo _createInfo#

Pipeline creation information.

VkPipelineCache _pipeCache#

Pipeline cache object providing potential optimisations when create subsequent pipelines.

PVRVkPipeline _parent#

A parent pipeline to using when creating this pipeline. Its expected that the parent and this pipeline will have much commonality. Making use of a common parent pipeline means it may be more efficient to create this pipeline. The parent pipeline must have been created using the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT.

PipelineCache_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class PipelineCache_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkPipelineCache, ObjectType::e_PIPELINE_CACHE>, public pvrvk::impl::DeviceObjectDebugUtils<PipelineCache_>#

A PVRVk pipeline cache object which allows the result of pipeline construction to be reused between pipelines and between runs of an application.

Public Functions

inline PipelineCacheCreateFlags getFlags() const#

Get the pipeline cache creation flags.

Returns

The set of pipeline cache creation flags

inline size_t getInitialDataSize() const#

Get the initial data size of the pipeline cache.

Returns

The initial data size of the pipeline cache

inline const void *getInitialData() const#

Get the initial data of the pipeline cache.

Returns

The initial data of the pipeline cache

inline size_t getCacheMaxDataSize() const#

Get the maximum size of the data that can be retrieved from the this pipeline cache, in bytes.

Returns

Returns maximum cache size

inline size_t getCacheData(size_t size, void *inOutData) const#

Get the cache data and the size.

Parameters
  • size – The size of the buffer, in bytes, pointed to by inOutData

  • inOutData – Pointer to the data where it gets written

Returns

Returns the amount of data actually written to the buffer

inline PipelineCacheCreateInfo getCreateInfo() const#

Get this pipeline cache’s create flags.

Returns

PipelineCacheCreateInfo

PipelineCache_::make_shared_enabler#

Nested Relationships#

This class is a nested type of PipelineCache_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class PipelineCache_

PipelineLayout_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class PipelineLayout_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkPipelineLayout, ObjectType::e_PIPELINE_LAYOUT>, public pvrvk::impl::DeviceObjectDebugUtils<PipelineLayout_>#

Vulkan implementation of the PipelineLayout class.

Public Functions

inline const DescriptorSetLayout &getDescriptorSetLayout(uint32_t index) const#

Get a descriptor set layout used by this pipeline layout.

Parameters

index – Layout index

Returns

std::vector<pvrvk::api::DescriptorSetLayout>&

inline const DescriptorSetLayoutSet &getDescriptorSetLayouts() const#

Get all the descriptor set layouts used by this object as (raw datastructure)

Returns

The underlying container of all descriptor set layouts used.

inline uint32_t getNumDescriptorSetLayouts() const#

Get number of descriptorSet layout.

Returns

the number of descriptor set layouts

inline const PipelineLayoutCreateInfo &getCreateInfo() const#

Return create param.

Returns

const PipelineLayoutCreateInfo&

PipelineLayout_::make_shared_enabler#

Nested Relationships#

This class is a nested type of PipelineLayout_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class PipelineLayout_

PVRVkDeviceObjectBase#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkObjectBase< VkHandleType, PVRVkObjectType > (PVRVkObjectBase)

Class Documentation#

template<class VkHandleType, ObjectType PVRVkObjectType>
class PVRVkDeviceObjectBase : public pvrvk::impl::PVRVkObjectBase<VkHandleType, PVRVkObjectType>#

Defines a simple interface for a Vulkan object which holds a reference to a particular device.

Public Functions

inline  DECLARE_NO_COPY_SEMANTICS (PVRVkDeviceObjectBase) inline const Device getDevice() const

Get Device (const)

Returns

DeviceWeakPtr

inline Device getDevice()#

Get Device.

Returns

DeviceWeakPtr

Protected Functions

inline PVRVkDeviceObjectBase()#

default Constructor for a device object handle

inline explicit PVRVkDeviceObjectBase(const DeviceWeakPtr &device)#

Constructor for a device object handle initialising the Vulkan device.

Parameters

device – The Vulkan device used to create the Vulkan object.

inline explicit PVRVkDeviceObjectBase(const VkHandleType &handle)#

Constructor for a device object handle initialising the Vulkan object handle.

Parameters

handle – The Vulkan object handle given to the Vulkan object.

inline PVRVkDeviceObjectBase(const DeviceWeakPtr &device, const VkHandleType &handle)#

Constructor for a device object handle initialising the Vulkan device and device object handle.

Parameters
  • device – The Vulkan device used to create the Vulkan device.

  • handle – The Vulkan object handle given to the Vulkan object.

Protected Attributes

DeviceWeakPtr _device#

The device which was used to create this DeviceObject.

PVRVkInstanceObjectBase#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkObjectBase< VkHandleType, PVRVkObjectType > (PVRVkObjectBase)

Class Documentation#

template<class VkHandleType, ObjectType PVRVkObjectType>
class PVRVkInstanceObjectBase : public pvrvk::impl::PVRVkObjectBase<VkHandleType, PVRVkObjectType>#

Defines a simple interface for a Vulkan which holds a reference to a Vulkan instance.

Public Functions

inline  DECLARE_NO_COPY_SEMANTICS (PVRVkInstanceObjectBase) inline const Instance getInstance() const

Get instance (const)

Returns

Instance

inline Instance getInstance()#

Get instance.

Returns

Instance

Protected Functions

inline PVRVkInstanceObjectBase()#

default Constructor for an instance object handle

inline explicit PVRVkInstanceObjectBase(const InstanceWeakPtr &instance)#

Constructor for an instance object handle initialising the instance.

Parameters

instance – The Vulkan instance used to create the Vulkan object.

inline explicit PVRVkInstanceObjectBase(const VkHandleType &handle)#

Constructor for an instance object handle initialising the Vulkan object handle.

Parameters

handle – The Vulkan object handle given to the Vulkan object.

inline PVRVkInstanceObjectBase(const InstanceWeakPtr &instance, const VkHandleType &handle)#

Constructor for an instance object handle initialising the instance and Vulkan object handle.

Parameters
  • instance – The Vulkan instance used to create the Vulkan object.

  • handle – The Vulkan object handle given to the Vulkan object.

Protected Attributes

InstanceWeakPtr _instance#

The instance which was used to create this InstanceObject.

PVRVkObjectBase#

Inheritance Relationships#

Derived Types#

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkAccelerationStructureKHR, ObjectType::e_ACCELERATION_STRUCTURE_KHR > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkBufferView, ObjectType::e_BUFFER_VIEW > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkBuffer, ObjectType::e_BUFFER > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkCommandBuffer, ObjectType::e_COMMAND_BUFFER > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkCommandPool, ObjectType::e_COMMAND_POOL > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkPipeline, ObjectType::e_PIPELINE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorPool, ObjectType::e_DESCRIPTOR_POOL > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorSetLayout, ObjectType::e_DESCRIPTOR_SET_LAYOUT > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorSet, ObjectType::e_DESCRIPTOR_SET > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkEvent, ObjectType::e_EVENT > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkFence, ObjectType::e_FENCE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkFramebuffer, ObjectType::e_FRAMEBUFFER > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkDeviceMemory, ObjectType::e_DEVICE_MEMORY > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkImageView, ObjectType::e_IMAGE_VIEW > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkImage, ObjectType::e_IMAGE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkPipelineCache, ObjectType::e_PIPELINE_CACHE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkPipelineLayout, ObjectType::e_PIPELINE_LAYOUT > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkQueryPool, ObjectType::e_QUERY_POOL > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkQueue, ObjectType::e_DEVICE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkRenderPass, ObjectType::e_RENDER_PASS > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkSampler, ObjectType::e_SAMPLER > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkSemaphore, ObjectType::e_SEMAPHORE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkShaderModule, ObjectType::e_SHADER_MODULE > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkSwapchainKHR, ObjectType::e_SWAPCHAIN_KHR > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkDebugReportCallbackEXT, ObjectType::e_DEBUG_REPORT_CALLBACK_EXT > (PVRVkInstanceObjectBase)

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkDebugUtilsMessengerEXT, ObjectType::e_DEBUG_UTILS_MESSENGER_EXT > (PVRVkInstanceObjectBase)

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkPhysicalDevice, ObjectType::e_PHYSICAL_DEVICE > (PVRVkInstanceObjectBase)

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkSurfaceKHR, ObjectType::e_SURFACE_KHR > (PVRVkInstanceObjectBase)

  • public pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDevice, ObjectType::e_DEVICE > (PVRVkPhysicalDeviceObjectBase)

  • public pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDisplayModeKHR, ObjectType::e_DISPLAY_MODE_KHR > (PVRVkPhysicalDeviceObjectBase)

  • public pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDisplayKHR, ObjectType::e_DISPLAY_KHR > (PVRVkPhysicalDeviceObjectBase)

  • public pvrvk::impl::PVRVkDeviceObjectBase< VkHandleType, PVRVkObjectType > (PVRVkDeviceObjectBase)

  • public pvrvk::impl::PVRVkInstanceObjectBase< VkHandleType, PVRVkObjectType > (PVRVkInstanceObjectBase)

  • public pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkHandleType, PVRVkObjectType > (PVRVkPhysicalDeviceObjectBase)

Class Documentation#

template<class VkHandleType, ObjectType PVRVkObjectType>
class PVRVkObjectBase#

Defines a simple interface for a Vulkan object.

Subclassed by pvrvk::impl::PVRVkDeviceObjectBase< VkAccelerationStructureKHR, ObjectType::e_ACCELERATION_STRUCTURE_KHR >, pvrvk::impl::PVRVkDeviceObjectBase< VkBufferView, ObjectType::e_BUFFER_VIEW >, pvrvk::impl::PVRVkDeviceObjectBase< VkBuffer, ObjectType::e_BUFFER >, pvrvk::impl::PVRVkDeviceObjectBase< VkCommandBuffer, ObjectType::e_COMMAND_BUFFER >, pvrvk::impl::PVRVkDeviceObjectBase< VkCommandPool, ObjectType::e_COMMAND_POOL >, pvrvk::impl::PVRVkDeviceObjectBase< VkPipeline, ObjectType::e_PIPELINE >, pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorPool, ObjectType::e_DESCRIPTOR_POOL >, pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorSetLayout, ObjectType::e_DESCRIPTOR_SET_LAYOUT >, pvrvk::impl::PVRVkDeviceObjectBase< VkDescriptorSet, ObjectType::e_DESCRIPTOR_SET >, pvrvk::impl::PVRVkDeviceObjectBase< VkEvent, ObjectType::e_EVENT >, pvrvk::impl::PVRVkDeviceObjectBase< VkFence, ObjectType::e_FENCE >, pvrvk::impl::PVRVkDeviceObjectBase< VkFramebuffer, ObjectType::e_FRAMEBUFFER >, pvrvk::impl::PVRVkDeviceObjectBase< VkDeviceMemory, ObjectType::e_DEVICE_MEMORY >, pvrvk::impl::PVRVkDeviceObjectBase< VkImageView, ObjectType::e_IMAGE_VIEW >, pvrvk::impl::PVRVkDeviceObjectBase< VkImage, ObjectType::e_IMAGE >, pvrvk::impl::PVRVkDeviceObjectBase< VkPipelineCache, ObjectType::e_PIPELINE_CACHE >, pvrvk::impl::PVRVkDeviceObjectBase< VkPipelineLayout, ObjectType::e_PIPELINE_LAYOUT >, pvrvk::impl::PVRVkDeviceObjectBase< VkQueryPool, ObjectType::e_QUERY_POOL >, pvrvk::impl::PVRVkDeviceObjectBase< VkQueue, ObjectType::e_DEVICE >, pvrvk::impl::PVRVkDeviceObjectBase< VkRenderPass, ObjectType::e_RENDER_PASS >, pvrvk::impl::PVRVkDeviceObjectBase< VkSampler, ObjectType::e_SAMPLER >, pvrvk::impl::PVRVkDeviceObjectBase< VkSemaphore, ObjectType::e_SEMAPHORE >, pvrvk::impl::PVRVkDeviceObjectBase< VkShaderModule, ObjectType::e_SHADER_MODULE >, pvrvk::impl::PVRVkDeviceObjectBase< VkSwapchainKHR, ObjectType::e_SWAPCHAIN_KHR >, pvrvk::impl::PVRVkInstanceObjectBase< VkDebugReportCallbackEXT, ObjectType::e_DEBUG_REPORT_CALLBACK_EXT >, pvrvk::impl::PVRVkInstanceObjectBase< VkDebugUtilsMessengerEXT, ObjectType::e_DEBUG_UTILS_MESSENGER_EXT >, pvrvk::impl::PVRVkInstanceObjectBase< VkPhysicalDevice, ObjectType::e_PHYSICAL_DEVICE >, pvrvk::impl::PVRVkInstanceObjectBase< VkSurfaceKHR, ObjectType::e_SURFACE_KHR >, pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDevice, ObjectType::e_DEVICE >, pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDisplayModeKHR, ObjectType::e_DISPLAY_MODE_KHR >, pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkDisplayKHR, ObjectType::e_DISPLAY_KHR >, pvrvk::impl::PVRVkDeviceObjectBase< VkHandleType, PVRVkObjectType >, pvrvk::impl::PVRVkInstanceObjectBase< VkHandleType, PVRVkObjectType >, pvrvk::impl::PVRVkPhysicalDeviceObjectBase< VkHandleType, PVRVkObjectType >

Public Functions

inline  DECLARE_NO_COPY_SEMANTICS (PVRVkObjectBase) inline const VkHandleType &getVkHandle() const

Get vulkan object (const)

Returns

Returns the templated ‘HandleType’

inline ObjectType getObjectType() const#

Returns the specified object’s type.

Returns

The object type

Protected Functions

inline PVRVkObjectBase()#

default Constructor for an object handle

inline explicit PVRVkObjectBase(const VkHandleType &handle)#

Constructor for an object handle initialising the Vulkan object handle.

Parameters

handle – The Vulkan object handle given to the Vulkan object.

Protected Attributes

VkHandleType _vkHandle#

The Vulkan object handle representing the Vulkan object at an API level.

ObjectType _objectType#

The Vulkan object type.

PVRVkPhysicalDeviceObjectBase#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::PVRVkObjectBase< VkHandleType, PVRVkObjectType > (PVRVkObjectBase)

Class Documentation#

template<class VkHandleType, ObjectType PVRVkObjectType>
class PVRVkPhysicalDeviceObjectBase : public pvrvk::impl::PVRVkObjectBase<VkHandleType, PVRVkObjectType>#

Defines a simple interface for a Vulkan which holds a reference to a Vulkan Physical Device.

Public Functions

inline  DECLARE_NO_COPY_SEMANTICS (PVRVkPhysicalDeviceObjectBase) inline const PhysicalDevice getPhysicalDevice() const

Get physical device (const)

Returns

PhysicalDevice

inline PhysicalDevice getPhysicalDevice()#

Get physical device.

Returns

PhysicalDevice

Protected Functions

inline PVRVkPhysicalDeviceObjectBase()#

default Constructor for a physical device object handle

inline explicit PVRVkPhysicalDeviceObjectBase(const PhysicalDeviceWeakPtr &physicalDevice)#

Constructor for a physical device object handle initialising the physical device.

Parameters

physicalDevice – The Vulkan physical device used to create the Vulkan object.

inline explicit PVRVkPhysicalDeviceObjectBase(const VkHandleType &handle)#

Constructor for a physical device object handle initialising the physical device and Vulkan object handle.

Parameters

handle – The Vulkan object handle given to the Vulkan object.

inline PVRVkPhysicalDeviceObjectBase(const PhysicalDeviceWeakPtr &physicalDevice, const VkHandleType &handle)#

Constructor for a physical device object handle initialising the physical device and Vulkan object handle.

Parameters
  • physicalDevice – The Vulkan physical device used to create the Vulkan object.

  • handle – The Vulkan object handle given to the Vulkan object.

Protected Attributes

PhysicalDeviceWeakPtr _physicalDevice#

The physical device which was used to create this PhysicalDeviceObject.

QueryPool_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class QueryPool_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkQueryPool, ObjectType::e_QUERY_POOL>, public pvrvk::impl::DeviceObjectDebugUtils<QueryPool_>#

Vulkan implementation of the Query Pool class. Destroying the query pool will also destroy the queries allocated from this pool.

Public Functions

bool getResults(uint32_t queryIndex, size_t dataSize, void *data, QueryResultFlags flags)#

Retrieves the status and results for a particular query.

Parameters
  • queryIndex – The initial query index

  • dataSize – The size of bytes of the buffer pointed to by data

  • data – A pointer to a user allocated buffer where the results will be written

  • flags – Specifies how and when results are returned

Returns

True if the results or status’ for the set of queries were successfully retrieved

bool getResults(uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *data, VkDeviceSize stride, QueryResultFlags flags)#

Retrieves the status and results for a set of queries.

Parameters
  • firstQuery – The initial query index

  • queryCount – The number of queries

  • dataSize – The size of bytes of the buffer pointed to by data

  • data – A pointer to a user allocated buffer where the results will be written

  • stride – The stide in bytes between results for individual queries within data

  • flags – Specifies how and when results are returned

Returns

True if the results or statuses for the set of queries were successfully retrieved

inline QueryPoolCreateFlags getFlags() const#

Get the query pool creation flags.

Returns

The set of query pool creation flags

inline QueryPipelineStatisticFlags getQueryPipelineStatisticFlags() const#

Get the set of counters which will be returned in queries on the pool.

Returns

The set of counters which will be returned in queries on the pool

inline QueryType getQueryType() const#

Get the type of queries managed by this query pool.

Returns

The type of queries managed by this query pool

inline uint32_t getNumQueries() const#

Get the number of queries managed by the pool.

Returns

The number of queries managed by the pool

inline QueryPoolCreateInfo getCreateInfo() const#

Get this query pool’s create flags.

Returns

QueryPoolCreateInfo

QueryPool_::make_shared_enabler#

Nested Relationships#

This class is a nested type of QueryPool_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class QueryPool_

Queue_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Queue_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkQueue, ObjectType::e_DEVICE>, public pvrvk::impl::DeviceObjectDebugUtils<Queue_>#

Wraps vulkan queue object.

Public Functions

inline void submit(const SubmitInfo &queueSubmitInfo, Fence signalFence = Fence())#

Submit.

Parameters
  • queueSubmitInfo – Queue submit info

  • signalFence – Optional handle to a fence to be signaled. If fence is not null handle, it defines a fence signal

void submit(const SubmitInfo *queueSubmitInfo, uint32_t numSubmitInfos, Fence signalFence = Fence())#

Submit.

Parameters
  • queueSubmitInfo – Pointer to submit info

  • numSubmitInfos – number of submit info

  • signalFence – Optional handle to a fence to be signaled. If fence is not null handle, it defines a fence signal

void present(const PresentInfo &presentInfo, Result *const results = nullptr)#

Present.

Parameters
  • presentInfo – Present info

  • results – An array of presentInfo.swapchainCount Results. Applications that do not need per-swapchain results can use nullptr for results. If non-NULL, each entry results will be set to the Result for presenting the swapchain corresponding to the same swapchain

void waitIdle()#

To wait on the host for the completion of outstanding queue operations for a given queue. This is equivalent to submitting a fence to a queue and waiting with an infinite timeout for that fence to signal.

inline pvrvk::QueueFlags getFlags() const#

Return supported queue flags.

Returns

pvrvk::QueueFlags

inline float getPriority() const#

Return the queues priority.

Returns

Queue Priority

void bindSparse(const BindSparseInfo *bindInfo, uint32_t numBindInfos, Fence &fenceSignal)#

Submit sparse binding operations.

Parameters
  • bindInfo – Pointer to bind infos

  • numBindInfos – Number of bind infos

  • fenceSignal – Optional handle to a fence to be signaled. If fence is not null handle, it defines a fence signal operation.

inline uint32_t getFamilyIndex() const#

Get family id.

32_t

Returns

uint

void beginDebugUtilsLabel(const pvrvk::DebugUtilsLabel &labelInfo)#

Begins identifying a region of work submitted to this queue. The calls to beginDebugUtilsLabel and endDebugUtilsLabel must be matched and balanced.

Parameters

labelInfo – Specifies the parameters of the label region to open

void endDebugUtilsLabel()#

Ends a label region of work submitted to this queue.

void insertDebugUtilsLabel(const pvrvk::DebugUtilsLabel &labelInfo)#

Inserts a single debug label any time.

Parameters

labelInfo – Specifies the parameters of the label region to insert

Queue_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Queue_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Queue_

RaytracingPipeline_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::Pipeline< RaytracingPipeline, RaytracingPipelineCreateInfo > (Pipeline)

Class Documentation#

class RaytracingPipeline_ : public pvrvk::impl::Pipeline<RaytracingPipeline, RaytracingPipelineCreateInfo>#

Vulkan RaytracingPipeline wrapper.

RaytracingPipeline_::make_shared_enabler#

Nested Relationships#

This class is a nested type of RaytracingPipeline_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class RaytracingPipeline_

RenderPass_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class RenderPass_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkRenderPass, ObjectType::e_RENDER_PASS>, public pvrvk::impl::DeviceObjectDebugUtils<RenderPass_>#

Vulkan implementation of the RenderPass class. Use through the Reference counted framework object pvrvk::api::RenderPass. RenderPass Compatibility: Framebuffers and graphics pipelines are created based on a specific render pass object. They must only be used with that render pass object, or one compatible with it. Two attachment references are compatible if they have matching format and sample count, Two arrays of attachment references are compatible if all corresponding pairs of attachments are compatible. If the arrays are of different lengths, attachment references not present in the smaller array are treated as unused. Two render passes that contain only a single subpass are compatible if their corresponding color, input, resolve, and depth/stencil attachment references are compatible. If two render passes contain more than one subpass, they are compatible if they are identical except for: - Initial and final image layout in attachment descriptions - Load and store operations in attachment descriptions - Image layout in attachment references A framebuffer is compatible with a render pass if it was created using the same render pass or a compatible render pass.

Public Functions

inline const RenderPassCreateInfo &getCreateInfo() const#

getCreateInfo

Returns

RenderPass_::make_shared_enabler#

Nested Relationships#

This class is a nested type of RenderPass_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class RenderPass_

Sampler_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Sampler_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkSampler, ObjectType::e_SAMPLER>, public pvrvk::impl::DeviceObjectDebugUtils<Sampler_>#

SamplerVk_ implementation that wraps the vulkan sampler.

Public Functions

inline const SamplerCreateInfo &getCreateInfo() const#

Get sampler create info (const)

Returns

SamplerCreateInfo&

Sampler_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Sampler_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Sampler_

SecondaryCommandBuffer_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class SecondaryCommandBuffer_ : public pvrvk::impl::CommandBufferBase_#

Contains all the commands and states that need to be submitted to the gpu, including pipeline, texture, and samplers. Virtually everything that needs to happen on the GPU is submitted to the CommandBuffer.

Secondary command buffers cannot contain RenderPasses, and cannot be submitted to the GPU. SecondaryCommandBuffers can be submitted to the primaryCommandBuffer -It is invalid to submit commands to a command buffer while it is not being recorded. -It is invalid to reset a command buffer while it is being recorded. -It is invalid to submit a command buffer more than once if it is one time submit command buffer -Draw commands must be between a BeginRenderPass and an EndRenderPass command

Public Functions

void begin(const RenderPass &renderpass, uint32_t subpass = 0, const CommandBufferUsageFlags flags = CommandBufferUsageFlags::e_RENDER_PASS_CONTINUE_BIT)#

Call this function before beginning to record commands. If the Framebuffer object is known, prefer the Framebuffer overload as it may offer better performance.

Parameters
  • renderpass – A RenderPass object defining which render passes this SecondaryCommandBuffer will be compatible with and can be executed within.

  • subpass – The index of the subpass within the render pass instance that this CommandBuffer will be executed within.

  • flags – Flags is a bitmask of CommandBufferUsageFlagBits specifying usage behavior for the command buffer.

void begin(const Framebuffer &framebuffer, uint32_t subpass = 0, const CommandBufferUsageFlags flags = CommandBufferUsageFlags::e_RENDER_PASS_CONTINUE_BIT)#

Call this function before beginning to record commands.

Parameters
  • framebuffer – Refers to an Framebuffer object that this CommandBuffer will be rendering to if it is executed within a render pass instance.

  • subpass – The index of the subpass within the render pass instance that this CommandBuffer will be executed within.

  • flags – Flags is a bitmask of CommandBufferUsageFlagBits specifying usage behavior for the command buffer.

void begin(const CommandBufferUsageFlags flags = CommandBufferUsageFlags(0))#

Call this function before beginning to record commands.

Parameters

flags – Flags is a bitmask of CommandBufferUsageFlags specifying usage behavior for the command buffer.

Protected Static Functions

static inline SecondaryCommandBuffer constructShared(const DeviceWeakPtr &device, CommandPool pool, VkCommandBuffer myHandle)#

Protected function used to create a pvrvk::SecondaryCommandBuffer. Note that this function shouldn’t normally be called directly and will be called by a friend of SecondaryCommandBuffer_ which will generally be a CommandPool.

Parameters
  • device – The device used to allocate the secondary command buffer.

  • pool – The pool from which the command buffer will be allocated.

  • myHandle – The vulkan handle for this command buffer.

Returns

Returns a successfully created pvrvk::SecondaryCommandBuffer

Friends

friend class CommandPool_
class make_shared_enabler : public pvrvk::impl::CommandBufferBase_::make_shared_enabler#

A class which restricts the creation of a pvrvk::SecondaryCommandBuffer to children or friends of a pvrvk::impl::SecondaryCommandBuffer_.

Protected Functions

inline make_shared_enabler()#

Constructor for a make_shared_enabler.

Protected Attributes

friend SecondaryCommandBuffer_

Indicates that a pvrvk::impl::SecondaryCommandBuffer_ is a friend.

SecondaryCommandBuffer_::make_shared_enabler#

Nested Relationships#

This class is a nested type of SecondaryCommandBuffer_.

Inheritance Relationships#

Base Type#

Class Documentation#

class make_shared_enabler : public pvrvk::impl::CommandBufferBase_::make_shared_enabler

A class which restricts the creation of a pvrvk::SecondaryCommandBuffer to children or friends of a pvrvk::impl::SecondaryCommandBuffer_.

Protected Functions

inline make_shared_enabler()

Constructor for a make_shared_enabler.

Protected Attributes

friend SecondaryCommandBuffer_

Indicates that a pvrvk::impl::SecondaryCommandBuffer_ is a friend.

Semaphore_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Derived Type#

Class Documentation#

class Semaphore_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkSemaphore, ObjectType::e_SEMAPHORE>, public pvrvk::impl::DeviceObjectDebugUtils<Semaphore_>#

Vulkan implementation of the Semaphore class. Use to “serialize” access between CommandBuffer submissions and /Queues.

Subclassed by pvrvk::impl::TimelineSemaphore_

Public Functions

inline SemaphoreCreateFlags getFlags() const#

Get the Semaphore creation flags.

Returns

The set of Semaphore creation flags

inline SemaphoreCreateInfo getCreateInfo() const#

Get this Semaphore’s create flags.

Returns

SemaphoreCreateInfo

Protected Attributes

SemaphoreCreateInfo _createInfo#

Creation information used when creating the Semaphore.

Semaphore_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Semaphore_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class Semaphore_

ShaderModule_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class ShaderModule_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkShaderModule, ObjectType::e_SHADER_MODULE>, public pvrvk::impl::DeviceObjectDebugUtils<ShaderModule_>#

Vulkan shader module wrapper.

Public Functions

inline ShaderModuleCreateFlags getFlags() const#

Get the ShaderModule creation flags.

Returns

The set of ShaderModule creation flags

inline uint32_t getCodeSize() const#

Get the size of the shader sources.

Returns

The size of shader sources

inline const std::vector<uint32_t> &getShaderSources() const#

Get the shader sources.

Returns

The set of shader sources

inline ShaderModuleCreateInfo getCreateInfo() const#

Get this shader modules’s create flags.

Returns

ShaderModuleCreateInfo

ShaderModule_::make_shared_enabler#

Nested Relationships#

This class is a nested type of ShaderModule_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class ShaderModule_

Surface_#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class Surface_ : public pvrvk::impl::PVRVkInstanceObjectBase<VkSurfaceKHR, ObjectType::e_SURFACE_KHR>#

A surface represents a renderable part of the “screen”, e.g. the inside part of the window.

Subclassed by pvrvk::impl::DisplayPlaneSurface_

Protected Functions

Surface_(Instance &instance)#

Constructor for a surface object.

Parameters

instance – The instance which will be used to create the surface.

~Surface_()#

Destructor for a surface object.

SwapchainImage_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public pvrvk::impl::Image_ (Image_)

Class Documentation#

class SwapchainImage_ : public pvrvk::impl::Image_#

The Specialized image for swapchain.

Friends

friend class ::pvrvk::impl::Swapchain_

SwapchainImage_::make_shared_enabler#

Nested Relationships#

This class is a nested type of SwapchainImage_.

Inheritance Relationships#

Base Type#

Class Documentation#

class make_shared_enabler : public pvrvk::impl::Image_::make_shared_enabler#

A class which restricts the creation of a pvrvk::SwapchainImage to children or friends of a pvrvk::impl::SwapchainImage_.

Swapchain_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class Swapchain_ : public pvrvk::impl::PVRVkDeviceObjectBase<VkSwapchainKHR, ObjectType::e_SWAPCHAIN_KHR>, public pvrvk::impl::DeviceObjectDebugUtils<Swapchain_>#

The Swapchain is the object wrapping the on - screen rendering Framebuffer images (aka front/backbuffers)

Public Functions

bool acquireNextImage(uint64_t timeOut, Semaphore signalSemaphore, Fence signalFence)#

Acquire next image. The acquired swapchain index can be retrieved by calling getSwapchainIndex. Note: The presenation engine may still be consuming the swapchain image, therefore the calle must synchronise it before using it.

Parameters
  • timeOut – indicates how long the function waits, in nanoseconds, if no image is available.

  • signalSemaphore – is null semaphore or a semaphore to signal

  • signalFence – is a null fence or fence to signal

Returns

Return true if image was acquired, false if timed out or suboptimal.

bool acquireNextImage(uint64_t timeOut, Semaphore signalSemaphore = Semaphore())#

Acquire next image. The acquired swapchain index can be retrieved by calling getSwapchainIndex. Note: The presenation engine may still be consuming the swapchain image, therefore the calle must synchronise it before using it.

Parameters
  • timeOut – indicates how long the function waits, in nanoseconds, if no image is available.

  • signalSemaphore – is null semaphore or a semaphore to signal

Returns

Return true if image was acquired, false if timed out or suboptimal.

inline uint32_t getSwapchainLength() const#

Get swapchain length.

32_t

Returns

uint

inline const uint32_t &getSwapchainIndex() const#

Get the acquired swapchain index. Note: The presenation engine may still be consuming the swapchain image, therefore the calle must synchronise it before using it. swapchain index.

Returns

inline const ImageView &getImageView(uint32_t swapchain) const#

Get swapchain image view.

Parameters

swapchain – swapchain index

Returns

ImageView

inline ImageView &getImageView(uint32_t swapchain)#

Get swapchain image view.

Parameters

swapchain – swapchain index

Returns

ImageView

inline const Image &getImage(uint32_t swapchain) const#

Get swapchain image.

Parameters

swapchain – swapchain index

Returns

Image

inline Image &getImage(uint32_t swapchain)#

Get swapchain image.

Parameters

swapchain – swapchain index

Returns

Image

inline Extent2D getDimension() const#

Get dimension.

Returns

Extent

inline bool isClipped() const#

Gets whether the swapchain images are clipped.

Returns

True if the swapchain images are clipped

inline CompositeAlphaFlagsKHR getCompositeAlphaFlags() const#

Gets the CompositeAlphaFlagsKHR of the swapchain images.

Returns

The CompositeAlphaFlagsKHR for the swapchain image

inline uint32_t getNumArrayLayers() const#

Gets the number of array layers of the swapchain images.

Returns

The number of array layers of the swapchain images

inline Format getImageFormat() const#

Get swapchain image format.

Returns

Format

inline ColorSpaceKHR getColorSpace() const#

Gets the color space of the swapchain images.

Returns

The color space of the swapchain images

inline SurfaceTransformFlagsKHR getTransformFlags() const#

Gets the surface transform flags of the swapchain images.

Returns

The surface transform flags of the swapchain images

inline SharingMode getSharingMode() const#

Gets the image sharing mode of the swapchain images.

Returns

The image sharing mode of the swapchain images

inline PresentModeKHR getPresentationMode() const#

Gets the presentation mode of the swapchain images.

Returns

The presentation mode of the swapchain images

inline uint32_t getNumQueueFamilyIndices() const#

Gets the number of queue families which can make use of the swapchain images.

Returns

The number of queue families which can make use of the swapchain images

inline std::vector<uint32_t> getQueueFamilyIndices() const#

Gets the queue family indicies for the queues which can make use of the swapchain images.

Returns

The queue family indicies for the queues which can make use of the swapchain images

inline ImageUsageFlags getUsage() const#

Gets the swapchain image usage flags.

Returns

The swapchain image usage

inline bool supportsUsage(const ImageUsageFlags &imageUsage) const#

Returns whether the swapchain supports the specified image usage flag bits.

Parameters

imageUsage – The ImageUsageFlags bits to check for support

Returns

True if the swapchain supports the specified image usage

Swapchain_::make_shared_enabler#

Nested Relationships#

This class is a nested type of Swapchain_.

Class Documentation#

class make_shared_enabler#

Protected Functions

make_shared_enabler() = default#

Friends

friend class Swapchain_

TimelineSemaphore_#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class TimelineSemaphore_ : public pvrvk::impl::Semaphore_, public pvrvk::impl::DeviceObjectDebugUtils<TimelineSemaphore_>#

Public Functions

bool wait(const uint64_t &waitValue, uint64_t timeoutNanos = static_cast<uint64_t>(-1))#

TimelineSemaphore_::make_shared_enabler#

Nested Relationships#

This class is a nested type of TimelineSemaphore_.

Class Documentation#

class make_shared_enabler#

Protected Functions

inline make_shared_enabler()#

Friends

friend class TimelineSemaphore_

ArrayOrVector#

Class Documentation#

template<typename ElementType, size_t staticSize>
class ArrayOrVector#

Internal helper class that is used for unknown size arrays, utilising a small statically allocated space to avoid dynamic allocations if an array of “less-than” a number of items is required.

Template Parameters
  • ElementType – The type of items stored

  • staticSize – The amount of statically allocated memory used. If overran, a dynamic allocation takes place.

Public Functions

inline ElementType &operator[](size_t idx)#

Array indexing operator.

Parameters

idx – Array index

Returns

The indexed item

inline const ElementType &operator[](size_t idx) const#

Array indexing operator.

Parameters

idx – Array index

Returns

The indexed item

inline ArrayOrVector(size_t numItemsRequired)#

Constructor. Takes the actual, runtime size of the array.

Parameters

numItemsRequired – The size required for the array

inline ~ArrayOrVector()#

Destructor.

inline ElementType *get()#

Returns the pointer to the actual storage used (whether static or dynamic)

Returns

The pointer to the actual storage used.

inline const ElementType *get() const#

Returns the pointer to the actual storage used (whether static or dynamic)

Returns

The pointer to the actual storage used.

BarrierPipelineStageFlag2#

Inheritance Relationships#

Derived Types#

Class Documentation#

class BarrierPipelineStageFlag2#

Subclassed by pvrvk::BufferMemoryBarrier2, pvrvk::ImageMemoryBarrier2, pvrvk::MemoryBarrier2

Public Functions

inline BarrierPipelineStageFlag2()#

Constructor, zero initialization.

inline BarrierPipelineStageFlag2(pvrvk::PipelineStageFlagBits2KHR srcStageMaskParam, pvrvk::PipelineStageFlagBits2KHR dstStageMaskParam)#

Constructor, individual elements.

Parameters
  • srcStageMaskParam – Bitmask of pvrvk::PipelineStageFlagBits2KHR specifying a source pipeline stage mask.

  • dstStageMaskParam – Bitmask of pvrvk::PipelineStageFlagBits2KHR specifying a destination pipeline stage mask.

inline const PipelineStageFlagBits2KHR &getSrcStageMask() const#

Get srcStageMask.

Returns

An PipelineStageFlagBits2KHR structure specifying the source pipeline stage flags

inline void setSrcStageMask(const PipelineStageFlagBits2KHR &inSrcStageMask)#

Set srcStageMask.

Parameters

inSrcStageMask – An PipelineStageFlagBits2KHR structure specifying the source pipeline stage flags

inline const PipelineStageFlagBits2KHR &getDstStageMask() const#

Get dstStageMask.

Returns

An PipelineStageFlagBits2KHR structure specifying the destination pipeline stage flags

inline void setDstStageMask(const PipelineStageFlagBits2KHR &inDstStageMask)#

Set dstStageMask.

Parameters

inDstStageMask – An PipelineStageFlagBits2KHR structure specifying the destination pipeline stage flags

Protected Attributes

pvrvk::PipelineStageFlagBits2KHR srcStageMask#

Bitmask for the pipeline stage source stage mask, which is per-barrier in VK_KHR_synchronization2.

pvrvk::PipelineStageFlagBits2KHR dstStageMask#

Bitmask for the pipeline stage destination stage mask, which is per-barrier in VK_KHR_synchronization2.

BarrierQueueFamilyIndex#

Inheritance Relationships#

Derived Types#

Class Documentation#

class BarrierQueueFamilyIndex#

Subclassed by pvrvk::ImageMemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR >, pvrvk::BufferMemoryBarrier2, pvrvk::ImageMemoryBarrierTemplate< AccessFlagsType >

Public Functions

inline BarrierQueueFamilyIndex()#

Constructor, zero initialization.

inline BarrierQueueFamilyIndex(uint32_t srcQueueFamilyIndexParam, uint32_t dstQueueFamilyIndexParam)#

Constructor, individual elements.

Parameters
  • srcQueueFamilyIndexParam – Source queue index.

  • dstQueueFamilyIndexParam – Destination queue index.

inline uint32_t getSrcQueueFamilyIndex() const#

Get the source queue family index for the image associated with the memory barrier.

Returns

The source queue family index of the image associated with the memory barrier

inline void setSrcQueueFamilyIndex(uint32_t inSrcQueueFamilyIndex)#

Set the source queue family index.

Parameters

inSrcQueueFamilyIndex – The source queue family index of the image associated with the memory barrier

inline uint32_t getDstQueueFamilyIndex() const#

Get the destination queue family index for the image associated with the memory barrier.

Returns

The destination queue family index of the image associated with the memory barrier

inline void setDstQueueFamilyIndex(uint32_t inDstQueueFamilyIndex)#

Set the destination queue family index.

Parameters

inDstQueueFamilyIndex – The destination queue family index of the image associated with the memory barrier

Protected Attributes

uint32_t srcQueueFamilyIndex#

Source queue family for a queue family ownership transfer.

uint32_t dstQueueFamilyIndex#

Destination queue family for a queue family ownership transfer.

BufferMemoryBarrier2#

Inheritance Relationships#

Base Types#

  • public pvrvk::BufferMemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR > (BufferMemoryBarrierTemplate)

  • public pvrvk::BarrierPipelineStageFlag2

  • public pvrvk::BarrierQueueFamilyIndex

Class Documentation#

class BufferMemoryBarrier2 : public pvrvk::BufferMemoryBarrierTemplate<pvrvk::AccessFlagBits2KHR>, public pvrvk::BarrierPipelineStageFlag2, public pvrvk::BarrierQueueFamilyIndex#

A Buffer memory barrier similar to BufferMemoryBarrier but used in VK_KHR_synchronization2.

Public Functions

inline BufferMemoryBarrier2()#

Constructor, zero initialization.

inline BufferMemoryBarrier2(pvrvk::PipelineStageFlagBits2KHR srcStageMask, pvrvk::PipelineStageFlagBits2KHR dstStageMask, pvrvk::AccessFlagBits2KHR srcAccessMask, pvrvk::AccessFlagBits2KHR dstAccessMask, uint32_t srcQueueFamilyIndexParam, uint32_t dstQueueFamilyIndexParam, Buffer buffer, uint32_t offset, uint32_t size)#

Constructor, individual elements.

Parameters
  • srcStageMask – Bitmask for the source pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • dstStageMask – Bitmask for the destination pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • srcAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

  • srcQueueFamilyIndexParam – Source queue family for a queue family ownership transfer.

  • dstQueueFamilyIndexParam – Destination queue family for a queue family ownership transfer

  • buffer – Handle to the buffer whose backing memory is affected by the barrier.

  • offset – Offset in bytes into the backing memory for buffer. This is relative to the base offset as bound to the buffer

  • size – Size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.

BufferMemoryBarrierTemplate#

Inheritance Relationships#

Base Type#

Class Documentation#

template<class AccessFlagsType>
class BufferMemoryBarrierTemplate : public pvrvk::MemoryBarrierTemplate<AccessFlagsType>#

A Buffer memory barrier used only for memory accesses involving a specific range of the specified buffer object. It is also used to transfer ownership of an buffer range from one queue family to another.

Public Functions

inline BufferMemoryBarrierTemplate()#

Constructor, zero initialization.

inline BufferMemoryBarrierTemplate(AccessFlagsType srcAccessMaskParam, AccessFlagsType dstAccessMaskParam, Buffer bufferParam, uint32_t offsetParam, uint32_t sizeParam)#

Constructor, individual elements.

Parameters
  • srcAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

  • bufferParam – Handle to the buffer whose backing memory is affected by the barrier.

  • offsetParam – Offset in bytes into the backing memory for buffer. This is relative to the base offset as bound to the buffer

  • sizeParam – Size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.

inline const Buffer &getBuffer() const#

Get Buffer associated with the memory barrier.

Returns

The PVRVk::Buffer associated with the memory barrier

inline void setBuffer(const Buffer &inBuffer)#

Set buffer associated with the memory barrier.

Parameters

inBuffer – The PVRVk::Buffer associated with the memory barrier

inline uint32_t getSize() const#

Get size corresponding to the slice of the Buffer associated with the memory barrier.

Returns

The size of the range of the PVRVk::Buffer associated with the memory barrier

inline void setSize(uint32_t inSize)#

Set the size of the slice of the buffer associated with the memory barrier.

Parameters

inSize – The size of the slice of the PVRVk::Buffer associated with the memory barrier

inline uint32_t getOffset() const#

Get the offset into the Buffer associated with the memory barrier.

Returns

The offset into PVRVk::Buffer associated with the memory barrier

inline void setOffset(uint32_t inOffset)#

Set the offset into the buffer associated with the memory barrier.

Parameters

inOffset – The offset into the PVRVk::Buffer associated with the memory barrier

Protected Attributes

Buffer buffer#

Handle to the buffer whose backing memory is affected by the barrier.

uint32_t offset#

Offset in bytes into the backing memory for buffer. This is relative to the base offset as bound to the buffer.

uint32_t size#

Size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.

ExtensionFeatures#

Inheritance Relationships#

Derived Types#

Class Documentation#

class ExtensionFeatures#

Base class for physical device extension features abstractions.

Subclassed by pvrvk::FragmentShadingRateFeatures, pvrvk::RayTracingPipelineFeatures

Public Functions

inline virtual void *getVkPtr() = 0#

Get the location of the vulkan physical device features struct.

Returns

Pointer to the beginning of the vulkan struct data (the sType member)

inline virtual StructureType getSType() const = 0#

Get sType.

Returns

Vulkan struct type

inline virtual void *getPNext() const = 0#

Get pNext.

Returns

pNext pointer

virtual ExtensionFeatures &setPNext(void *pNext) = 0#

Set pNext.

Parameters

pNext – pNext pointer

FragmentShadingRate#

Inheritance Relationships#

Base Type#

  • private VkPhysicalDeviceFragmentShadingRateKHR

Class Documentation#

class FragmentShadingRate : private VkPhysicalDeviceFragmentShadingRateKHR#

Defines a fragment shading rate as a fragment size and a bitmask of the MSAA sample counts that can be used with that fragment size. Use pvrvk::PhysicalDevice::getAvailableFragmentShadingRates() to get the available fragment shading rates for a particular physical devices.

Public Functions

inline FragmentShadingRate()#
inline FragmentShadingRate(VkPhysicalDeviceFragmentShadingRateKHR vkType)#
inline FragmentShadingRate(SampleCountFlags sampleCounts, Extent2D fragmentSize)#
inline VkPhysicalDeviceFragmentShadingRateKHR &get()#

Get the vulkan struct equivilent of this class.

Returns

VkPhysicalDeviceFragmentShadingRateKHR struct.

inline const VkPhysicalDeviceFragmentShadingRateKHR &get() const#

Get the vulkan struct equivilent of this class.

Returns

Const VkPhysicalDeviceFragmentShadingRateKHR struct.

inline Extent2D getFragmentSize() const#

Get the [x,y] fragment size that can be used for fragment shading rate functionality.

Returns

[x,y] integers corresponding to a fragment size.

inline SampleCountFlags getSampleCount() const#

Get a bitmask of the possible MSAA sample counts that can be used with the associated fragment size.

Returns

Bitmask of sample counts.

FragmentShadingRateFeatures#

Inheritance Relationships#

Base Types#

  • private VkPhysicalDeviceFragmentShadingRateFeaturesKHR

  • public pvrvk::ExtensionFeatures (ExtensionFeatures)

Class Documentation#

class FragmentShadingRateFeatures : private VkPhysicalDeviceFragmentShadingRateFeaturesKHR, public pvrvk::ExtensionFeatures#

List of supported fragment shading rate features for a physical device.

Public Functions

inline FragmentShadingRateFeatures(void *pNext = nullptr)#
inline FragmentShadingRateFeatures(VkPhysicalDeviceFragmentShadingRateFeaturesKHR vkType)#
inline virtual void *getVkPtr()#

Get the location of the vulkan physical device features struct.

Returns

Pointer to the beginning of the vulkan struct data (the sType member)

inline virtual StructureType getSType() const#

Get sType.

Returns

Vulkan struct type

inline virtual void *getPNext() const#

Get pNext.

Returns

pNext pointer

inline virtual ExtensionFeatures &setPNext(void *pNextPointer)#

Set pNext.

Parameters

pNext – pNext pointer

inline void setPipelineFeature(bool inPipelineFragmentShadingRate)#

Set pipeline fsr feature.

<param name”pipelineFragmentShadingRate”>boolean state

inline void setPrimitiveFeature(bool inPrimitiveFragmentShadingRate)#

Set primitive fsr feature.

<param name”primitiveFragmentShadingRate”>boolean state

inline void setAttachmentFeature(bool inAttachmentFragmentShadingRate)#

Set attachment fsr feature.

<param name”attachmentFragmentShadingRate”>boolean state

inline VkPhysicalDeviceFragmentShadingRateFeaturesKHR &get()#

Get the vulkan struct equivilent of this class.

Returns

VkPhysicalDeviceFragmentShadingRateFeaturesKHR struct

inline bool getPipelineFeature() const#

If members have been populated, returns wherever the pipeline fragment shading rate feature is enabled.

Returns

Bool is true if feature is enabled

inline bool getPrimitiveFeature() const#

If members have been populated, returns wherever the primitive fragment shading rate feature is enabled.

Returns

Bool is true if feature is enabled

inline bool getAttachmentFeature() const#

If members have been populated, returns wherever the attachment fragment shading rate feature is enabled.

Returns

Bool is true if feature is enabled

FragmentShadingRateProperties#

Inheritance Relationships#

Base Type#

  • public VkPhysicalDeviceFragmentShadingRatePropertiesKHR

Class Documentation#

class FragmentShadingRateProperties : public VkPhysicalDeviceFragmentShadingRatePropertiesKHR#

Set of fragment shading rate properties for a physical device.

Public Functions

inline FragmentShadingRateProperties(void *pNext = nullptr)#
inline FragmentShadingRateProperties(VkPhysicalDeviceFragmentShadingRatePropertiesKHR vkType)#
inline VkPhysicalDeviceFragmentShadingRatePropertiesKHR *getVkPtr()#

Get the location of the vulkan physical device features struct.

Returns

Pointer to the beginning of the vulkan struct data (the sType member)

inline VkPhysicalDeviceFragmentShadingRatePropertiesKHR &get()#

Get the vulkan struct equivilent of this class.

Returns

VkPhysicalDeviceFragmentShadingRatePropertiesKHR struct.

inline const VkPhysicalDeviceFragmentShadingRatePropertiesKHR &get() const#

Get the vulkan struct equivilent of this class.

Returns

Const VkPhysicalDeviceFragmentShadingRatePropertiesKHR struct.

inline void *getPNext() const#

Get pNext.

Returns

pNext pointer

inline FragmentShadingRateProperties &setPNext(void *pNextPointer)#

Set pNext.

Parameters

pNext – pNext pointer

ImageMemoryBarrier2#

Inheritance Relationships#

Base Types#

  • public pvrvk::ImageMemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR > (ImageMemoryBarrierTemplate)

  • public pvrvk::BarrierPipelineStageFlag2

Class Documentation#

class ImageMemoryBarrier2 : public pvrvk::ImageMemoryBarrierTemplate<pvrvk::AccessFlagBits2KHR>, public pvrvk::BarrierPipelineStageFlag2#

A Buffer memory barrier similar to ImageMemoryBarrier but used in VK_KHR_synchronization2.

Public Functions

inline ImageMemoryBarrier2()#

Constructor. All flags are zero initialized, and family indexes set to -1.

inline ImageMemoryBarrier2(pvrvk::PipelineStageFlagBits2KHR srcStageMask, pvrvk::PipelineStageFlagBits2KHR dstStageMask, pvrvk::AccessFlagBits2KHR srcMask, pvrvk::AccessFlagBits2KHR dstMask, const Image &image, const ImageSubresourceRange &subresourceRange, pvrvk::ImageLayout oldLayout, pvrvk::ImageLayout newLayout, uint32_t srcQueueFamilyIndex, uint32_t dstQueueFamilyIndex)#

Constructor. Set all individual elements.

Parameters
  • srcStageMask – Bitmask for the source pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • dstStageMask – Bitmask for the destination pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • srcMask – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstMask – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

  • image – Handle to the image affected by this barrier

  • subresourceRange – Describes the image subresource range within image that is affected by this barrier

  • oldLayout – Old layout in an image layout transition.

  • newLayout – New layout in an image layout transition.

  • srcQueueFamilyIndex – Source queue family for a queue family ownership transfer.

  • dstQueueFamilyIndex – Destination queue family for a queue family ownership transfer

ImageMemoryBarrierTemplate#

Inheritance Relationships#

Base Types#

  • public pvrvk::MemoryBarrierTemplate< AccessFlagsType > (MemoryBarrierTemplate)

  • public pvrvk::BarrierQueueFamilyIndex

Class Documentation#

template<class AccessFlagsType>
class ImageMemoryBarrierTemplate : public pvrvk::MemoryBarrierTemplate<AccessFlagsType>, public pvrvk::BarrierQueueFamilyIndex#

A Image memory barrier used only for memory accesses involving a specific subresource range of the specified image object. It is also used to perform a layout transition for an image subresource range, or to transfer ownership of an image subresource range from one queue family to another.

Public Functions

inline ImageMemoryBarrierTemplate()#

Constructor. All flags are zero initialized, and family indexes set to -1.

inline ImageMemoryBarrierTemplate(AccessFlagsType srcMask, AccessFlagsType dstMask, const Image &imageParam, const ImageSubresourceRange &subresourceRangeParam, pvrvk::ImageLayout oldLayoutParam, pvrvk::ImageLayout newLayoutParam, uint32_t srcQueueFamilyIndexParam, uint32_t dstQueueFamilyIndexParam)#

Constructor. Set all individual elements.

Parameters
  • srcMask – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstMask – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

  • imageParam – Handle to the image affected by this barrier

  • subresourceRangeParam – Describes the image subresource range within image that is affected by this barrier

  • oldLayoutParam – Old layout in an image layout transition.

  • newLayoutParam – New layout in an image layout transition.

  • srcQueueFamilyIndexParam – Source queue family for a queue family ownership transfer.

  • dstQueueFamilyIndexParam – Destination queue family for a queue family ownership transfer

inline const ImageLayout &getOldLayout() const#

Get the old image layout of the image associated with the memory barrier.

Returns

The old image layout of the image associated with the memory barrier

inline void setOldLayout(const ImageLayout &inOldLayout)#

Set old image layout.

Parameters

inOldLayout – The old image layout of the image associated memory barrier

inline const ImageLayout &getNewLayout() const#

Get the new image layout of the image associated with the memory barrier.

Returns

The new image layout of the image associated with the memory barrier

inline void setNewLayout(const ImageLayout &inNewLayout)#

Set new image layout.

Parameters

inNewLayout – The new image layout of the image associated memory barrier

inline const Image &getImage() const#

Get Image.

Returns

The PVRVk::Image associated with the memory barrier

inline void setImage(const Image &inImage)#

Set Image.

Parameters

inImage – The PVRVk::Image associated with the memory barrier

inline const ImageSubresourceRange &getSubresourceRange() const#

Get the subresource range of the image associated with the memory barrier.

Returns

The subresource range of the image associated with the memory barrier

inline void setSubresourceRange(const ImageSubresourceRange &inSubresourceRange)#

Set the subresource range of the image associated with the memory barrier.

Parameters

inSubresourceRange – The subresource range of the image associated with the memory barrier

Protected Attributes

pvrvk::ImageLayout oldLayout#

Old layout in an image layout transition.

pvrvk::ImageLayout newLayout#

New layout in an image layout transition.

Image image#

Handle to the image affected by this barrier.

ImageSubresourceRange subresourceRange#

Describes the image subresource range within image that is affected by this barrier.

MemoryBarrier2#

Inheritance Relationships#

Base Types#

  • public pvrvk::MemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR > (MemoryBarrierTemplate)

  • public pvrvk::BarrierPipelineStageFlag2

Class Documentation#

class MemoryBarrier2 : public pvrvk::MemoryBarrierTemplate<pvrvk::AccessFlagBits2KHR>, public pvrvk::BarrierPipelineStageFlag2#

A memory barrier similar to MemoryBarrier but used in VK_KHR_synchronization2.

Public Functions

inline MemoryBarrier2()#

Constructor, zero initialization.

inline MemoryBarrier2(pvrvk::PipelineStageFlagBits2KHR srcStageMask, pvrvk::PipelineStageFlagBits2KHR dstStageMask, pvrvk::AccessFlagBits2KHR srcAccessMask, pvrvk::AccessFlagBits2KHR dstAccessMask)#

Constructor, individual elements.

Parameters
  • srcStageMask – Bitmask for the source pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • dstStageMask – Bitmask for the destination pipeline stage as in VK_KHR_synchronization2 it is defined per barrier.

  • srcAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstAccessMask – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

MemoryBarrierSetTemplate#

Class Documentation#

template<class MemoryBarrierType, class BufferMemoryBarrierType, class ImageMemoryBarrierType>
class MemoryBarrierSetTemplate#

Templatized utility function to hold all the memory, barrier and image barriers for both usual and VK_KHR_synchronization2 structs.

Public Functions

MemoryBarrierSetTemplate() = default#

Constructor. Empty barrier.

inline MemoryBarrierSetTemplate &clearAllBarriers()#

Clear this object of all barriers.

Returns

MemoryBarrierSetTemplate&

inline MemoryBarrierSetTemplate &clearAllMemoryBarriers()#

Clear this object of all Memory barriers.

Returns

MemoryBarrierSetTemplate&

inline MemoryBarrierSetTemplate &clearAllBufferRangeBarriers()#

Clear this object of all Buffer barriers.

Returns

MemoryBarrierSetTemplate&

inline MemoryBarrierSetTemplate &clearAllImageAreaBarriers()#

Clear this object of all Image barriers.

Returns

MemoryBarrierSetTemplate&

inline MemoryBarrierSetTemplate &addBarrier(MemoryBarrierType barrier)#

Add a generic Memory barrier.

Parameters

barrier – The barrier to add

Returns

This object (allow chained calls)

inline MemoryBarrierSetTemplate &addBarrier(const BufferMemoryBarrierType &barrier)#

Add a Buffer Range barrier, signifying that operations on a part of a buffer must complete before other operations on that part of the buffer execute.

Parameters

barrier – The barrier to add

Returns

This object (allow chained calls)

inline MemoryBarrierSetTemplate &addBarrier(const ImageMemoryBarrierType &barrier)#

Add a Buffer Range barrier, signifying that operations on a part of an Image must complete before other operations on that part of the Image execute.

Parameters

barrier – The barrier to add

Returns

This object (allow chained calls)

inline const std::vector<MemoryBarrierType> &getMemoryBarriers() const#

Get an array of the MemoryBarrierType object of this set.

Returns

All MemoryBarrierType objects that this object contains

inline const std::vector<ImageMemoryBarrierType> &getImageBarriers() const#

Get an array of the Image Barriers of this set.

Returns

All MemoryBarrierType objects that this object contains

inline const std::vector<BufferMemoryBarrierType> &getBufferBarriers() const#

Get an array of the Buffer Barriers of this set.

Returns

All MemoryBarrierType objects that this object contains

MemoryBarrierTemplate#

Inheritance Relationships#

Derived Types#

Class Documentation#

template<class AccessFlagsType>
class MemoryBarrierTemplate#

A Global memory barrier used for memory accesses for all memory objects.

Subclassed by pvrvk::BufferMemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR >, pvrvk::ImageMemoryBarrierTemplate< pvrvk::AccessFlagBits2KHR >, pvrvk::BufferMemoryBarrierTemplate< AccessFlagsType >, pvrvk::ImageMemoryBarrierTemplate< AccessFlagsType >

Public Functions

inline MemoryBarrierTemplate()#

Constructor, zero initialization.

inline MemoryBarrierTemplate(AccessFlagsType srcAccessMaskParam, AccessFlagsType dstAccessMaskParam)#

Constructor, setting all members.

Parameters
  • srcAccessMaskParam – Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

  • dstAccessMaskParam – Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

inline const AccessFlagsType &getSrcAccessMask() const#

Get srcAccessMask.

Returns

An AccessFlagsType structure specifying the source memory barrier access flags

inline void setSrcAccessMask(const AccessFlagsType &inSrcAccessMask)#

Set srcAccessMask.

Parameters

inSrcAccessMask – An AccessFlagsType structure specifying the source memory barrier access flags

inline const AccessFlagsType &getDstAccessMask() const#

Get dstAccessMask.

Returns

An AccessFlagsType structure specifying the destination memory barrier access flags

inline void setDstAccessMask(const AccessFlagsType &inDstAccessMask)#

Set dstAccessMask.

Parameters

inDstAccessMask – An AccessFlagsType structure specifying the destination memory barrier access flags

Protected Attributes

AccessFlagsType srcAccessMask#

Bitmask of pvrvk::AccessFlagBits specifying a source access mask.

AccessFlagsType dstAccessMask#

Bitmask of pvrvk::AccessFlagBits specifying a destination access mask.

RayTracingPipelineFeatures#

Inheritance Relationships#

Base Types#

  • private VkPhysicalDeviceRayTracingPipelineFeaturesKHR

  • public pvrvk::ExtensionFeatures (ExtensionFeatures)

Class Documentation#

class RayTracingPipelineFeatures : private VkPhysicalDeviceRayTracingPipelineFeaturesKHR, public pvrvk::ExtensionFeatures#

List of supported ray tracing features for a physical device.

Public Functions

inline RayTracingPipelineFeatures(void *pNext = nullptr)#
inline RayTracingPipelineFeatures(VkPhysicalDeviceRayTracingPipelineFeaturesKHR vkType)#
inline virtual void *getVkPtr()#

Get the location of the vulkan physical device features struct.

Returns

Pointer to the beginning of the vulkan struct data (the sType member)

inline virtual StructureType getSType() const#

Get sType.

Returns

Vulkan struct type

inline virtual void *getPNext() const#

Get pNext.

Returns

pNext pointer

inline virtual ExtensionFeatures &setPNext(void *pNextPointer)#

Set pNext.

Parameters

pNext – pNext pointer

inline VkPhysicalDeviceRayTracingPipelineFeaturesKHR &get()#

Get the vulkan struct equivilent of this class.

Returns

VkPhysicalDeviceFragmentShadingRateFeaturesKHR struct

inline bool getRayTracingPipeline()#

Get boolean value indicating ray tracing pipeline support.

Returns

Indicates whether the implementation supports the ray tracing pipeline functionality

inline bool getRayTracingPipelineShaderGroupHandleCaptureReplay()#

Get boolean value indicating ray tracing pipeline shader group handle capture replay support.

Returns

Indicates whether the implementation supports saving and reusing shader group handles

inline bool getRayTracingPipelineShaderGroupHandleCaptureReplayMixed()#

Get boolean value indicating ray tracing pipeline shader group handle capture replay mixed support.

Returns

Indicates whether the implementation supports reuse of shader group handles being arbitrarily mixed with creation of non-reused shader group handles. If this is VK_FALSE, all reused shader group handles must be specified before any non-reused handles may be created.

inline bool getRayTracingPipelineTraceRaysIndirect()#

Get boolean value indicating ray tracing pipeline indirect trace rays support.

Returns

Indicates whether the implementation supports indirect trace ray commands e.g. vkCmdTraceRaysIndirect

inline bool getRayTraversalPrimitiveCulling()#

Get boolean value indicating ray traversal primitive culling support.

Returns

Indicates whether the implementation supports primitive culling during ray traversal