Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFree = errors.New("illegal free() call")
View Source
var ErrOutOfMemory = errors.New("out of memory")
Functions ¶
func GetBufferLimits ¶
func GetBufferLimits(device *device.Device, usage core1_0.BufferUsageFlags) (align, max int)
func NewBlockAllocator ¶
func NewBlockAllocator(buf T) *blockAlloc
Types ¶
type Args ¶
type Args struct { Key string Size int Usage core1_0.BufferUsageFlags Memory device.MemoryType }
type Array ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func NewGpuLocal ¶
type Item ¶
type T ¶
type T interface { device.Resource[core1_0.Buffer] // Size returns the total allocation size of the buffer in bytes Size() int // Read directly from the buffer at the given offset Read(offset int, data any) int // Write directly to the buffer at the given offset Write(offset int, data any) int Flush() // Memory returns a handle to the underlying memory block Memory() *device.Memory Address() device.Address }
Click to show internal directories.
Click to hide internal directories.