public static VkSubpassDescription.Raw *MarshalIndirect(this VkSubpassDescription s, ref byte *unmanaged)
        {
            var result = (VkSubpassDescription.Raw *)unmanaged;

            unmanaged += VkSubpassDescription.Raw.SizeInBytes;
            *result = s.MarshalDirect(ref unmanaged);
            return(result);
        }
 public static int SizeOfMarshalDirect(this VkSubpassDescription s)
 {
     return
         (s.InputAttachments.SizeOfMarshalDirect() +
          s.ColorAttachments.SizeOfMarshalDirect() +
          s.ResolveAttachments.SizeOfMarshalDirect() +
          s.DepthStencilAttachment.SizeOfMarshalIndirect() +
          s.PreserveAttachments.SizeOfMarshalDirect());
 }
        public static VkSubpassDescription.Raw MarshalDirect(this VkSubpassDescription s, ref byte *unmanaged)
        {
            var pInputAttachments       = s.InputAttachments.MarshalDirect(ref unmanaged);
            var pColorAttachments       = s.ColorAttachments.MarshalDirect(ref unmanaged);
            var pResolveAttachments     = s.ResolveAttachments.MarshalDirect(ref unmanaged);
            var pDepthStencilAttachment = s.DepthStencilAttachment.MarshalIndirect(ref unmanaged);
            var pPreserveAttachments    = s.PreserveAttachments.MarshalDirect(ref unmanaged);

            VkSubpassDescription.Raw result;
            result.flags                   = s.Flags;
            result.pipelineBindPoint       = s.PipelineBindPoint;
            result.inputAttachmentCount    = s.InputAttachments?.Count ?? 0;
            result.pInputAttachments       = pInputAttachments;
            result.colorAttachmentCount    = s.ColorAttachments?.Count ?? 0;
            result.pColorAttachments       = pColorAttachments;
            result.pResolveAttachments     = pResolveAttachments;
            result.pDepthStencilAttachment = pDepthStencilAttachment;
            result.preserveAttachmentCount = s.PreserveAttachments?.Count ?? 0;
            result.pPreserveAttachments    = pPreserveAttachments;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkSubpassDescription s) =>
 s.SizeOfMarshalDirect() + VkSubpassDescription.Raw.SizeInBytes;