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

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

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

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

            VkDescriptorPoolCreateInfo.Raw result;
            result.sType         = VkStructureType.DescriptorPoolCreateInfo;
            result.pNext         = pNext;
            result.flags         = s.Flags;
            result.maxSets       = s.MaxSets;
            result.poolSizeCount = s.PoolSizes?.Count ?? 0;
            result.pPoolSizes    = pPoolSizes;
            return(result);
        }
Esempio n. 4
0
 public static int SizeOfMarshalIndirect(this VkDescriptorPoolCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkDescriptorPoolCreateInfo.Raw.SizeInBytes;