webgpu: zig fmt

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-11-15 19:32:16 -07:00 committed by Stephen Gutekanst
parent e9bad16cda
commit 8a4cbc0e5d
3 changed files with 53 additions and 61 deletions

View file

@ -11,7 +11,6 @@ pub fn build(b: *Builder) void {
main_tests.setTarget(target); main_tests.setTarget(target);
link(b, main_tests, .{}); link(b, main_tests, .{});
const example = b.addExecutable("hello_triangle", "examples/hello_triangle.zig"); const example = b.addExecutable("hello_triangle", "examples/hello_triangle.zig");
example.setBuildMode(mode); example.setBuildMode(mode);
example.setTarget(target); example.setTarget(target);
@ -102,7 +101,6 @@ fn addCommonSources(b: *Builder, step: *std.build.LibExeObjStep, options: Option
} }
} }
// Adds dawn platform sources; derived from src/dawn_platform/BUILD.gn // Adds dawn platform sources; derived from src/dawn_platform/BUILD.gn
fn addDawnPlatformSources(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void { fn addDawnPlatformSources(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
_ = options; _ = options;
@ -1271,8 +1269,7 @@ fn addDawnUtilsSources(b: *Builder, step: *std.build.LibExeObjStep, options: Opt
} }
}, },
else => { else => {
if (options.linux_window_manager == .X11) { if (options.linux_window_manager == .X11) {}
}
}, },
} }

View file

@ -3,7 +3,6 @@ const assert = std.debug.assert;
const glfw = @import("glfw"); const glfw = @import("glfw");
const c = @import("c.zig").c; const c = @import("c.zig").c;
// #include "SampleUtils.h" // #include "SampleUtils.h"
// #include "common/Assert.h" // #include "common/Assert.h"
@ -51,11 +50,7 @@ fn printDeviceError(error_type: c.WGPUErrorType, message: [*c]const u8, ptr: ?*c
// # error // # error
// #endif // #endif
const CmdBufType = enum { none, terrible };
const CmdBufType = enum {
none,
terrible
};
// static std::unique_ptr<dawn_native::Instance> instance; // static std::unique_ptr<dawn_native::Instance> instance;
// static utils::BackendBinding* binding = nullptr; // static utils::BackendBinding* binding = nullptr;
@ -140,7 +135,7 @@ pub fn setup() !Setup {
// deviceReservation.generation); // deviceReservation.generation);
// cDevice = deviceReservation.device; // cDevice = deviceReservation.device;
} },
} }
c.dawnProcSetProcs(procs.?); c.dawnProcSetProcs(procs.?);
@ -172,7 +167,7 @@ fn setupGLFWWindowHintsForBackend(backend: c.WGPUBackendType) !void {
// Without this GLFW will initialize a GL context on the window, which prevents using // Without this GLFW will initialize a GL context on the window, which prevents using
// the window with other APIs (by crashing in weird ways). // the window with other APIs (by crashing in weird ways).
try glfw.Window.hint(.client_api, glfw.no_api); try glfw.Window.hint(.client_api, glfw.no_api);
} },
} }
} }