webgpu: cleanup dawn example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ea197f9dca
commit
00095ded60
2 changed files with 1 additions and 5 deletions
|
|
@ -109,9 +109,6 @@ pub fn main() !void {
|
||||||
c.wgpuShaderModuleRelease(fs_module);
|
c.wgpuShaderModuleRelease(fs_module);
|
||||||
|
|
||||||
while (!setup.window.shouldClose()) {
|
while (!setup.window.shouldClose()) {
|
||||||
// _ = pipeline;
|
|
||||||
// _ = queue;
|
|
||||||
// try glfw.pollEvents();
|
|
||||||
try frame(.{
|
try frame(.{
|
||||||
.device = setup.device,
|
.device = setup.device,
|
||||||
.swap_chain = swap_chain,
|
.swap_chain = swap_chain,
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ const c = @import("c.zig").c;
|
||||||
// #include <algorithm>
|
// #include <algorithm>
|
||||||
// #include <cstring>
|
// #include <cstring>
|
||||||
|
|
||||||
fn printDeviceError(error_type: c.WGPUErrorType, message: [*c]const u8, ptr: ?*c_void) callconv(.C) void {
|
fn printDeviceError(error_type: c.WGPUErrorType, message: [*c]const u8, _: ?*c_void) callconv(.C) void {
|
||||||
_ = ptr;
|
|
||||||
switch (error_type) {
|
switch (error_type) {
|
||||||
c.WGPUErrorType_Validation => std.debug.print("dawn: validation error: {s}\n", .{message}),
|
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}),
|
c.WGPUErrorType_OutOfMemory => std.debug.print("dawn: out of memory: {s}\n", .{message}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue