From 5c7691c4ba168aac10aca43fab93cf18c7e83d41 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 19 Mar 2022 00:43:43 -0700 Subject: [PATCH] gpu: fix issue in getting adapter/device limits Signed-off-by: Stephen Gutekanst --- gpu/src/NativeInstance.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpu/src/NativeInstance.zig b/gpu/src/NativeInstance.zig index a7faba31..db1a7c9e 100644 --- a/gpu/src/NativeInstance.zig +++ b/gpu/src/NativeInstance.zig @@ -226,6 +226,7 @@ fn wrapAdapter(adapter: c.WGPUAdapter) Adapter { }; var supported_limits: c.WGPUSupportedLimits = undefined; + supported_limits.nextInChain = null; if (!c.wgpuAdapterGetLimits(adapter.?, &supported_limits)) @panic("failed to get adapter limits (this is a bug in mach/gpu)"); var wrapped = Adapter{ @@ -305,6 +306,7 @@ const adapter_vtable = Adapter.VTable{ fn wrapDevice(device: c.WGPUDevice) Device { var supported_limits: c.WGPUSupportedLimits = undefined; + supported_limits.nextInChain = null; if (!c.wgpuDeviceGetLimits(device.?, &supported_limits)) @panic("failed to get device limits (this is a bug in mach/gpu)"); var wrapped = Device{