gpu: add Buffer.setLabel

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 08:42:56 -07:00 committed by Stephen Gutekanst
parent 705289b79d
commit a397631045
2 changed files with 11 additions and 1 deletions

View file

@ -781,6 +781,11 @@ const buffer_vtable = Buffer.VTable{
c.wgpuBufferRelease(@ptrCast(c.WGPUBuffer, ptr));
}
}).release,
.setLabel = (struct {
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
c.wgpuBufferLayoutSetLabel(@ptrCast(c.WGPUBufferLayout, ptr), label);
}
}).setLabel,
};
fn wrapCommandEncoder(enc: c.WGPUCommandEncoder) CommandEncoder {