semicongine/rendering/memory

Procs

proc `[]`[T, S](a: GPUArray[T, S]; i: SomeInteger): T
proc `[]=`[T, S](a: var GPUArray[T, S]; i: SomeInteger; value: T)
proc allocateNewMemoryBlock(size: uint64; mType: uint32): MemoryBlock {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
proc asGPUArray[T](data: sink openArray[T]; bufferType: static BufferType): auto
proc asGPUValue[T](data: sink T; bufferType: static BufferType): auto
proc assignBuffers(renderdata: var RenderData;
                   descriptorSet: var DescriptorSetData; uploadData = true)
proc assignBuffers[T](renderdata: var RenderData; data: var T; uploadData = true)
proc destroyRenderData(renderData: RenderData) {....raises: [Exception],
    tags: [RootEffect], forbids: [].}
proc flushAllMemory(renderData: RenderData) {....raises: [Exception],
    tags: [RootEffect], forbids: [].}
proc flushBuffer(buffer: Buffer) {....raises: [Exception], tags: [RootEffect],
                                   forbids: [].}
func getBufferType[A, B](value: GPUValue[A, B]): BufferType {.compileTime.}
func getBufferType[A, B](value: openArray[GPUValue[A, B]]): BufferType {.
    compileTime.}
proc initDescriptorSet(renderData: RenderData; layout: VkDescriptorSetLayout;
                       descriptorSet: DescriptorSetData)
proc initRenderData(descriptorPoolLimit = 1024'u32): RenderData {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
proc len[T, S](a: GPUArray[T, S]): int
func size(image: ImageObject): uint64
proc updateAllGPUBuffers[T](value: T; flush = false)
proc updateGPUBuffer(gpuData: GPUData; count = 0'u64; flush = false)

Templates

template size(gpuArray: GPUArray; count = 0'u64): uint64
template size(gpuValue: GPUValue): uint64