gpu: add Texture.setLabel

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 09:15:50 -07:00 committed by Stephen Gutekanst
parent 7c94856ed6
commit e674250ec5
2 changed files with 10 additions and 1 deletions

View file

@ -556,6 +556,11 @@ const texture_vtable = Texture.VTable{
c.wgpuTextureRelease(@ptrCast(c.WGPUTexture, ptr));
}
}).release,
.setLabel = (struct {
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
c.wgpuTextureSetLabel(@ptrCast(c.WGPUTexture, ptr), label);
}
}).setLabel,
};
fn wrapSampler(sampler: c.WGPUSampler) Sampler {