gpu: correct alignment casts of callback helpers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
6357f3a767
commit
4429be4f5f
4 changed files with 72 additions and 72 deletions
|
|
@ -40,7 +40,7 @@ pub const Queue = opaque {
|
|||
const Context = @TypeOf(context);
|
||||
const Helper = struct {
|
||||
pub fn callback(status: WorkDoneStatus, userdata: ?*anyopaque) callconv(.C) void {
|
||||
callback(status, if (Context == void) {} else @ptrCast(Context, @alignCast(@alignOf(Context), userdata)));
|
||||
callback(status, if (Context == void) {} else @ptrCast(Context, @alignCast(@alignOf(std.meta.Child(Context)), userdata)));
|
||||
}
|
||||
};
|
||||
Impl.queueOnSubmittedWorkDone(queue, signal_value, Helper.callback, if (Context == void) null else context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue