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

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

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

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

            VkFramebufferCreateInfo.Raw result;
            result.sType           = VkStructureType.FramebufferCreateInfo;
            result.pNext           = pNext;
            result.flags           = s.Flags;
            result.renderPass      = s.RenderPass?.Handle ?? VkRenderPass.HandleType.Null;
            result.attachmentCount = s.Attachments?.Count ?? 0;
            result.pAttachments    = pAttachments;
            result.width           = s.Width;
            result.height          = s.Height;
            result.layers          = s.Layers;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkFramebufferCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkFramebufferCreateInfo.Raw.SizeInBytes;