Ejemplo n.º 1
0
        static unsafe void InvalidateInternal(Device device, int count, VkMappedMemoryRange *ranges)
        {
            var result = device.Commands.invalidateMemory(device.Native, (uint)count, (IntPtr)ranges);

            if (result != VkResult.Success)
            {
                throw new DeviceMemoryException(string.Format("Error invalidating memory: {0}", result));
            }
        }
Ejemplo n.º 2
0
        static void InvalidateInternal(Device device, int count, MappedMemoryRange[] ranges)
        {
            unsafe
            {
                VkMappedMemoryRange *rangesNative = stackalloc VkMappedMemoryRange[count];

                for (int i = 0; i < count; i++)
                {
                    rangesNative[i] = Marshal(ranges[i]);
                }

                InvalidateInternal(device, count, rangesNative);
            }
        }
Ejemplo n.º 3
0
 internal extern static unsafe Result vkInvalidateMappedMemoryRanges(IntPtr device, UInt32 memoryRangeCount, VkMappedMemoryRange *pMemoryRanges);