gpu: make Device.setLoggingCallback friendlier
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
6f2f7056b7
commit
29cd383f0e
6 changed files with 22 additions and 15 deletions
|
|
@ -39,10 +39,10 @@ pub const Queue = opaque {
|
|||
) void {
|
||||
const Helper = struct {
|
||||
pub fn callback(status: WorkDoneStatus, userdata: ?*anyopaque) callconv(.C) void {
|
||||
callback(status, if (Context == void) {} orelse @ptrCast(Context, userdata));
|
||||
callback(status, if (Context == void) {} else @ptrCast(Context, userdata));
|
||||
}
|
||||
};
|
||||
Impl.queueOnSubmittedWorkDone(queue, signal_value, Helper.callback, if (Context == void) null orelse context);
|
||||
Impl.queueOnSubmittedWorkDone(queue, signal_value, Helper.callback, if (Context == void) null else context);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(queue: *Queue, label: [*:0]const u8) void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue