Skip to content

GPU: track reference timestamp for delta-encoding per context #1319

@slomp

Description

@slomp

The tracy::Profiler keeps a global m_refTimeGpu to perform delta-encoding of GPU timestamps before sending them over to the server (when processing QueueType::GpuTime events).

Depending on the order in which GPU command buffers are recorded, they can have non-contiguous timestamp query ids, and things can really get out of order depending on the order the command buffers are posted in the command queue. This in turn will create a fair amount of delta-discontinuities (large and/or negative deltas) in the actual GpuTime stream that the Profiler processes when sending the events to the server. It also makes delta encoding sort of "chaotic" when mixing graphics APIs.

We can make things more orderly if we maintain one such reference time per GPU context object.
This change should only affect the data stream in the "wire" protocol, not the file binary data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions