diff --git a/crates/bevy_render/src/renderer/render_device.rs b/crates/bevy_render/src/renderer/render_device.rs index eef8b100cb..8a177e9477 100644 --- a/crates/bevy_render/src/renderer/render_device.rs +++ b/crates/bevy_render/src/renderer/render_device.rs @@ -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).