Struct tracy_client::GpuSpan
source · pub struct GpuSpan { /* private fields */ }
Expand description
Span for timing gpu work.
See the context level documentation for more information on use.
If the span is dropped early, the following happens:
- If the span has not been ended, the span is ended. AND
- If the span has not had values uploaded, the span is uploaded with the timestamps marking the start of the current gpu context. This will put the span out of the way of other spans.
Implementations§
source§impl GpuSpan
impl GpuSpan
sourcepub fn end_zone(&mut self)
pub fn end_zone(&mut self)
Marks the end of the given gpu span. This should be called right next to where you record the corresponding gpu timestamp for the end of the span. This allows tracy to correctly associate the cpu time with the gpu timestamp.
Only the first time you call this function will it actually emit a gpu zone end event. Any subsequent calls will be ignored.
sourcepub fn upload_timestamp(self, start_timestamp: i64, end_timestamp: i64)
pub fn upload_timestamp(self, start_timestamp: i64, end_timestamp: i64)
Uploads the gpu timestamps associated with the span start and end to tracy, closing out the span.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuSpan
impl RefUnwindSafe for GpuSpan
impl Send for GpuSpan
impl Sync for GpuSpan
impl Unpin for GpuSpan
impl UnwindSafe for GpuSpan
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more