gpu: add Device.destroy

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 13:22:18 -07:00 committed by Stephen Gutekanst
parent 398d97443f
commit cd2dc0c2e8
2 changed files with 12 additions and 2 deletions

View file

@ -377,6 +377,11 @@ const device_vtable = Device.VTable{
));
}
}).nativeCreateSwapChain,
.destroy = (struct {
pub fn destroy(ptr: *anyopaque) void {
c.wgpuDeviceDestroy(@ptrCast(c.WGPUDestroy, ptr));
}
}).destroy,
};
// TODO: maybe make Limits an extern struct that can be cast?