CopyRec returns info for this Image for the BufferImageCopy operations
()
| 888 | |
| 889 | // CopyRec returns info for this Image for the BufferImageCopy operations |
| 890 | func (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 |
| 906 | func (im *Image) CopyImageRec() vk.ImageCopy { |
no test coverage detected