core: provide a default pub const GPUInterface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3583e1754f
commit
d1c3d26710
5 changed files with 10 additions and 8 deletions
|
|
@ -136,7 +136,10 @@ pub fn init(
|
|||
input: *Frequency,
|
||||
options: Options,
|
||||
) !void {
|
||||
if (!@import("builtin").is_test and mach_core.options.use_wgpu) _ = mach_core.wgpu.Export(@import("root").GPUInterface);
|
||||
if (!@import("builtin").is_test and mach_core.options.use_wgpu) _ = mach_core.wgpu.Export(blk: {
|
||||
if (@hasDecl(@import("root"), "GPUInterface")) break :blk @import("root").GPUInterface;
|
||||
break :blk mach_core.wgpu.dawn.Interface;
|
||||
});
|
||||
if (!@import("builtin").is_test and mach_core.options.use_sysgpu) _ = mach_core.sysgpu.sysgpu.Export(@import("root").SYSGPUInterface);
|
||||
|
||||
const backend_type = try detectBackendType(allocator);
|
||||
|
|
|
|||
|
|
@ -299,7 +299,10 @@ pub fn init(
|
|||
input: *Frequency,
|
||||
options: Options,
|
||||
) !void {
|
||||
if (!@import("builtin").is_test and mach_core.options.use_wgpu) _ = mach_core.wgpu.Export(@import("root").GPUInterface);
|
||||
if (!@import("builtin").is_test and mach_core.options.use_wgpu) _ = mach_core.wgpu.Export(blk: {
|
||||
if (@hasDecl(@import("root"), "GPUInterface")) break :blk @import("root").GPUInterface;
|
||||
break :blk mach_core.wgpu.dawn.Interface;
|
||||
});
|
||||
if (!@import("builtin").is_test and mach_core.options.use_sysgpu) _ = mach_core.sysgpu.sysgpu.Export(@import("root").SYSGPUInterface);
|
||||
|
||||
const libx11 = try LibX11.load();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue