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

Method CopyImageRec

vgpu/image.go:906–917  ·  view source on GitHub ↗

CopyImageRec returns info for this Image for the ImageCopy operations

()

Source from the content-addressed store, hash-verified

904
905// CopyImageRec returns info for this Image for the ImageCopy operations
906func (im *Image) CopyImageRec() vk.ImageCopy {
907 w, h := im.Format.Size32()
908 reg := vk.ImageCopy{}
909 reg.SrcSubresource.AspectMask = vk.ImageAspectFlags(vk.ImageAspectColorBit)
910 reg.SrcSubresource.LayerCount = uint32(im.Format.Layers)
911 reg.DstSubresource.AspectMask = vk.ImageAspectFlags(vk.ImageAspectColorBit)
912 reg.DstSubresource.LayerCount = uint32(im.Format.Layers)
913 reg.Extent.Width = w
914 reg.Extent.Height = h
915 reg.Extent.Depth = 1
916 return reg
917}
918
919/////////////////////////////////////////////////////////////////////
920// Transition -- prepare device images for different roles

Callers 2

GrabImageMethod · 0.80
CopyToImageMethod · 0.80

Calls 1

Size32Method · 0.80

Tested by

no test coverage detected