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

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

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

            var pNext          = s.Next.MarshalIndirect(ref unmanaged);
            var pDynamicStates = s.DynamicStates.MarshalDirect(ref unmanaged);

            VkPipelineDynamicStateCreateInfo.Raw result;
            result.sType             = VkStructureType.PipelineDynamicStateCreateInfo;
            result.pNext             = pNext;
            result.flags             = s.Flags;
            result.dynamicStateCount = s.DynamicStates?.Count ?? 0;
            result.pDynamicStates    = pDynamicStates;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkPipelineDynamicStateCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPipelineDynamicStateCreateInfo.Raw.SizeInBytes;