Versions in this module Expand all Collapse all v2 v2.3.0 Jun 23, 2020 Changes in this version + const AllocationCreateCanBecomeLost + const AllocationCreateCanMakeOtherLost + const AllocationCreateDedicatedMemory + const AllocationCreateDontBind + const AllocationCreateFlagBitsMaxEnum + const AllocationCreateMapped + const AllocationCreateNeverAllocate + const AllocationCreateStrategyBestFit + const AllocationCreateStrategyFirstFit + const AllocationCreateStrategyMask + const AllocationCreateStrategyMinFragmentation + const AllocationCreateStrategyMinMemory + const AllocationCreateStrategyMinTime + const AllocationCreateStrategyWorstFit + const AllocationCreateUpperAddress + const AllocationCreateUserDataCopyString + const AllocatorCreateAMDDeviceCoherentMemory + const AllocatorCreateBindMemory2 + const AllocatorCreateBufferDeviceAddress + const AllocatorCreateDedicatedAllocation + const AllocatorCreateExternallySynchronized + const AllocatorCreateFlagBitsMaxEnum + const AllocatorCreateMemoryBudget + const DefragmentationFlagBitsMaxEnum + const DefragmentationFlagIncremental + const MemoryUsageCPUCopy + const MemoryUsageCPUOnly + const MemoryUsageCPUToGPU + const MemoryUsageGPULazilyAllocated + const MemoryUsageGPUOnly + const MemoryUsageGPUToCPU + const MemoryUsageUnknown + const MemoryUsageUsageMaxEnum + const PoolCreateAlgorithmMask + const PoolCreateBuddyAlgorithm + const PoolCreateFlagBitsMaxEnum + const PoolCreateIgnoreBufferImageGranularity + const PoolCreateLinearAlgorithm + const RecordFlagBitsMaxEnum + const RecordFlushAfterCall + var ErrorAlreadyUnmapped = errors.New("memory already unmapped") + var ErrorBufferIsFull = errors.New("attempting to write into a full buffer") + type Allocation C.VmaAllocation + type AllocationCreateInfo struct + Flags uint32 + MemoryTypeBits uint32 + Pool Pool + PreferredFlags uint32 + RequiredFlags uint32 + Usage uint32 + UserData unsafe.Pointer + type AllocationInfo C.VmaAllocationInfo + func (a *AllocationInfo) DeviceMemory() vk.DeviceMemory + func (a *AllocationInfo) MappedData() unsafe.Pointer + func (a *AllocationInfo) MemoryType() uint32 + func (a *AllocationInfo) Offset() vk.DeviceSize + func (a *AllocationInfo) Size() vk.DeviceSize + func (a *AllocationInfo) UserData() unsafe.Pointer + type Allocator struct + func NewAllocator(c *AllocatorCreateInfo) (*Allocator, error) + func (a *Allocator) AllocateMemory(memoryRequirements *vk.MemoryRequirements, createInfo *AllocationCreateInfo, ...) (Allocation, AllocationInfo, error) + func (a *Allocator) AllocateMemoryForBuffer(buffer vk.Buffer, createInfo *AllocationCreateInfo, returnInfo bool) (Allocation, AllocationInfo, error) + func (a *Allocator) AllocateMemoryForImage(image vk.Image, createInfo *AllocationCreateInfo, returnInfo bool) (Allocation, AllocationInfo, error) + func (a *Allocator) AllocateMemoryPages(memoryRequirements *vk.MemoryRequirements, createInfo *AllocationCreateInfo, ...) ([]Allocation, []AllocationInfo, error) + func (a *Allocator) BindBufferMemory(allocation Allocation, buffer vk.Buffer) error + func (a *Allocator) BindBufferMemory2(allocation Allocation, offset vk.DeviceSize, buffer vk.Buffer, ...) error + func (a *Allocator) BindImageMemory(allocation Allocation, image vk.Image) error + func (a *Allocator) BindImageMemory2(allocation Allocation, offset vk.DeviceSize, image vk.Image, ...) error + func (a *Allocator) BuildStatsString(detailedMap bool) string + func (a *Allocator) CalculateStats() Stats + func (a *Allocator) CheckCorruption(memoryTypeBits uint32) vk.Result + func (a *Allocator) CheckPoolCorruption(pool Pool) vk.Result + func (a *Allocator) CreateBuffer(bufferCreateInfo *vk.BufferCreateInfo, ...) (vk.Buffer, Allocation, AllocationInfo, error) + func (a *Allocator) CreateImage(imageCreateInfo *vk.ImageCreateInfo, ...) (vk.Image, Allocation, AllocationInfo, error) + func (a *Allocator) CreateLostAllocation() Allocation + func (a *Allocator) CreatePool(createInfo *PoolCreateInfo) (Pool, error) + func (a *Allocator) DefragmentationBegin(info *DefragmentationInfo2) (DefragmentationStats, DefragmentationContext, error) + func (a *Allocator) DefragmentationEnd(context DefragmentationContext) error + func (a *Allocator) Destroy() + func (a *Allocator) DestroyBuffer(buffer vk.Buffer, allocation Allocation) + func (a *Allocator) DestroyImage(image vk.Image, allocation Allocation) + func (a *Allocator) DestroyPool(pool Pool) + func (a *Allocator) FindMemoryTypeIndex(memoryTypeBits uint32, allocationCreateInfo *AllocationCreateInfo) (uint32, error) + func (a *Allocator) FindMemoryTypeIndexForBufferInfo(bufferCreateInfo *vk.BufferCreateInfo, ...) (uint32, error) + func (a *Allocator) FindMemoryTypeIndexForImageInfo(imageCreateInfo *vk.ImageCreateInfo, ...) (uint32, error) + func (a *Allocator) FlushAllocation(allocation Allocation, offset vk.DeviceSize, size vk.DeviceSize) + func (a *Allocator) FreeMemory(allocation Allocation) + func (a *Allocator) FreeMemoryPages(allocations []Allocation) + func (a *Allocator) GetAllocationInfo(allocation Allocation) AllocationInfo + func (a *Allocator) GetBudget() Budget + func (a *Allocator) GetMemoryProperties() *vk.PhysicalDeviceMemoryProperties + func (a *Allocator) GetMemoryTypeProperties(memoryTypeIndex uint32) vk.MemoryPropertyFlags + func (a *Allocator) GetPhysicalDeviceProperties() *vk.PhysicalDeviceProperties + func (a *Allocator) GetPoolName(pool Pool) string + func (a *Allocator) GetPoolStats(pool Pool) PoolStats + func (a *Allocator) InvalidateAllocation(allocation Allocation, offset vk.DeviceSize, size vk.DeviceSize) + func (a *Allocator) MakePoolAllocationsLost(pool Pool) int + func (a *Allocator) MapMemory(allocation Allocation) (uintptr, error) + func (a *Allocator) NewReadWriter(allocation Allocation, size uint64) (ReadWriter, error) + func (a *Allocator) NewReadWriterSimple(allocation Allocation) (ReadWriter, error) + func (a *Allocator) SetAllocationUserData(allocation Allocation, userData unsafe.Pointer) + func (a *Allocator) SetCurrentFrameIndex(frameIndex uint32) + func (a *Allocator) SetPoolName(pool Pool, name string) + func (a *Allocator) TouchAllocation(allocation Allocation) bool + func (a *Allocator) UnmapMemory(allocation Allocation) + type AllocatorCreateInfo struct + Device vk.Device + Flags uint32 + FrameInUseCount uint32 + HeapSizeLimit []vk.DeviceSize + Instance vk.Instance + PhysicalDevice vk.PhysicalDevice + PreferredLargeHeapBlockSize vk.DeviceSize + VulkanAPIVersion uint32 + VulkanProcAddr unsafe.Pointer + type Budget struct + AllocationBytes uint64 + BlockBytes uint64 + Budget uint64 + Usage uint64 + type DefragmentationContext C.VmaDefragmentationContext + type DefragmentationInfo2 struct + Allocations []Allocation + AllocationsChanged []vk.Bool32 + CommandBuffer vk.CommandBuffer + Flags uint32 + MaxCPUAllocationsToMove uint32 + MaxCPUBytesToMove vk.DeviceSize + MaxGPUAllocationsToMove uint32 + MaxGPUBytesToMove vk.DeviceSize + Pools []Pool + type DefragmentationStats struct + AllocationsMoved uint32 + BytesFreed vk.DeviceSize + BytesMoved vk.DeviceSize + DeviceMemoryBlocksFreed uint32 + type Pool C.VmaPool + type PoolCreateInfo struct + BlockSize vk.DeviceSize + Flags uint32 + FrameInUseCount uint32 + MaxBlockCount uint + MemoryTypeIndex uint32 + MinBlockCount uint + type PoolStats C.VmaPoolStats + type ReadWriter struct + func (rw *ReadWriter) Buffer() []byte + func (rw *ReadWriter) Close() error + func (rw *ReadWriter) Pointer() unsafe.Pointer + func (rw *ReadWriter) Read(p []byte) (n int, err error) + func (rw *ReadWriter) ReadAny(v interface{}) (n int, err error) + func (rw *ReadWriter) ReadToPointer(dstPtr unsafe.Pointer, size uint64) (n int, err error) + func (rw *ReadWriter) Reset() + func (rw *ReadWriter) Write(p []byte) (n int, err error) + func (rw *ReadWriter) WriteAny(v interface{}) (n int, err error) + func (rw *ReadWriter) WriteFromPointer(srcPtr unsafe.Pointer, size uint64) (n int, err error) + type StatInfo C.VmaStatInfo + type Stats C.VmaStats