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

            var pNext = s.Next.MarshalIndirect(ref unmanaged);
            var pQueueFamilyIndices = s.QueueFamilyIndices.MarshalDirect(ref unmanaged);

            VkSwapchainCreateInfoKHR.Raw result;
            result.sType                 = VkStructureType.SwapchainCreateInfoKHR;
            result.pNext                 = pNext;
            result.flags                 = s.Flags;
            result.surface               = s.Surface?.Handle ?? VkSurfaceKHR.HandleType.Null;
            result.minImageCount         = s.MinImageCount;
            result.imageFormat           = s.ImageFormat;
            result.imageColorSpace       = s.ImageColorSpace;
            result.imageExtent           = s.ImageExtent;
            result.imageArrayLayers      = s.ImageArrayLayers;
            result.imageUsage            = s.ImageUsage;
            result.imageSharingMode      = s.ImageSharingMode;
            result.queueFamilyIndexCount = s.QueueFamilyIndices?.Count ?? 0;
            result.pQueueFamilyIndices   = pQueueFamilyIndices;
            result.preTransform          = s.PreTransform;
            result.compositeAlpha        = s.CompositeAlpha;
            result.presentMode           = s.PresentMode;
            result.clipped               = new VkBool32(s.Clipped);
            result.oldSwapchain          = s.OldSwapchain?.Handle ?? VkSwapchainKHR.HandleType.Null;
            return(result);
        }
        public static int SizeOfMarshalDirect(this VkSwapchainCreateInfoKHR s)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

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

            unmanaged += VkSwapchainCreateInfoKHR.Raw.SizeInBytes;
            *result = s.MarshalDirect(ref unmanaged);
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkSwapchainCreateInfoKHR s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkSwapchainCreateInfoKHR.Raw.SizeInBytes;