Vulkan namespace
Vulkan backend, selected by WITH_RHI_VULKAN.
Namespaces
- namespace UniformTypeInfo
- Free-function helpers that classify reflected uniform types (component count, float-ness).
Classes
- class VulkanAttribute
- Reflected metadata of a single active vertex attribute (aliased as
RHI::Attribute). - class VulkanBufferObject
- Buffer object of the Vulkan backend (aliased as
RHI::Buffer). - class VulkanDebug
- Debug-output and object-labelling stub of the Vulkan backend.
- class VulkanDevice
- Pipeline-state and draw-call facade of the Vulkan backend (aliased as
RHI::Device). - class VulkanFramebuffer
- Framebuffer stub of the Vulkan backend (aliased as
RHI::Framebuffer). - class VulkanRenderbuffer
- Renderbuffer stub of the Vulkan backend (aliased as
RHI::Renderbuffer). - class VulkanRenderTarget
- Off-screen render target of the Vulkan backend (aliased as
RHI::RenderTarget). - class VulkanShader
- Shader-object stub of the Vulkan backend.
- class VulkanShaderProgram
- Shader program of the Vulkan backend (aliased as
RHI::ShaderProgram). - class VulkanShaderUniformBlocks
- Manages the uniform-block caches of a program (aliased as
RHI::ShaderUniformBlocks). - class VulkanShaderUniforms
- Manages the loose-uniform caches of a program (aliased as
RHI::ShaderUniforms). - class VulkanTexture
- Texture object of the Vulkan backend (aliased as
RHI::Texture). - class VulkanUniform
- Reflected metadata of a single active uniform (aliased as
RHI::Uniform). - class VulkanUniformBlock
- Reflected metadata of a single active uniform block (aliased as
RHI::UniformBlock). - class VulkanUniformBlockCache
- Caches the contents of a uniform block (aliased as
RHI::UniformBlockCache). - class VulkanUniformCache
- Caches the host-side value of a single uniform (aliased as
RHI::UniformCache). - class VulkanVertexArray
- Vertex array object stub of the Vulkan backend (aliased as
RHI::VertexArray). - class VulkanVertexFormat
- Vertex layout description of the Vulkan backend (aliased as
RHI::VertexFormat).
Enums
-
enum class VkDeferredResource : std::
uint32_t { Image, ImageView, Sampler, Buffer, DeviceMemory, Framebuffer } - Kind of Vulkan handle handed to VkEnqueueDestroy() (selects the right
vkDestroy*/vkFreeMemory).
Functions
- auto VkDeviceHandle() -> VkDevice
- The logical device, or
VK_NULL_HANDLEbefore creation / after teardown. - auto VkPhysicalDeviceHandle() -> VkPhysicalDevice
- The selected physical device.
-
auto VkFindMemoryType(std::
uint32_t typeBits, VkMemoryPropertyFlags properties) -> std:: uint32_t - Returns a memory type index satisfying
typeBitswith allproperties, orUINT32_MAXif none. - auto VkMinUniformBufferOffsetAlignment() -> VkDeviceSize
- The device's minimum uniform-buffer bind-offset alignment (for the per-frame uniform ring).
- auto VkBeginOneTimeCommands() -> VkCommandBuffer
- Allocates + begins a one-time-submit primary command buffer from the shared graphics pool.
- void VkEndOneTimeCommands(VkCommandBuffer commandBuffer)
- Ends, submits and waits on a command buffer from VkBeginOneTimeCommands(), then frees it.
-
void VkRegisterFrameStaging(std::
uint64_t buffer, std:: uint64_t memory) - Hands a texture-upload staging buffer/memory to the current in-flight frame for deferred destruction.
-
void VkEnqueueDestroy(VkDeferredResource type,
std::
uint64_t handle) - Enqueues a GPU resource handle for destruction once no in-flight frame can still reference it.
- auto VkGetColorRenderPass(VkFormat format) -> VkRenderPass
- Returns (creating/caching on first use) a single-color-attachment render pass for
format(loadOp LOAD, storeOp STORE, layout COLOR_ATTACHMENT_OPTIMAL). -
auto VkGetColorRenderPassMrt(const VkFormat* formats,
std::
uint32_t count) -> VkRenderPass - Returns (creating/caching on first use) a color-only render pass over
countattachments with the given formats.
Enum documentation
enum class nCine:: RHI:: Vulkan:: VkDeferredResource : std:: uint32_t
Kind of Vulkan handle handed to VkEnqueueDestroy() (selects the right vkDestroy* / vkFreeMemory).
Function documentation
VkDevice nCine:: RHI:: Vulkan:: VkDeviceHandle()
The logical device, or VK_NULL_HANDLE before creation / after teardown.
VkPhysicalDevice nCine:: RHI:: Vulkan:: VkPhysicalDeviceHandle()
The selected physical device.
std:: uint32_t nCine:: RHI:: Vulkan:: VkFindMemoryType(std:: uint32_t typeBits,
VkMemoryPropertyFlags properties)
Returns a memory type index satisfying typeBits with all properties, or UINT32_MAX if none.
VkDeviceSize nCine:: RHI:: Vulkan:: VkMinUniformBufferOffsetAlignment()
The device's minimum uniform-buffer bind-offset alignment (for the per-frame uniform ring).
VkCommandBuffer nCine:: RHI:: Vulkan:: VkBeginOneTimeCommands()
Allocates + begins a one-time-submit primary command buffer from the shared graphics pool.
Used by the resource classes for out-of-frame uploads / layout transitions (texture staging copies). Pair with VkEndOneTimeCommands(), which submits it and waits for the graphics queue to go idle. Returns VK_NULL_HANDLE if the device is not ready.
void nCine:: RHI:: Vulkan:: VkEndOneTimeCommands(VkCommandBuffer commandBuffer)
Ends, submits and waits on a command buffer from VkBeginOneTimeCommands(), then frees it.
void nCine:: RHI:: Vulkan:: VkRegisterFrameStaging(std:: uint64_t buffer,
std:: uint64_t memory)
Hands a texture-upload staging buffer/memory to the current in-flight frame for deferred destruction.
Used by VulkanTexture::VkBuffer / VkDeviceMemory as std::uint64_t) are freed the next time that frame slot is recorded, once its fence has signalled.
void nCine:: RHI:: Vulkan:: VkEnqueueDestroy(VkDeferredResource type,
std:: uint64_t handle)
Enqueues a GPU resource handle for destruction once no in-flight frame can still reference it.
The handle (an opaque Vk* cast to std::uint64_t) is freed by the device a full MaxFramesInFlight fence cycle later (see the deferred-destroy tick in BeginFrame), guaranteeing every command buffer that could reference it has completed first. A zero handle is ignored. If the device is already gone (VK_NULL_HANDLE, teardown) the call is a no-op: vkDestroyDevice implicitly destroys every child object, so nothing is (or can be) freed and nothing is in flight.
VkRenderPass nCine:: RHI:: Vulkan:: VkGetColorRenderPass(VkFormat format)
Returns (creating/caching on first use) a single-color-attachment render pass for format (loadOp LOAD, storeOp STORE, layout COLOR_ATTACHMENT_OPTIMAL).
VkRenderPass nCine:: RHI:: Vulkan:: VkGetColorRenderPassMrt(const VkFormat* formats,
std:: uint32_t count)
Returns (creating/caching on first use) a color-only render pass over count attachments with the given formats.
The multi-render-target generalization of VkGetColorRenderPass(): the cache is keyed by the full attachment-format signature (count + formats), every attachment uses loadOp LOAD / storeOp STORE and stays in COLOR_ATTACHMENT_OPTIMAL, and the single subpass writes all count attachments. Returns VK_NULL_HANDLE if count is 0 or exceeds the render-target contract's attachment limit.