mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Record frame num in view stats (#2908)
* Add 'frameNumber' to Frame struct Previously, the frame number returned from bgfx::frame() was tracked separately in the Context. Now, we store that information in the Frame. This will allow us to attach the frame number to ViewStats. * Add frame number to ViewStats When ViewStats are enabled, we tag each timer query with the current frame number, then include that information in the final results. In this way, clients can correlate specific work that they submitted to specific GPU timing information. NOTE: Some backends not implemented, yet. They will always have 0 for frame number. The ones which are implemented are: * OpenGL * Vulkan * D3D 9,11,12 * Noop
This commit is contained in:
@@ -910,6 +910,7 @@ struct.ViewStats
|
||||
.cpuTimeEnd "int64_t" --- CPU (submit) end time.
|
||||
.gpuTimeBegin "int64_t" --- GPU begin time.
|
||||
.gpuTimeEnd "int64_t" --- GPU end time.
|
||||
.gpuFrameNum "uint32_t" --- Frame which generated gpuTimeBegin, gpuTimeEnd.
|
||||
|
||||
--- Encoder stats.
|
||||
struct.EncoderStats
|
||||
@@ -937,6 +938,7 @@ struct.Stats
|
||||
.numCompute "uint32_t" --- Number of compute calls submitted.
|
||||
.numBlit "uint32_t" --- Number of blit calls submitted.
|
||||
.maxGpuLatency "uint32_t" --- GPU driver latency.
|
||||
.gpuFrameNum "uint32_t" --- Frame which generated gpuTimeBegin, gpuTimeEnd.
|
||||
|
||||
.numDynamicIndexBuffers "uint16_t" --- Number of used dynamic index buffers.
|
||||
.numDynamicVertexBuffers "uint16_t" --- Number of used dynamic vertex buffers.
|
||||
|
||||
Reference in New Issue
Block a user