Skip to content

Commit

Permalink
Add Device.poll overload for generic device queues
Browse files Browse the repository at this point in the history
  • Loading branch information
chances committed Sep 28, 2023
1 parent e608892 commit b15f57f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/wgpu/api.d
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b15f57f

Please sign in to comment.