TransferImagesFromGPU transfers image memory from GPU to CPU for given images. the image Host.Offset *must* be accurate for the given buffer, whether its own individual buffer or the shared memory-managed buffer.
(buff vk.Buffer, imgs ...*Image)
| 604 | // the image Host.Offset *must* be accurate for the given buffer, whether its own |
| 605 | // individual buffer or the shared memory-managed buffer. |
| 606 | func (mm *Memory) TransferImagesFromGPU(buff vk.Buffer, imgs ...*Image) { |
| 607 | cmd := mm.CmdPool.NewBuffer(&mm.Device) |
| 608 | CmdBeginOneTime(cmd) |
| 609 | |
| 610 | for _, im := range imgs { |
| 611 | vk.CmdCopyImageToBuffer(cmd, im.Image, vk.ImageLayoutTransferDstOptimal, buff, 1, []vk.BufferImageCopy{im.CopyRec()}) |
| 612 | } |
| 613 | mm.CmdPool.EndSubmitWaitFree(&mm.Device) |
| 614 | } |
| 615 | |
| 616 | // TransferAllValuesTextures copies all vals images from host buffer to device memory |
| 617 | func (mm *Memory) TransferAllValuesTextures(buff *MemBuff) { |
nothing calls this directly
no test coverage detected