|
|
@@ -298,6 +298,24 @@ namespace bgfx
|
|
|
};
|
|
|
};
|
|
|
|
|
|
+ ///
|
|
|
+ /// @attention C99 equivalent is `bgfx_topology_t`.
|
|
|
+ ///
|
|
|
+ struct Topology
|
|
|
+ {
|
|
|
+ ///
|
|
|
+ enum Enum
|
|
|
+ {
|
|
|
+ TriList, //!<
|
|
|
+ TriStrip, //!<
|
|
|
+ LineList, //!<
|
|
|
+ LineStrip, //!<
|
|
|
+ PointList, //!<
|
|
|
+
|
|
|
+ Count
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
/// Topology conversion function.
|
|
|
///
|
|
|
/// @attention C99 equivalent is `bgfx_topology_convert_t`.
|
|
|
@@ -871,53 +889,55 @@ namespace bgfx
|
|
|
/// time frequencies define timestamps-per-second for that hardware.
|
|
|
struct Stats
|
|
|
{
|
|
|
- int64_t cpuTimeFrame; //!< CPU time between two `bgfx::frame` calls.
|
|
|
- int64_t cpuTimeBegin; //!< Render thread CPU submit begin time.
|
|
|
- int64_t cpuTimeEnd; //!< Render thread CPU submit end time.
|
|
|
- int64_t cpuTimerFreq; //!< CPU timer frequency. Timestamps-per-second
|
|
|
-
|
|
|
- int64_t gpuTimeBegin; //!< GPU frame begin time.
|
|
|
- int64_t gpuTimeEnd; //!< GPU frame end time.
|
|
|
- int64_t gpuTimerFreq; //!< GPU timer frequency.
|
|
|
-
|
|
|
- int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing
|
|
|
- //! draw commands to underlying graphics API.
|
|
|
- int64_t waitSubmit; //!< Time spent waiting for submit thread to advance to next frame.
|
|
|
-
|
|
|
- uint32_t numDraw; //!< Number of draw calls submitted.
|
|
|
- uint32_t numCompute; //!< Number of compute calls submitted.
|
|
|
- uint32_t maxGpuLatency; //!< GPU driver latency.
|
|
|
-
|
|
|
- uint16_t numDynamicIndexBuffers; //!< Number of used dynamic index buffers.
|
|
|
- uint16_t numDynamicVertexBuffers; //!< Number of used dynamic vertex buffers.
|
|
|
- uint16_t numFrameBuffers; //!< Number of used frame buffers.
|
|
|
- uint16_t numIndexBuffers; //!< Number of used index buffers.
|
|
|
- uint16_t numOcclusionQueries; //!< Number of used occlusion queries.
|
|
|
- uint16_t numPrograms; //!< Number of used programs.
|
|
|
- uint16_t numShaders; //!< Number of used shaders.
|
|
|
- uint16_t numTextures; //!< Number of used textures.
|
|
|
- uint16_t numUniforms; //!< Number of used uniforms.
|
|
|
- uint16_t numVertexBuffers; //!< Number of used vertex buffers.
|
|
|
- uint16_t numVertexDecls; //!< Number of used vertex declarations.
|
|
|
-
|
|
|
- int64_t textureMemoryUsed; //!<
|
|
|
- int64_t rtMemoryUsed; //!<
|
|
|
- int32_t transientVbUsed; //!<
|
|
|
- int32_t transientIbUsed; //!<
|
|
|
-
|
|
|
- int64_t gpuMemoryMax; //!< Maximum available GPU memory for application.
|
|
|
- int64_t gpuMemoryUsed; //!< Amount of GPU memory used by the application.
|
|
|
-
|
|
|
- uint16_t width; //!< Backbuffer width in pixels.
|
|
|
- uint16_t height; //!< Backbuffer height in pixels.
|
|
|
- uint16_t textWidth; //!< Debug text width in characters.
|
|
|
- uint16_t textHeight; //!< Debug text height in characters.
|
|
|
-
|
|
|
- uint16_t numViews; //!< Number of view stats.
|
|
|
- ViewStats* viewStats; //!< Array of View stats.
|
|
|
-
|
|
|
- uint8_t numEncoders; //!< Number of encoders used during frame.
|
|
|
- EncoderStats* encoderStats; //!< Array of encoder stats.
|
|
|
+ int64_t cpuTimeFrame; //!< CPU time between two `bgfx::frame` calls.
|
|
|
+ int64_t cpuTimeBegin; //!< Render thread CPU submit begin time.
|
|
|
+ int64_t cpuTimeEnd; //!< Render thread CPU submit end time.
|
|
|
+ int64_t cpuTimerFreq; //!< CPU timer frequency. Timestamps-per-second
|
|
|
+
|
|
|
+ int64_t gpuTimeBegin; //!< GPU frame begin time.
|
|
|
+ int64_t gpuTimeEnd; //!< GPU frame end time.
|
|
|
+ int64_t gpuTimerFreq; //!< GPU timer frequency.
|
|
|
+
|
|
|
+ int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing
|
|
|
+ //! draw commands to underlying graphics API.
|
|
|
+ int64_t waitSubmit; //!< Time spent waiting for submit thread to advance to next frame.
|
|
|
+
|
|
|
+ uint32_t numDraw; //!< Number of draw calls submitted.
|
|
|
+ uint32_t numCompute; //!< Number of compute calls submitted.
|
|
|
+ uint32_t maxGpuLatency; //!< GPU driver latency.
|
|
|
+
|
|
|
+ uint16_t numDynamicIndexBuffers; //!< Number of used dynamic index buffers.
|
|
|
+ uint16_t numDynamicVertexBuffers; //!< Number of used dynamic vertex buffers.
|
|
|
+ uint16_t numFrameBuffers; //!< Number of used frame buffers.
|
|
|
+ uint16_t numIndexBuffers; //!< Number of used index buffers.
|
|
|
+ uint16_t numOcclusionQueries; //!< Number of used occlusion queries.
|
|
|
+ uint16_t numPrograms; //!< Number of used programs.
|
|
|
+ uint16_t numShaders; //!< Number of used shaders.
|
|
|
+ uint16_t numTextures; //!< Number of used textures.
|
|
|
+ uint16_t numUniforms; //!< Number of used uniforms.
|
|
|
+ uint16_t numVertexBuffers; //!< Number of used vertex buffers.
|
|
|
+ uint16_t numVertexDecls; //!< Number of used vertex declarations.
|
|
|
+
|
|
|
+ int64_t textureMemoryUsed; //!<
|
|
|
+ int64_t rtMemoryUsed; //!<
|
|
|
+ int32_t transientVbUsed; //!<
|
|
|
+ int32_t transientIbUsed; //!<
|
|
|
+
|
|
|
+ uint32_t numPrims[Topology::Count]; //!<
|
|
|
+
|
|
|
+ int64_t gpuMemoryMax; //!< Maximum available GPU memory for application.
|
|
|
+ int64_t gpuMemoryUsed; //!< Amount of GPU memory used by the application.
|
|
|
+
|
|
|
+ uint16_t width; //!< Backbuffer width in pixels.
|
|
|
+ uint16_t height; //!< Backbuffer height in pixels.
|
|
|
+ uint16_t textWidth; //!< Debug text width in characters.
|
|
|
+ uint16_t textHeight; //!< Debug text height in characters.
|
|
|
+
|
|
|
+ uint16_t numViews; //!< Number of view stats.
|
|
|
+ ViewStats* viewStats; //!< Array of View stats.
|
|
|
+
|
|
|
+ uint8_t numEncoders; //!< Number of encoders used during frame.
|
|
|
+ EncoderStats* encoderStats; //!< Array of encoder stats.
|
|
|
};
|
|
|
|
|
|
/// Encoders are used for submitting draw calls from multiple threads, so one encoder per thread.
|