gpu: add Buffer.destroy

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

View file

@ -836,6 +836,11 @@ const buffer_vtable = Buffer.VTable{
c.wgpuBufferSetLabel(@ptrCast(c.WGPUBuffer, ptr), label);
}
}).setLabel,
.destroy = (struct {
pub fn destroy(ptr: *anyopaque) void {
c.wgpuBufferDestroy(@ptrCast(c.WGPUDestroy, ptr));
}
}).destroy,
};
fn wrapCommandBuffer(buffer: c.WGPUCommandBuffer) CommandBuffer {