public VkBlobBufferAllocator(VulkanDevice vulkanDevice) { if (vulkanDevice == null) { throw new ArgumentNullException(nameof(vulkanDevice)); } vulkanDevice.ThrowIfDisposed(); NativeMethods.allocator_VkBlobBufferAllocator_new(vulkanDevice.NativePtr, out var returnValue); this.NativePtr = returnValue; }
public VkCompute(VulkanDevice device) { if (device == null) { throw new ArgumentNullException(nameof(device)); } device.ThrowIfDisposed(); NativeMethods.command_VkCompute_new(device.NativePtr, out var ret); this.NativePtr = ret; }
public Command(VulkanDevice device, uint queueFamilyIndex) { if (device == null) { throw new ArgumentNullException(nameof(device)); } device.ThrowIfDisposed(); NativeMethods.command_Command_new(device.NativePtr, queueFamilyIndex, out var ret); this.NativePtr = ret; }
public void SetVulkanDevice(VulkanDevice device) { if (device == null) { throw new ArgumentNullException(nameof(device)); } this.ThrowIfDisposed(); device.ThrowIfDisposed(); var error = NativeMethods.net_Net_set_vulkan_device2(this.NativePtr, device.NativePtr); if (error != NativeMethods.ErrorType.OK) { throw new NcnnException("Unknown Exception"); } }