MCPcopy Create free account
hub / github.com/cogentcore/core / ConfigValueHost

Method ConfigValueHost

vgpu/image.go:876–887  ·  view source on GitHub ↗

ConfigValueHost configures host staging buffer from memory buffer for val-owned image

(buff *MemBuff, buffPtr unsafe.Pointer, offset int)

Source from the content-addressed store, hash-verified

874
875// ConfigValueHost configures host staging buffer from memory buffer for val-owned image
876func (im *Image) ConfigValueHost(buff *MemBuff, buffPtr unsafe.Pointer, offset int) {
877 if im.IsHostOwner() {
878 return
879 }
880 imsz := im.Format.TotalByteSize()
881 im.Host.Buff = buff.Host
882 im.Host.Mem = vk.NullDeviceMemory
883 im.Host.Size = imsz
884 im.Host.Ptr = unsafe.Pointer(uintptr(buffPtr) + uintptr(offset))
885 im.Host.Offset = offset
886 im.SetFlag(true, ImageIsValue, ImageHostActive)
887}
888
889// CopyRec returns info for this Image for the BufferImageCopy operations
890func (im *Image) CopyRec() vk.BufferImageCopy {

Callers 1

AllocHostMethod · 0.80

Calls 3

IsHostOwnerMethod · 0.95
SetFlagMethod · 0.95
TotalByteSizeMethod · 0.80

Tested by

no test coverage detected