3. Handles — RAII ownership wrappers (one per Vulkan handle)

RAII ownership wrappers — one struct per Vulkan handle (Instance, Device, Image, CommandPool, …). Each wrapper carries its raw handle plus the parent it was created from, and its finalize calls the matching vkDestroy* / vkFree* when the owner goes out of scope. Declare owners with var inscope so they destroy in reverse order; use weak_copy from vulkan_runtime for an intentional non-owning alias.

3.1. Structures

Instance

struct Instance

PhysicalDevice

struct PhysicalDevice

Device

struct Device

Queue

struct Queue

CommandBuffer

struct CommandBuffer

DeviceMemory

struct DeviceMemory

CommandPool

struct CommandPool

Buffer

struct Buffer

BufferView

struct BufferView

Image

struct Image

ImageView

struct ImageView

ShaderModule

struct ShaderModule

Pipeline

struct Pipeline

PipelineLayout

struct PipelineLayout

Sampler

struct Sampler

DescriptorSet

struct DescriptorSet

DescriptorSetLayout

struct DescriptorSetLayout

DescriptorPool

struct DescriptorPool

Fence

struct Fence

Semaphore

struct Semaphore

Event

struct Event

QueryPool

struct QueryPool

Framebuffer

struct Framebuffer

RenderPass

struct RenderPass

PipelineCache

struct PipelineCache

PipelineBinaryKHR

struct PipelineBinaryKHR

IndirectCommandsLayoutNV

struct IndirectCommandsLayoutNV

IndirectCommandsLayoutEXT

struct IndirectCommandsLayoutEXT

IndirectExecutionSetEXT

struct IndirectExecutionSetEXT

DescriptorUpdateTemplate

struct DescriptorUpdateTemplate

SamplerYcbcrConversion

struct SamplerYcbcrConversion

ValidationCacheEXT

struct ValidationCacheEXT

AccelerationStructureKHR

struct AccelerationStructureKHR

AccelerationStructureNV

struct AccelerationStructureNV

PerformanceConfigurationINTEL

struct PerformanceConfigurationINTEL

DeferredOperationKHR

struct DeferredOperationKHR

PrivateDataSlot

struct PrivateDataSlot

CuModuleNVX

struct CuModuleNVX

CuFunctionNVX

struct CuFunctionNVX

OpticalFlowSessionNV

struct OpticalFlowSessionNV

MicromapEXT

struct MicromapEXT

ShaderEXT

struct ShaderEXT

TensorARM

struct TensorARM

TensorViewARM

struct TensorViewARM

DataGraphPipelineSessionARM

struct DataGraphPipelineSessionARM

ShaderInstrumentationARM

struct ShaderInstrumentationARM

DisplayKHR

struct DisplayKHR

DisplayModeKHR

struct DisplayModeKHR

SurfaceKHR

struct SurfaceKHR

SwapchainKHR

struct SwapchainKHR

DebugReportCallbackEXT

struct DebugReportCallbackEXT

DebugUtilsMessengerEXT

struct DebugUtilsMessengerEXT

VideoSessionKHR

struct VideoSessionKHR

VideoSessionParametersKHR

struct VideoSessionParametersKHR

ExternalComputeQueueNV

struct ExternalComputeQueueNV