gpu: update to latest zig API (#832)

This commit is contained in:
Ali Chraghi 2023-06-29 11:26:27 -07:00 committed by GitHub
parent 8d3e395e71
commit f7554d06ac
Failed to generate hash of commit
3 changed files with 8 additions and 12 deletions

View file

@ -45,7 +45,7 @@ pub const Queue = opaque {
const Context = @TypeOf(context);
const Helper = struct {
pub fn cCallback(status: WorkDoneStatus, userdata: ?*anyopaque) callconv(.C) void {
callback(if (Context == void) {} else @as(Context, @ptrCast(@alignCast(@alignOf(std.meta.Child(Context)), userdata))), status);
callback(if (Context == void) {} else @as(Context, @ptrCast(@alignCast(userdata))), status);
}
};
Impl.queueOnSubmittedWorkDone(queue, signal_value, Helper.cCallback, if (Context == void) null else context);