pub fn begin_scope<Recorder: ProfilerCommandRecorder>(&mut self, label: &str, encoder_or_pass: &mut Recorder, device: &wgpu::Device) {
        if self.enable_timer {
            let start_query = self.allocate_query_pair(device);

            encoder_or_pass.write_timestamp(
                &self.active_frame.query_pools[start_query.pool_idx as usize].query_set,
                start_query.query_idx,
            );

            self.open_scopes.push(UnprocessedTimerScope {
                label: String::from(label),
                start_query,
                ..Default::default()
            });
        }
        if self.enable_debug_marker {
            encoder_or_pass.push_debug_group(label);
        }
    }
/// Starts a new debug/timer scope on a given encoder or rendering/compute pass.
///
/// Scopes can be arbitrarily nested.
///
/// May create new wgpu query objects (which is why it needs a [`wgpu::Device`] reference)
///
/// See also [`wgpu_profiler!`], [`GpuProfiler::end_scope`]
Starts a new debug/timer scope on a given encoder or rendering/compute pass.
Scopes can be arbitrarily nested.

May create new wgpu query objects (which is why it needs a [`wgpu::Device`] reference)


Starts a new debug / timer scope on a given encoder or rendering / compute pass . Scopes can be arbitrarily nested . May create new wgpu query objects ( which is why it needs a [ ` wgpu :: Device ` ] reference )
pub fn begin_scope<Recorder: ProfilerCommandRecorder>(&mut self, label: &str, encoder_or_pass: &mut Recorder, device: &wgpu::Device) {
        if self.enable_timer {
            let start_query = self.allocate_query_pair(device);
            encoder_or_pass.write_timestamp(
                &self.active_frame.query_pools[start_query.pool_idx as usize].query_set,
                start_query.query_idx,
            );
            self.open_scopes.push(UnprocessedTimerScope {
                label: String::from(label),
                start_query,
                ..Default::default()
            });
        }
        if self.enable_debug_marker {
            encoder_or_pass.push_debug_group(label);
        }
    }
pub fn begin_scope < Recorder : ProfilerCommandRecorder > ( & mut self , label : & str , encoder_or_pass : & mut Recorder , device : & wgpu :: Device ) { if self . enable_timer { let start_query = self . allocate_query_pair ( device ) ; encoder_or_pass . write_timestamp ( & self . active_frame . query_pools [ start_query . pool_idx as usize ] . query_set , start_query . query_idx , ) ; self . open_scopes . push ( UnprocessedTimerScope { label : String :: from ( label ) , start_query , .. Default :: default ( ) } ) ; } if self . enable_debug_marker { encoder_or_pass . push_debug_group ( label ) ; } }
Starts a new debug/timer scope on a given encoder or rendering/compute pass.
Starts a new debug / timer scope on a given encoder or rendering / compute pass .
&mut self
label
&str
encoder_or_pass
&mut Recorder
device
&wgpu::Device
&mut self
label
&str
encoder_or_pass
&mut Recorder
device
&wgpu::Device