예제 #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));
            }
        }
예제 #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);
            }
        }
예제 #3
0
 internal extern static unsafe Result vkInvalidateMappedMemoryRanges(IntPtr device, UInt32 memoryRangeCount, VkMappedMemoryRange *pMemoryRanges);