mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
use wgt::PollType<u64> in device interface instead of wgt::PollType<SubmissionIndex> (#7562)
This commit is contained in:
parent
205e464849
commit
bbff2c4e0b
@ -244,7 +244,10 @@ impl DeviceInterface for CustomDevice {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn poll(&self, _maintain: wgpu::PollType) -> Result<wgpu::PollStatus, wgpu::PollError> {
|
||||
fn poll(
|
||||
&self,
|
||||
_maintain: wgpu::wgt::PollType<u64>,
|
||||
) -> Result<wgpu::PollStatus, wgpu::PollError> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ impl Device {
|
||||
///
|
||||
/// When running on WebGPU, this is a no-op. `Device`s are automatically polled.
|
||||
pub fn poll(&self, poll_type: PollType) -> Result<crate::PollStatus, crate::PollError> {
|
||||
self.inner.poll(poll_type)
|
||||
self.inner.poll(poll_type.map_index(|s| s.index))
|
||||
}
|
||||
|
||||
/// The features which can be used on this device.
|
||||
|
||||
@ -27,7 +27,6 @@ crate::cmp::impl_eq_ord_hash_proxy!(Queue => .inner);
|
||||
/// There is no analogue in the WebGPU specification.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SubmissionIndex {
|
||||
#[cfg_attr(not(wgpu_core), expect(dead_code))]
|
||||
pub(crate) index: u64,
|
||||
}
|
||||
#[cfg(send_sync)]
|
||||
|
||||
@ -2402,7 +2402,7 @@ impl dispatch::DeviceInterface for WebDevice {
|
||||
// No capturing api in webgpu
|
||||
}
|
||||
|
||||
fn poll(&self, _poll_type: crate::PollType) -> Result<crate::PollStatus, crate::PollError> {
|
||||
fn poll(&self, _poll_type: wgt::PollType<u64>) -> Result<crate::PollStatus, crate::PollError> {
|
||||
// Device is polled automatically
|
||||
Ok(crate::PollStatus::QueueEmpty)
|
||||
}
|
||||
|
||||
@ -1686,9 +1686,8 @@ impl dispatch::DeviceInterface for CoreDevice {
|
||||
};
|
||||
}
|
||||
|
||||
fn poll(&self, poll_type: crate::PollType) -> Result<crate::PollStatus, crate::PollError> {
|
||||
let maintain_inner = poll_type.map_index(|i| i.index);
|
||||
match self.context.0.device_poll(self.id, maintain_inner) {
|
||||
fn poll(&self, poll_type: wgt::PollType<u64>) -> Result<crate::PollStatus, crate::PollError> {
|
||||
match self.context.0.device_poll(self.id, poll_type) {
|
||||
Ok(status) => Ok(status),
|
||||
Err(err) => {
|
||||
if let Some(poll_error) = err.to_poll_error() {
|
||||
|
||||
@ -166,7 +166,7 @@ pub trait DeviceInterface: CommonTraits {
|
||||
unsafe fn start_graphics_debugger_capture(&self);
|
||||
unsafe fn stop_graphics_debugger_capture(&self);
|
||||
|
||||
fn poll(&self, poll_type: crate::PollType) -> Result<crate::PollStatus, crate::PollError>;
|
||||
fn poll(&self, poll_type: wgt::PollType<u64>) -> Result<crate::PollStatus, crate::PollError>;
|
||||
|
||||
fn get_internal_counters(&self) -> crate::InternalCounters;
|
||||
fn generate_allocator_report(&self) -> Option<crate::AllocatorReport>;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user