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));
|
||||
}
|
||||
}).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 {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ vtable: *const VTable,
|
|||
pub const VTable = struct {
|
||||
reference: fn (ptr: *anyopaque) void,
|
||||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
// WGPU_EXPORT void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, char const * label);
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
};
|
||||
|
||||
pub inline fn reference(qset: PipelineLayout) void {
|
||||
|
|
@ -20,6 +19,10 @@ pub inline fn release(qset: PipelineLayout) void {
|
|||
qset.vtable.release(qset.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(qset: PipelineLayout, label: [:0]const u8) void {
|
||||
qset.vtable.setLabel(qset.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue