diff --git a/source/wgpu/api.d b/source/wgpu/api.d index 7520394..ca7c058 100644 --- a/source/wgpu/api.d +++ b/source/wgpu/api.d @@ -619,6 +619,15 @@ class Device { return Queue(wgpuDeviceGetQueue(cast(WGPUDevice) id)); } + /// Check for resource cleanups and mapping callbacks. + /// Params: + /// forceWait = Whether or not the call should block. + /// Returns: `true` if the queue is empty, or `false` if there are more queue submissions still in flight. + bool poll(Flag!"forceWait" forceWait = No.forceWait) @trusted const { + assert(id !is null); + return wgpuDevicePoll(cast(WGPUDevice) id, forceWait, null); + } + /// Check for resource cleanups and mapping callbacks. /// Params: /// queue = The `Queue` to poll.