gpu: add CommandEncoder.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
88bfccd5ae
commit
9e74d0eb8c
2 changed files with 10 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ pub const VTable = struct {
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderPopDebugGroup(WGPUCommandEncoder commandEncoder);
|
// WGPU_EXPORT void wgpuCommandEncoderPopDebugGroup(WGPUCommandEncoder commandEncoder);
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderPushDebugGroup(WGPUCommandEncoder commandEncoder, char const * groupLabel);
|
// WGPU_EXPORT void wgpuCommandEncoderPushDebugGroup(WGPUCommandEncoder commandEncoder, char const * groupLabel);
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderResolveQuerySet(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset);
|
// WGPU_EXPORT void wgpuCommandEncoderResolveQuerySet(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset);
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderSetLabel(WGPUCommandEncoder commandEncoder, char const * label);
|
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderWriteBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size);
|
// WGPU_EXPORT void wgpuCommandEncoderWriteBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size);
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderWriteTimestamp(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex);
|
// WGPU_EXPORT void wgpuCommandEncoderWriteTimestamp(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex);
|
||||||
};
|
};
|
||||||
|
|
@ -36,6 +36,10 @@ pub inline fn release(enc: CommandEncoder) void {
|
||||||
enc.vtable.release(enc.ptr);
|
enc.vtable.release(enc.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub inline fn setLabel(enc: CommandEncoder, label: [:0]const u8) void {
|
||||||
|
enc.vtable.setLabel(enc.ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
test "syntax" {
|
test "syntax" {
|
||||||
_ = VTable;
|
_ = VTable;
|
||||||
_ = reference;
|
_ = reference;
|
||||||
|
|
|
||||||
|
|
@ -831,6 +831,11 @@ const command_encoder_vtable = CommandEncoder.VTable{
|
||||||
c.wgpuCommandEncoderRelease(@ptrCast(c.WGPUCommandEncoder, ptr));
|
c.wgpuCommandEncoderRelease(@ptrCast(c.WGPUCommandEncoder, ptr));
|
||||||
}
|
}
|
||||||
}).release,
|
}).release,
|
||||||
|
.setLabel = (struct {
|
||||||
|
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||||
|
c.wgpuCommandEncoderLayoutSetLabel(@ptrCast(c.WGPUCommandEncoderLayout, ptr), label);
|
||||||
|
}
|
||||||
|
}).setLabel,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn wrapComputePassEncoder(enc: c.WGPUComputePassEncoder) ComputePassEncoder {
|
fn wrapComputePassEncoder(enc: c.WGPUComputePassEncoder) ComputePassEncoder {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue