From 41763018f706e3d37dd2ba7f32cea36f216251a2 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 17:47:29 -0700 Subject: [PATCH] gpu: implement Dawn deviceInjectError Signed-off-by: Stephen Gutekanst --- gpu/src/dawn_impl.zig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index b5511a57..42d9d94f 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -558,16 +558,18 @@ pub const Interface = gpu.Interface(struct { } pub inline fn deviceHasFeature(device: *gpu.Device, feature: gpu.FeatureName) bool { - _ = device; - _ = feature; - unreachable; + return procs.deviceHasFeature.?( + @ptrCast(c.WGPUDevice, device), + @enumToInt(feature), + ); } pub inline fn deviceInjectError(device: *gpu.Device, typ: gpu.ErrorType, message: [*:0]const u8) void { - _ = device; - _ = typ; - _ = message; - unreachable; + procs.deviceInjectError.?( + @ptrCast(c.WGPUDevice, device), + @enumToInt(typ), + message, + ); } pub inline fn deviceLoseForTesting(device: *gpu.Device) void {