Skip to content

Commit

Permalink
Refs bevyengine#8975 -- Add return to RenderDevice::poll() (bevyengin…
Browse files Browse the repository at this point in the history
…e#8977)

# Objective
Fixes bevyengine#8975

## Solution
Return the value from wgpu::device::poll().

---

## Changelog
In render_device.rs
- RenderDevice::Poll()
  • Loading branch information
Skovrup1 committed Jun 28, 2023
1 parent ab58100 commit c24520c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/bevy_render/src/renderer/render_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ impl RenderDevice {

/// Check for resource cleanups and mapping callbacks.
///
/// Return `true` if the queue is empty, or `false` if there are more queue
/// submissions still in flight. (Note that, unless access to the [`wgpu::Queue`] is
/// coordinated somehow, this information could be out of date by the time
/// the caller receives it. `Queue`s can be shared between threads, so
/// other threads could submit new work at any time.)
///
/// no-op on the web, device is automatically polled.
#[inline]
pub fn poll(&self, maintain: wgpu::Maintain) {
self.device.poll(maintain);
pub fn poll(&self, maintain: wgpu::Maintain) -> bool {
self.device.poll(maintain)
}

/// Creates an empty [`CommandEncoder`](wgpu::CommandEncoder).
Expand Down

0 comments on commit c24520c

Please sign in to comment.