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

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

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

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

            VkImageMemoryBarrier.Raw result;
            result.sType               = VkStructureType.ImageMemoryBarrier;
            result.pNext               = pNext;
            result.srcAccessMask       = s.SrcAccessMask;
            result.dstAccessMask       = s.DstAccessMask;
            result.oldLayout           = s.OldLayout;
            result.newLayout           = s.NewLayout;
            result.srcQueueFamilyIndex = s.SrcQueueFamilyIndex;
            result.dstQueueFamilyIndex = s.DstQueueFamilyIndex;
            result.image               = s.Image?.Handle ?? VkImage.HandleType.Null;
            result.subresourceRange    = s.SubresourceRange;
            return(result);
        }
Ejemplo n.º 4
0
 public static int SizeOfMarshalIndirect(this VkImageMemoryBarrier s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkImageMemoryBarrier.Raw.SizeInBytes;