gpu: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8ec53c7446
commit
ca028ea038
6 changed files with 145 additions and 60 deletions
|
|
@ -31,11 +31,18 @@ const Impl = @import("interface.zig").Impl;
|
|||
const dawn = @import("dawn.zig");
|
||||
|
||||
pub const Device = opaque {
|
||||
pub const LostCallback = fn (
|
||||
reason: LostReason,
|
||||
message: [*:0]const u8,
|
||||
userdata: ?*anyopaque,
|
||||
) callconv(.C) void;
|
||||
pub const LostCallback = if (@import("builtin").zig_backend == .stage1)
|
||||
fn (
|
||||
reason: LostReason,
|
||||
message: [*:0]const u8,
|
||||
userdata: ?*anyopaque,
|
||||
) callconv(.C) void
|
||||
else
|
||||
*const fn (
|
||||
reason: LostReason,
|
||||
message: [*:0]const u8,
|
||||
userdata: ?*anyopaque,
|
||||
) callconv(.C) void;
|
||||
|
||||
pub const LostReason = enum(u32) {
|
||||
undef = 0x00000000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue