gpu: document implementation initialization

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 22:19:21 -07:00 committed by Stephen Gutekanst
parent 34c2590d18
commit 96221fa13e
2 changed files with 4 additions and 0 deletions

View file

@ -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();