MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / pass_timestamp_writes

Method pass_timestamp_writes

native/shared/src/profiler.rs:193–201  ·  view source on GitHub ↗

Convenience: build a `RenderPassTimestampWrites` for a pass in one call. Returns None when GPU queries are disabled — the caller should plug the returned `Option` straight into `RenderPassDescriptor.timestamp_writes`.

(&mut self, label: &'static str)

Source from the content-addressed store, hash-verified

191 /// Returns None when GPU queries are disabled — the caller should plug
192 /// the returned `Option` straight into `RenderPassDescriptor.timestamp_writes`.
193 pub fn pass_timestamp_writes(&mut self, label: &'static str) -> Option<wgpu::RenderPassTimestampWrites<'_>> {
194 let (b, e) = self.reserve_gpu_pair(label)?;
195 let qs = self.query_set.as_ref()?;
196 Some(wgpu::RenderPassTimestampWrites {
197 query_set: qs,
198 beginning_of_pass_write_index: Some(b),
199 end_of_pass_write_index: Some(e),
200 })
201 }
202
203 /// Same as `pass_timestamp_writes` but for a compute pass descriptor.
204 pub fn compute_pass_timestamp_writes(&mut self, label: &'static str) -> Option<wgpu::ComputePassTimestampWrites<'_>> {

Callers 1

end_frame_with_sceneMethod · 0.80

Calls 1

reserve_gpu_pairMethod · 0.80

Tested by

no test coverage detected