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

            return
                (s.Next.SizeOfMarshalIndirect());
        }
Esempio n. 2
0
        public static VkBufferMemoryBarrier.Raw *MarshalIndirect(this VkBufferMemoryBarrier s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkBufferMemoryBarrier.Raw *) 0);
            }
            var result = (VkBufferMemoryBarrier.Raw *)unmanaged;

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

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

            VkBufferMemoryBarrier.Raw result;
            result.sType               = VkStructureType.BufferMemoryBarrier;
            result.pNext               = pNext;
            result.srcAccessMask       = s.SrcAccessMask;
            result.dstAccessMask       = s.DstAccessMask;
            result.srcQueueFamilyIndex = s.SrcQueueFamilyIndex;
            result.dstQueueFamilyIndex = s.DstQueueFamilyIndex;
            result.buffer              = s.Buffer?.Handle ?? VkBuffer.HandleType.Null;
            result.offset              = s.Offset;
            result.size = s.Size;
            return(result);
        }
Esempio n. 4
0
 public static int SizeOfMarshalIndirect(this VkBufferMemoryBarrier s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkBufferMemoryBarrier.Raw.SizeInBytes;