From 7e7a02a83e00725b5bf75d1d20e140772e7e5fbd Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 17:50:51 -0700 Subject: [PATCH] gpu: implement Dawn deviceSetDeviceLostCallback Signed-off-by: Stephen Gutekanst --- gpu/src/dawn_impl.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index fa954946..ee8e942b 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -592,10 +592,11 @@ pub const Interface = gpu.Interface(struct { } pub inline fn deviceSetDeviceLostCallback(device: *gpu.Device, callback: gpu.Device.LostCallback, userdata: *anyopaque) void { - _ = device; - _ = callback; - _ = userdata; - unreachable; + procs.deviceSetDeviceLostCallback.?( + @ptrCast(c.WGPUDevice, device), + @ptrCast(c.WGPUDeviceLostCallback, callback), + userdata, + ); } pub inline fn deviceSetLabel(device: *gpu.Device, label: [*:0]const u8) void {