gpu: fix issue in getting adapter/device limits
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
79d27b82be
commit
5c7691c4ba
1 changed files with 2 additions and 0 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue