Exemplo n.º 1
0
        public unsafe void CopyBuffer(
            Buffer source,
            Buffer destination
            )
        {
            if (source.Size > destination.Size)
            {
                throw new InvalidOperationException("source size cannot be greater than destination");
            }

            var region = new VkBufferCopy
            {
                dstOffset = 0,
                srcOffset = 0,
                size      = source.Size
            };

            VulkanNative.vkCmdCopyBuffer(
                _handle,
                source.Handle,
                destination.Handle,
                1,
                &region
                );
        }