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

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

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

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

            VkDescriptorSetAllocateInfo.Raw result;
            result.sType              = VkStructureType.DescriptorSetAllocateInfo;
            result.pNext              = pNext;
            result.descriptorPool     = s.DescriptorPool?.Handle ?? VkDescriptorPool.HandleType.Null;
            result.descriptorSetCount = s.SetLayouts?.Count ?? 0;
            result.pSetLayouts        = pSetLayouts;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkDescriptorSetAllocateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkDescriptorSetAllocateInfo.Raw.SizeInBytes;