From 00095ded60f702237a292d9249ac6bda13c9c857 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 15 Nov 2021 21:05:50 -0700 Subject: [PATCH] webgpu: cleanup dawn example Signed-off-by: Stephen Gutekanst --- webgpu/src/dawn/hello_triangle.zig | 3 --- webgpu/src/dawn/sample_utils.zig | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/webgpu/src/dawn/hello_triangle.zig b/webgpu/src/dawn/hello_triangle.zig index f13b1805..14103c67 100644 --- a/webgpu/src/dawn/hello_triangle.zig +++ b/webgpu/src/dawn/hello_triangle.zig @@ -109,9 +109,6 @@ pub fn main() !void { c.wgpuShaderModuleRelease(fs_module); while (!setup.window.shouldClose()) { - // _ = pipeline; - // _ = queue; - // try glfw.pollEvents(); try frame(.{ .device = setup.device, .swap_chain = swap_chain, diff --git a/webgpu/src/dawn/sample_utils.zig b/webgpu/src/dawn/sample_utils.zig index 488e3710..ffe3da26 100644 --- a/webgpu/src/dawn/sample_utils.zig +++ b/webgpu/src/dawn/sample_utils.zig @@ -23,8 +23,7 @@ const c = @import("c.zig").c; // #include // #include -fn printDeviceError(error_type: c.WGPUErrorType, message: [*c]const u8, ptr: ?*c_void) callconv(.C) void { - _ = ptr; +fn printDeviceError(error_type: c.WGPUErrorType, message: [*c]const u8, _: ?*c_void) callconv(.C) void { switch (error_type) { c.WGPUErrorType_Validation => std.debug.print("dawn: validation error: {s}\n", .{message}), c.WGPUErrorType_OutOfMemory => std.debug.print("dawn: out of memory: {s}\n", .{message}),