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

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

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

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

            VkDeviceQueueCreateInfo.Raw result;
            result.sType            = VkStructureType.DeviceQueueCreateInfo;
            result.pNext            = pNext;
            result.flags            = s.Flags;
            result.queueFamilyIndex = s.QueueFamilyIndex;
            result.queueCount       = s.QueuePriorities?.Count ?? 0;
            result.pQueuePriorities = pQueuePriorities;
            return(result);
        }
Esempio n. 4
0
 public static int SizeOfMarshalIndirect(this VkDeviceQueueCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkDeviceQueueCreateInfo.Raw.SizeInBytes;