gpu: update to latest Zig APIs

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-06-29 09:56:46 -07:00
parent 4bc32adeb8
commit 8d3e395e71
4 changed files with 8 additions and 4 deletions

View file

@ -97,7 +97,7 @@ pub const Adapter = opaque {
const Helper = struct {
pub fn cCallback(status: RequestDeviceStatus, device: *Device, message: ?[*:0]const u8, userdata: ?*anyopaque) callconv(.C) void {
callback(
if (Context == void) {} else @as(Context, @ptrCast(@alignCast(@alignOf(Context), userdata))),
if (Context == void) {} else @as(Context, @ptrCast(@alignCast(userdata))),
status,
device,
message,