Ejemplo n.º 1
0
        public static VkSubpassDescription.Raw *MarshalIndirect(this VkSubpassDescription s, ref byte *unmanaged)
        {
            var result = (VkSubpassDescription.Raw *)unmanaged;

            unmanaged += VkSubpassDescription.Raw.SizeInBytes;
            *result = s.MarshalDirect(ref unmanaged);
            return(result);
        }
Ejemplo n.º 2
0
 public static int SizeOfMarshalDirect(this VkSubpassDescription s)
 {
     return
         (s.InputAttachments.SizeOfMarshalDirect() +
          s.ColorAttachments.SizeOfMarshalDirect() +
          s.ResolveAttachments.SizeOfMarshalDirect() +
          s.DepthStencilAttachment.SizeOfMarshalIndirect() +
          s.PreserveAttachments.SizeOfMarshalDirect());
 }
Ejemplo n.º 3
0
        public static VkSubpassDescription.Raw MarshalDirect(this VkSubpassDescription s, ref byte *unmanaged)
        {
            var pInputAttachments       = s.InputAttachments.MarshalDirect(ref unmanaged);
            var pColorAttachments       = s.ColorAttachments.MarshalDirect(ref unmanaged);
            var pResolveAttachments     = s.ResolveAttachments.MarshalDirect(ref unmanaged);
            var pDepthStencilAttachment = s.DepthStencilAttachment.MarshalIndirect(ref unmanaged);
            var pPreserveAttachments    = s.PreserveAttachments.MarshalDirect(ref unmanaged);

            VkSubpassDescription.Raw result;
            result.flags                   = s.Flags;
            result.pipelineBindPoint       = s.PipelineBindPoint;
            result.inputAttachmentCount    = s.InputAttachments?.Count ?? 0;
            result.pInputAttachments       = pInputAttachments;
            result.colorAttachmentCount    = s.ColorAttachments?.Count ?? 0;
            result.pColorAttachments       = pColorAttachments;
            result.pResolveAttachments     = pResolveAttachments;
            result.pDepthStencilAttachment = pDepthStencilAttachment;
            result.preserveAttachmentCount = s.PreserveAttachments?.Count ?? 0;
            result.pPreserveAttachments    = pPreserveAttachments;
            return(result);
        }
Ejemplo n.º 4
0
 public static int SizeOfMarshalIndirect(this VkSubpassDescription s) =>
 s.SizeOfMarshalDirect() + VkSubpassDescription.Raw.SizeInBytes;