gpu: add ComputePassEncoder.setLabel

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 09:03:27 -07:00 committed by Stephen Gutekanst
parent 9e74d0eb8c
commit 0ec0d7a947
2 changed files with 11 additions and 2 deletions

View file

@ -833,7 +833,7 @@ const command_encoder_vtable = CommandEncoder.VTable{
}).release,
.setLabel = (struct {
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
c.wgpuCommandEncoderLayoutSetLabel(@ptrCast(c.WGPUCommandEncoderLayout, ptr), label);
c.wgpuCommandEncoderSetLabel(@ptrCast(c.WGPUCommandEncoder, ptr), label);
}
}).setLabel,
};
@ -856,6 +856,11 @@ const compute_pass_encoder_vtable = ComputePassEncoder.VTable{
c.wgpuComputePassEncoderRelease(@ptrCast(c.WGPUComputePassEncoder, ptr));
}
}).release,
.setLabel = (struct {
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
c.wgpuComputePassEncoderSetLabel(@ptrCast(c.WGPUComputePassEncoder, ptr), label);
}
}).setLabel,
};
fn wrapComputePipeline(pipeline: c.WGPUComputePipeline) ComputePipeline {