pub fn end_scope<Recorder: ProfilerCommandRecorder>(&mut self, encoder_or_pass: &mut Recorder) {
        if self.enable_timer {
            let open_scope = self.open_scopes.pop().expect("No profiler GpuProfiler scope was previously opened");
            encoder_or_pass.write_timestamp(
                &self.active_frame.query_pools[open_scope.start_query.pool_idx as usize].query_set,
                open_scope.start_query.query_idx + 1,
            );
            if let Some(open_parent_scope) = self.open_scopes.last_mut() {
                open_parent_scope.nested_scopes.push(open_scope);
            } else {
                self.active_frame.closed_scopes.push(open_scope);
            }
        }
        if self.enable_debug_marker {
            encoder_or_pass.pop_debug_group();
        }
    }
/// Ends a debug/timer scope.
///
/// Panics if no scope has been open previously.
///
/// See also [`wgpu_profiler!`], [`GpuProfiler::begin_scope`]
Ends a debug/timer scope.
Panics if no scope has been open previously.


Ends a debug / timer scope . Panics if no scope has been open previously .
pub fn end_scope<Recorder: ProfilerCommandRecorder>(&mut self, encoder_or_pass: &mut Recorder) {
        if self.enable_timer {
            let open_scope = self.open_scopes.pop().expect("No profiler GpuProfiler scope was previously opened");
            encoder_or_pass.write_timestamp(
                &self.active_frame.query_pools[open_scope.start_query.pool_idx as usize].query_set,
                open_scope.start_query.query_idx + 1,
            );
            if let Some(open_parent_scope) = self.open_scopes.last_mut() {
                open_parent_scope.nested_scopes.push(open_scope);
            } else {
                self.active_frame.closed_scopes.push(open_scope);
            }
        }
        if self.enable_debug_marker {
            encoder_or_pass.pop_debug_group();
        }
    }
pub fn end_scope < Recorder : ProfilerCommandRecorder > ( & mut self , encoder_or_pass : & mut Recorder ) { if self . enable_timer { let open_scope = self . open_scopes . pop ( ) . expect ( " " ) ; encoder_or_pass . write_timestamp ( & self . active_frame . query_pools [ open_scope . start_query . pool_idx as usize ] . query_set , open_scope . start_query . query_idx + 1 , ) ; if let Some ( open_parent_scope ) = self . open_scopes . last_mut ( ) { open_parent_scope . nested_scopes . push ( open_scope ) ; } else { self . active_frame . closed_scopes . push ( open_scope ) ; } } if self . enable_debug_marker { encoder_or_pass . pop_debug_group ( ) ; } }
Ends a debug/timer scope.
Ends a debug / timer scope .
&mut self
encoder_or_pass
&mut Recorder
&mut self
encoder_or_pass
&mut Recorder