mach/gpu/src/CommandBuffer.zig
Stephen Gutekanst 687fb132ab gpu: add Queue TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00

25 lines
548 B
Zig

const CommandBuffer = @This();
/// The type erased pointer to the CommandBuffer implementation
/// Equal to c.WGPUCommandBuffer for NativeInstance.
ptr: *anyopaque,
vtable: *const VTable,
pub const VTable = struct {
reference: fn (ptr: *anyopaque) void,
release: fn (ptr: *anyopaque) void,
};
pub inline fn reference(buf: CommandBuffer) void {
buf.vtable.reference(buf.ptr);
}
pub inline fn release(buf: CommandBuffer) void {
buf.vtable.release(buf.ptr);
}
test "syntax" {
_ = VTable;
_ = reference;
_ = release;
}