gpu: implement CommandEncoder.finish
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
071100a61e
commit
143567e1c0
2 changed files with 15 additions and 1 deletions
|
|
@ -1006,6 +1006,15 @@ const command_encoder_vtable = CommandEncoder.VTable{
|
|||
c.wgpuCommandEncoderRelease(@ptrCast(c.WGPUCommandEncoder, ptr));
|
||||
}
|
||||
}).release,
|
||||
.finish = (struct {
|
||||
pub fn finish(ptr: *anyopaque, descriptor: ?*const CommandBuffer.Descriptor) CommandBuffer {
|
||||
const desc: ?*c.WGPUCommandBufferDescriptor = if (descriptor) |d| &.{
|
||||
.nextInChain = null,
|
||||
.label = if (d.label) |l| l else "",
|
||||
} else null;
|
||||
return wrapCommandBuffer(c.wgpuCommandEncoderFinish(@ptrCast(c.WGPUCommandEncoder, ptr), desc));
|
||||
}
|
||||
}).finish,
|
||||
.setLabel = (struct {
|
||||
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||
c.wgpuCommandEncoderSetLabel(@ptrCast(c.WGPUCommandEncoder, ptr), label);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue