initial macOS backend (#1249)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com> Co-authored-by: Michael Bradshaw <github@mjb.io>
This commit is contained in:
parent
af7ac96a0e
commit
66e56f037b
6 changed files with 308 additions and 25 deletions
|
|
@ -2214,13 +2214,14 @@ pub const Queue = struct {
|
|||
.queue = queue,
|
||||
.fence_value = queue.fence_value,
|
||||
};
|
||||
mtl_command_buffer.addCompletedHandler(ctx, completedHandler);
|
||||
var handler = ns.stackBlockLiteral(completedHandler, ctx, null, null);
|
||||
mtl_command_buffer.addCompletedHandler(handler.asBlock());
|
||||
mtl_command_buffer.commit();
|
||||
}
|
||||
|
||||
fn completedHandler(ctx: CompletedContext, mtl_command_buffer: *mtl.CommandBuffer) void {
|
||||
fn completedHandler(block: *ns.BlockLiteral(CompletedContext), mtl_command_buffer: *mtl.CommandBuffer) callconv(.C) void {
|
||||
_ = mtl_command_buffer;
|
||||
ctx.queue.completed_value.store(ctx.fence_value, .release);
|
||||
block.context.queue.completed_value.store(block.context.fence_value, .release);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue