File tree Expand file tree Collapse file tree 2 files changed +38
-14
lines changed Expand file tree Collapse file tree 2 files changed +38
-14
lines changed Original file line number Diff line number Diff line change @@ -1845,14 +1845,12 @@ impl Global {
1845
1845
///
1846
1846
/// [api]: ../../wgpu/struct.Device.html#method.start_graphics_debugger_capture
1847
1847
pub unsafe fn device_start_graphics_debugger_capture ( & self , device_id : DeviceId ) {
1848
- api_log ! ( "Device::start_graphics_debugger_capture" ) ;
1849
-
1850
- let device = self . hub . devices . get ( device_id) ;
1851
-
1852
- if !device. is_valid ( ) {
1853
- return ;
1848
+ unsafe {
1849
+ self . hub
1850
+ . devices
1851
+ . get ( device_id)
1852
+ . start_graphics_debugger_capture ( ) ;
1854
1853
}
1855
- unsafe { device. raw ( ) . start_graphics_debugger_capture ( ) } ;
1856
1854
}
1857
1855
1858
1856
/// # Safety
@@ -1861,14 +1859,12 @@ impl Global {
1861
1859
///
1862
1860
/// [api]: ../../wgpu/struct.Device.html#method.stop_graphics_debugger_capture
1863
1861
pub unsafe fn device_stop_graphics_debugger_capture ( & self , device_id : DeviceId ) {
1864
- api_log ! ( "Device::stop_graphics_debugger_capture" ) ;
1865
-
1866
- let device = self . hub . devices . get ( device_id) ;
1867
-
1868
- if !device. is_valid ( ) {
1869
- return ;
1862
+ unsafe {
1863
+ self . hub
1864
+ . devices
1865
+ . get ( device_id)
1866
+ . stop_graphics_debugger_capture ( ) ;
1870
1867
}
1871
- unsafe { device. raw ( ) . stop_graphics_debugger_capture ( ) } ;
1872
1868
}
1873
1869
1874
1870
pub fn pipeline_cache_get_data ( & self , id : id:: PipelineCacheId ) -> Option < Vec < u8 > > {
Original file line number Diff line number Diff line change @@ -338,6 +338,34 @@ impl Device {
338
338
Err ( MissingDownlevelFlags ( flags) )
339
339
}
340
340
}
341
+
342
+ /// # Safety
343
+ ///
344
+ /// - See [wgpu::Device::start_graphics_debugger_capture][api] for details the safety.
345
+ ///
346
+ /// [api]: ../../wgpu/struct.Device.html#method.start_graphics_debugger_capture
347
+ pub unsafe fn start_graphics_debugger_capture ( & self ) {
348
+ api_log ! ( "Device::start_graphics_debugger_capture" ) ;
349
+
350
+ if !self . is_valid ( ) {
351
+ return ;
352
+ }
353
+ unsafe { self . raw ( ) . start_graphics_debugger_capture ( ) } ;
354
+ }
355
+
356
+ /// # Safety
357
+ ///
358
+ /// - See [wgpu::Device::stop_graphics_debugger_capture][api] for details the safety.
359
+ ///
360
+ /// [api]: ../../wgpu/struct.Device.html#method.stop_graphics_debugger_capture
361
+ pub unsafe fn stop_graphics_debugger_capture ( & self ) {
362
+ api_log ! ( "Device::stop_graphics_debugger_capture" ) ;
363
+
364
+ if !self . is_valid ( ) {
365
+ return ;
366
+ }
367
+ unsafe { self . raw ( ) . stop_graphics_debugger_capture ( ) } ;
368
+ }
341
369
}
342
370
343
371
impl Device {
You can’t perform that action at this time.
0 commit comments