public static VkPipelineShaderStageCreateInfo.Raw *MarshalIndirect(this VkPipelineShaderStageCreateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkPipelineShaderStageCreateInfo.Raw *) 0);
            }
            var result = (VkPipelineShaderStageCreateInfo.Raw *)unmanaged;

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

            return
                (s.Next.SizeOfMarshalIndirect() +
                 s.Name.SizeOfMarshalIndirect() +
                 s.SpecializationInfo.SizeOfMarshalIndirect());
        }
        public static VkPipelineShaderStageCreateInfo.Raw MarshalDirect(this VkPipelineShaderStageCreateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            var pNext = s.Next.MarshalIndirect(ref unmanaged);
            var pName = s.Name.MarshalIndirect(ref unmanaged);
            var pSpecializationInfo = s.SpecializationInfo.MarshalIndirect(ref unmanaged);

            VkPipelineShaderStageCreateInfo.Raw result;
            result.sType  = VkStructureType.PipelineShaderStageCreateInfo;
            result.pNext  = pNext;
            result.flags  = s.Flags;
            result.stage  = s.Stage;
            result.module = s.Module?.Handle ?? VkShaderModule.HandleType.Null;
            result.pName  = pName;
            result.pSpecializationInfo = pSpecializationInfo;
            return(result);
        }
 public static int SizeOfMarshalIndirect(this VkPipelineShaderStageCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPipelineShaderStageCreateInfo.Raw.SizeInBytes;