diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index dbe1b8bf..d931dab9 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -8,6 +8,8 @@ const c = @cImport({ var procs: c.DawnProcTable = undefined; /// A Dawn implementation of the gpu.Interface, which merely directs calls to the Dawn proc table. +/// +/// Before use, it must be `.init()`ialized in order to set the global proc table. pub const Interface = gpu.Interface(struct { pub fn init() @This() { procs = c.machDawnGetProcTable(); diff --git a/gpu/src/interface.zig b/gpu/src/interface.zig index 36b563d4..b73a051b 100644 --- a/gpu/src/interface.zig +++ b/gpu/src/interface.zig @@ -2,6 +2,8 @@ const gpu = @import("main.zig"); /// The gpu.Interface implementation that is used by the entire program. Only one may exist, since /// it is resolved fully at comptime with no vtable indirection, etc. +/// +/// Depending on the implementation, it may need to be `.init()`ialized before use. pub const Impl = blk: { if (@import("builtin").is_test) { break :blk StubInterface;