remove Dawn / WebGPU support in favor of sysgpu
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
e6cecc3ebe
commit
98801a258e
47 changed files with 25 additions and 8474 deletions
|
|
@ -39,7 +39,7 @@ fn ErrorSet(comptime F: type) type {
|
|||
return @typeInfo(@typeInfo(F).Fn.return_type.?).ErrorUnion.error_set;
|
||||
}
|
||||
|
||||
const gpu = if (mach.use_sysgpu) sysgpu.sysgpu else @import("../gpu/main.zig");
|
||||
const gpu = sysgpu.sysgpu;
|
||||
|
||||
pub fn AppInterface(comptime app_entry: anytype) void {
|
||||
if (!@hasDecl(app_entry, "App")) {
|
||||
|
|
|
|||
|
|
@ -137,8 +137,7 @@ pub fn init(
|
|||
input: *Frequency,
|
||||
options: Options,
|
||||
) !void {
|
||||
if (!@import("builtin").is_test and !mach.use_sysgpu) _ = mach.wgpu.Export(mach.wgpu.Impl);
|
||||
if (!@import("builtin").is_test and mach.use_sysgpu) _ = mach.sysgpu.sysgpu.Export(mach.sysgpu.Impl);
|
||||
if (!@import("builtin").is_test) _ = mach.sysgpu.sysgpu.Export(mach.sysgpu.Impl);
|
||||
|
||||
const backend_type = try detectBackendType(allocator);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,6 @@ const std = @import("std");
|
|||
const mach = @import("mach");
|
||||
const core = mach.core;
|
||||
|
||||
pub usingnamespace if (!@hasDecl(App, "GPUInterface")) struct {
|
||||
pub const GPUInterface = mach.wgpu.dawn.Interface;
|
||||
} else struct {};
|
||||
|
||||
pub usingnamespace if (!@hasDecl(App, "SYSGPUInterface")) extern struct {
|
||||
pub const SYSGPUInterface = mach.sysgpu.Impl;
|
||||
} else struct {};
|
||||
|
|
@ -31,8 +27,7 @@ pub fn main() !void {
|
|||
core.allocator = gpa.allocator();
|
||||
|
||||
// Initialize GPU implementation
|
||||
if (comptime !mach.use_sysgpu) try mach.wgpu.Impl.init(core.allocator, .{});
|
||||
if (comptime mach.use_sysgpu) try mach.sysgpu.Impl.init(core.allocator, .{});
|
||||
try mach.sysgpu.Impl.init(core.allocator, .{});
|
||||
|
||||
var app: App = undefined;
|
||||
try app.init();
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ const mach = @import("mach");
|
|||
const core = mach.core;
|
||||
const gpu = mach.gpu;
|
||||
|
||||
pub const GPUInterface = gpu.StubInterface;
|
||||
|
||||
var app: App = undefined;
|
||||
export fn wasmInit() void {
|
||||
App.init(&app) catch |err| @panic(@errorName(err));
|
||||
|
|
|
|||
|
|
@ -300,8 +300,7 @@ pub fn init(
|
|||
input: *Frequency,
|
||||
options: Options,
|
||||
) !void {
|
||||
if (!@import("builtin").is_test and !mach.use_sysgpu) _ = mach.wgpu.Export(mach.wgpu.Impl);
|
||||
if (!@import("builtin").is_test and mach.use_sysgpu) _ = mach.sysgpu.sysgpu.Export(mach.sysgpu.Impl);
|
||||
if (!@import("builtin").is_test) _ = mach.sysgpu.sysgpu.Export(mach.sysgpu.Impl);
|
||||
|
||||
const libx11 = try LibX11.load();
|
||||
const libxcursor: ?LibXCursor = LibXCursor.load() catch |err| switch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue