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

Method CopyRec

vgpu/image.go:890–903  ·  view source on GitHub ↗

CopyRec returns info for this Image for the BufferImageCopy operations

()

Source from the content-addressed store, hash-verified

888
889// CopyRec returns info for this Image for the BufferImageCopy operations
890func (im *Image) CopyRec() vk.BufferImageCopy {
891 w, h := im.Format.Size32()
892 reg := vk.BufferImageCopy{
893 BufferOffset: vk.DeviceSize(im.Host.Offset),
894 BufferRowLength: 0, // packed default
895 BufferImageHeight: 0,
896 }
897 reg.ImageSubresource.AspectMask = vk.ImageAspectFlags(vk.ImageAspectColorBit)
898 reg.ImageSubresource.LayerCount = uint32(im.Format.Layers)
899 reg.ImageExtent.Width = w
900 reg.ImageExtent.Height = h
901 reg.ImageExtent.Depth = 1
902 return reg
903}
904
905// CopyImageRec returns info for this Image for the ImageCopy operations
906func (im *Image) CopyImageRec() vk.ImageCopy {

Callers 2

TransferTexturesToGPUMethod · 0.80
TransferImagesFromGPUMethod · 0.80

Calls 1

Size32Method · 0.80

Tested by

no test coverage detected