gpu: add PipelineLayout.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
bf81debf42
commit
e128d38e86
2 changed files with 10 additions and 2 deletions
|
|
@ -691,6 +691,11 @@ const pipeline_layout_vtable = PipelineLayout.VTable{
|
||||||
c.wgpuPipelineLayoutRelease(@ptrCast(c.WGPUPipelineLayout, ptr));
|
c.wgpuPipelineLayoutRelease(@ptrCast(c.WGPUPipelineLayout, ptr));
|
||||||
}
|
}
|
||||||
}).release,
|
}).release,
|
||||||
|
.setLabel = (struct {
|
||||||
|
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||||
|
c.wgpuPipelineLayoutSetLabel(@ptrCast(c.WGPUPipelineLayout, ptr), label);
|
||||||
|
}
|
||||||
|
}).setLabel,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn wrapExternalTexture(texture: c.WGPUExternalTexture) ExternalTexture {
|
fn wrapExternalTexture(texture: c.WGPUExternalTexture) ExternalTexture {
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ vtable: *const VTable,
|
||||||
pub const VTable = struct {
|
pub const VTable = struct {
|
||||||
reference: fn (ptr: *anyopaque) void,
|
reference: fn (ptr: *anyopaque) void,
|
||||||
release: fn (ptr: *anyopaque) void,
|
release: fn (ptr: *anyopaque) void,
|
||||||
// TODO:
|
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||||
// WGPU_EXPORT void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, char const * label);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn reference(qset: PipelineLayout) void {
|
pub inline fn reference(qset: PipelineLayout) void {
|
||||||
|
|
@ -20,6 +19,10 @@ pub inline fn release(qset: PipelineLayout) void {
|
||||||
qset.vtable.release(qset.ptr);
|
qset.vtable.release(qset.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub inline fn setLabel(qset: PipelineLayout, label: [:0]const u8) void {
|
||||||
|
qset.vtable.setLabel(qset.ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
test "syntax" {
|
test "syntax" {
|
||||||
_ = VTable;
|
_ = VTable;
|
||||||
_ = reference;
|
_ = reference;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue