nCine/Graphics/RHI/Vulkan/VulkanCommon.h file

Namespaces

namespace nCine
Root namespace of nCine game engine.
namespace nCine::RHI
Render Hardware Interface — compile-time-selectable graphics backend abstraction.
namespace nCine::RHI::Vulkan
Vulkan backend, selected by WITH_RHI_VULKAN.

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_HANDLE before 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 typeBits with all properties, or UINT32_MAX if 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 count attachments with the given formats.

Defines

#define VK_NO_PROTOTYPES