Microsoft Learn > Windows > API Reference > DirectX > Graphics > API > DXGI > Namespaces > DXGI
Defines the statistics for a frame.
Namespace: WinAPI
Header: dxgi.h
typedef struct DXGI_FRAME_STATISTICS { UINT PresentCount; UINT PresentRefreshCount; UINT64 SyncRefreshCount; UINT64 SyncGpuArchitecturalPeriod; UINT64 SyncGpuTime; UINT64 SyncGpuSyncTimestamp; UINT64 SyncGpuHostTimestamp; } DXGI_FRAME_STATISTICS;
The DXGI_FRAME_STATISTICS structure contains the following members:
Member | Description |
---|---|
PresentCount |
The number of times Present has been called. |
PresentRefreshCount |
The number of refreshes that occurred since the last call to Present . |
SyncRefreshCount |
The number of refreshes that occurred since the start of the application. |
SyncGpuArchitecturalPeriod |
The number of GPU ticks per refresh interval. This value is used for debugging and should not be used for frame timing. |
SyncGpuTime |
The time, in GPU ticks, that the GPU spent rendering the frame. This value is also for debugging. |
SyncGpuSyncTimestamp |
The timestamp of when the GPU signaled completion for the frame. |
SyncGpuHostTimestamp |
The timestamp of when the CPU received the GPU's completion signal for the frame. |
The DXGI_FRAME_STATISTICS structure is used by the IDXGIOutput::GetFrameStatistics
method to return information about the most recently presented frame.
This structure provides insights into frame timing and presentation performance, which can be crucial for optimizing rendering applications and ensuring a smooth visual experience.
The timing values, particularly those related to GPU ticks, are highly dependent on the specific GPU hardware and driver implementation. They are primarily intended for diagnostic purposes and should be interpreted with caution when used for general frame rate calculations.