sysgpu: remove everything related to dawn
This commit is contained in:
parent
98801a258e
commit
539aadf664
26 changed files with 12 additions and 121 deletions
|
|
@ -1,36 +0,0 @@
|
|||
// Check that the user's app matches the required interface.
|
||||
comptime {
|
||||
if (!@import("builtin").is_test) @import("mach").core.AppInterface(@import("app"));
|
||||
}
|
||||
|
||||
// Forward "app" declarations into our namespace, such that @import("root").foo works as expected.
|
||||
pub usingnamespace @import("app");
|
||||
const App = @import("app").App;
|
||||
|
||||
const std = @import("std");
|
||||
|
||||
const mach = @import("mach");
|
||||
const core = mach.core;
|
||||
|
||||
pub usingnamespace if (!@hasDecl(App, "SYSGPUInterface")) extern struct {
|
||||
pub const SYSGPUInterface = mach.sysgpu.Impl;
|
||||
} else struct {};
|
||||
|
||||
pub fn main() !void {
|
||||
// Run from the directory where the executable is located so relative assets can be found.
|
||||
var buffer: [1024]u8 = undefined;
|
||||
const path = std.fs.selfExeDirPath(buffer[0..]) catch ".";
|
||||
std.posix.chdir(path) catch {};
|
||||
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
defer _ = gpa.deinit();
|
||||
core.allocator = gpa.allocator();
|
||||
|
||||
// Initialize GPU implementation
|
||||
try mach.sysgpu.Impl.init(core.allocator, .{});
|
||||
|
||||
var app: App = undefined;
|
||||
try app.init();
|
||||
defer app.deinit();
|
||||
while (!try core.update(&app)) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue