gpu: implement Buffer.unmap

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-13 11:23:42 -07:00 committed by Stephen Gutekanst
parent 1c5c23f101
commit 34ac711d2f
2 changed files with 10 additions and 1 deletions

View file

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