diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index c95da15e89..9154afb456 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,20 +26,20 @@ cross = ["wgc/cross"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "53eab747a32414232be45d47cae8a43a369395d0" +rev = "7ce535cc97958d8e224247764f3d57c162594504" features = ["raw-window-handle"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "53eab747a32414232be45d47cae8a43a369395d0" +rev = "7ce535cc97958d8e224247764f3d57c162594504" features = ["raw-window-handle"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "53eab747a32414232be45d47cae8a43a369395d0" +rev = "7ce535cc97958d8e224247764f3d57c162594504" [dependencies] arrayvec = "0.5" diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index 329f137624..ad9f5fa095 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -1897,26 +1897,14 @@ impl crate::Context for Context { } } - fn start_capture(&self, device: &Self::DeviceId) { + fn device_start_capture(&self, device: &Self::DeviceId) { let global = &self.0; - let res = wgc::gfx_select!(device.id => global.start_capture(device.id)); - match res { - Ok(v) => v, - Err(cause) => { - self.handle_error_fatal(cause, "Device::start_capture"); - } - } + wgc::gfx_select!(device.id => global.device_start_capture(device.id)); } - fn stop_capture(&self, device: &Self::DeviceId) { + fn device_stop_capture(&self, device: &Self::DeviceId) { let global = &self.0; - let res = wgc::gfx_select!(device.id => global.stop_capture(device.id)); - match res { - Ok(v) => v, - Err(cause) => { - self.handle_error_fatal(cause, "Device::stop_capture"); - } - } + wgc::gfx_select!(device.id => global.device_stop_capture(device.id)); } } diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index fbb3193afb..2a67371f22 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -2026,9 +2026,8 @@ impl crate::Context for Context { 1.0 //TODO } - fn start_capture(&self, device: &Self::DeviceId) {} - - fn stop_capture(&self, device: &Self::DeviceId) {} + fn device_start_capture(&self, _device: &Self::DeviceId) {} + fn device_stop_capture(&self, _device: &Self::DeviceId) {} } pub(crate) type SwapChainOutputDetail = (); diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 966f4a45bb..328162b080 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -448,9 +448,8 @@ trait Context: Debug + Send + Sized + Sync { ); fn queue_get_timestamp_period(&self, queue: &Self::QueueId) -> f32; - fn start_capture(&self, device: &Self::DeviceId); - - fn stop_capture(&self, device: &Self::DeviceId); + fn device_start_capture(&self, device: &Self::DeviceId); + fn device_stop_capture(&self, device: &Self::DeviceId); } /// Context for all other wgpu objects. Instance of wgpu. @@ -1667,12 +1666,12 @@ impl Device { /// Starts frame capture. pub fn start_capture(&self) { - Context::start_capture(&*self.context, &self.id) + Context::device_start_capture(&*self.context, &self.id) } /// Stops frame capture. pub fn stop_capture(&self) { - Context::stop_capture(&*self.context, &self.id) + Context::device_stop_capture(&*self.context, &self.id) } }