gpu: add ComputePassEncoder.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
9e74d0eb8c
commit
0ec0d7a947
2 changed files with 11 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ pub const VTable = struct {
|
|||
// WGPU_EXPORT void wgpuComputePassEncoderPopDebugGroup(WGPUComputePassEncoder computePassEncoder);
|
||||
// WGPU_EXPORT void wgpuComputePassEncoderPushDebugGroup(WGPUComputePassEncoder computePassEncoder, char const * groupLabel);
|
||||
// WGPU_EXPORT void wgpuComputePassEncoderSetBindGroup(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets);
|
||||
// WGPU_EXPORT void wgpuComputePassEncoderSetLabel(WGPUComputePassEncoder computePassEncoder, char const * label);
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
// WGPU_EXPORT void wgpuComputePassEncoderSetPipeline(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline);
|
||||
// WGPU_EXPORT void wgpuComputePassEncoderWriteTimestamp(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex);
|
||||
};
|
||||
|
|
@ -30,6 +30,10 @@ pub inline fn release(enc: ComputePassEncoder) void {
|
|||
enc.vtable.release(enc.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(enc: ComputePassEncoder, label: [:0]const u8) void {
|
||||
enc.vtable.setLabel(enc.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue