public static int SizeOfMarshalDirect(this VkCommandBufferAllocateInfo s)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            return
                (s.Next.SizeOfMarshalIndirect());
        }
        public static VkCommandBufferAllocateInfo.Raw *MarshalIndirect(this VkCommandBufferAllocateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkCommandBufferAllocateInfo.Raw *) 0);
            }
            var result = (VkCommandBufferAllocateInfo.Raw *)unmanaged;

            unmanaged += VkCommandBufferAllocateInfo.Raw.SizeInBytes;
            *result = s.MarshalDirect(ref unmanaged);
            return(result);
        }
        public static VkCommandBufferAllocateInfo.Raw MarshalDirect(this VkCommandBufferAllocateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            var pNext = s.Next.MarshalIndirect(ref unmanaged);

            VkCommandBufferAllocateInfo.Raw result;
            result.sType              = VkStructureType.CommandBufferAllocateInfo;
            result.pNext              = pNext;
            result.commandPool        = s.CommandPool?.Handle ?? VkCommandPool.HandleType.Null;
            result.level              = s.Level;
            result.commandBufferCount = s.CommandBufferCount;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkCommandBufferAllocateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkCommandBufferAllocateInfo.Raw.SizeInBytes;