gpu: add ComputePipeline.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0ec0d7a947
commit
17cb400075
2 changed files with 10 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ pub const VTable = struct {
|
|||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
// WGPU_EXPORT WGPUBindGroupLayout wgpuComputePipelineGetBindGroupLayout(WGPUComputePipeline computePipeline, uint32_t groupIndex);
|
||||
// WGPU_EXPORT void wgpuComputePipelineSetLabel(WGPUComputePipeline computePipeline, char const * label);
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
};
|
||||
|
||||
pub inline fn reference(pipeline: ComputePipeline) void {
|
||||
|
|
@ -21,6 +21,10 @@ pub inline fn release(pipeline: ComputePipeline) void {
|
|||
pipeline.vtable.release(pipeline.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(pipeline: ComputePipeline, label: [:0]const u8) void {
|
||||
pipeline.vtable.setLabel(pipeline.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
|
|
@ -881,6 +881,11 @@ const compute_pipeline_vtable = ComputePipeline.VTable{
|
|||
c.wgpuComputePipelineRelease(@ptrCast(c.WGPUComputePipeline, ptr));
|
||||
}
|
||||
}).release,
|
||||
.setLabel = (struct {
|
||||
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||
c.wgpuComputePipelineSetLabel(@ptrCast(c.WGPUComputePipeline, ptr), label);
|
||||
}
|
||||
}).setLabel,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue