gpu: add RenderBundle.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
48907f4404
commit
45c5655083
2 changed files with 9 additions and 1 deletions
|
|
@ -631,6 +631,11 @@ const render_bundle_encoder_vtable = RenderBundleEncoder.VTable{
|
|||
c.wgpuRenderBundleEncoderRelease(@ptrCast(c.WGPURenderBundleEncoder, ptr));
|
||||
}
|
||||
}).release,
|
||||
.setLabel = (struct {
|
||||
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||
c.wgpuRenderBundleSetLabel(@ptrCast(c.WGPURenderBundle, ptr), label);
|
||||
}
|
||||
}).setLabel,
|
||||
};
|
||||
|
||||
fn wrapRenderBundle(bundle: c.WGPURenderBundle) RenderBundle {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ vtable: *const VTable,
|
|||
pub const VTable = struct {
|
||||
reference: fn (ptr: *anyopaque) void,
|
||||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
};
|
||||
|
||||
pub inline fn reference(bundle: RenderBundle) void {
|
||||
|
|
@ -19,6 +18,10 @@ pub inline fn release(bundle: RenderBundle) void {
|
|||
bundle.vtable.release(bundle.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(bundle: RenderBundle, label: [:0]const u8) void {
|
||||
bundle.vtable.setLabel(bundle.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue