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

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

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

            var pNext = s.Next.MarshalIndirect(ref unmanaged);
            var stage = s.Stage.MarshalDirect(ref unmanaged);

            VkComputePipelineCreateInfo.Raw result;
            result.sType              = VkStructureType.ComputePipelineCreateInfo;
            result.pNext              = pNext;
            result.flags              = s.Flags;
            result.stage              = stage;
            result.layout             = s.Layout?.Handle ?? VkPipelineLayout.HandleType.Null;
            result.basePipelineHandle = s.BasePipelineHandle?.Handle ?? VkPipeline.HandleType.Null;
            result.basePipelineIndex  = s.BasePipelineIndex;
            return(result);
        }
Exemplo n.º 4
0
 public static int SizeOfMarshalIndirect(this VkComputePipelineCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkComputePipelineCreateInfo.Raw.SizeInBytes;