diff --git a/getting-started/adapter-and-device/the-adapter.md b/getting-started/adapter-and-device/the-adapter.md index 2bf7b35..667b6d7 100644 --- a/getting-started/adapter-and-device/the-adapter.md +++ b/getting-started/adapter-and-device/the-adapter.md @@ -334,7 +334,11 @@ We can first list the limits that our adapter supports with `wgpuAdapterGetLimit #ifndef __EMSCRIPTEN__ WGPUSupportedLimits supportedLimits = {}; supportedLimits.nextInChain = nullptr; +#ifdef WEBGPU_BACKEND_DAWN +bool success = wgpuAdapterGetLimits(adapter, &supportedLimits) == WGPUStatus_Success; +#else bool success = wgpuAdapterGetLimits(adapter, &supportedLimits); +#endif if (success) { std::cout << "Adapter limits:" << std::endl; std::cout << " - maxTextureDimension1D: " << supportedLimits.limits.maxTextureDimension1D << std::endl; diff --git a/getting-started/adapter-and-device/the-device.md b/getting-started/adapter-and-device/the-device.md index 94d2c8f..21fa3cb 100644 --- a/getting-started/adapter-and-device/the-device.md +++ b/getting-started/adapter-and-device/the-device.md @@ -246,7 +246,11 @@ void inspectDevice(WGPUDevice device) { WGPUSupportedLimits limits = {}; limits.nextInChain = nullptr; +#ifdef WEBGPU_BACKEND_DAWN + bool success = wgpuDeviceGetLimits(device, &limits) == WGPUStatus_Success; +#else bool success = wgpuDeviceGetLimits(device, &limits); +#endif if (success) { std::cout << "Device limits:" << std::endl; std::cout << " - maxTextureDimension1D: " << limits.limits.maxTextureDimension1D << std::endl;