mirror of
https://github.com/minetest/minetest.git
synced 2025-01-24 15:01:35 +01:00
Show active HW buffers in profiler
This commit is contained in:
parent
b50b619be7
commit
d884a1624f
@ -61,8 +61,8 @@ struct SFrameStats {
|
||||
u32 PrimitivesDrawn = 0;
|
||||
//! Number of hardware buffers uploaded (new or updated)
|
||||
u32 HWBuffersUploaded = 0;
|
||||
//! Sum of uploaded hardware buffer size
|
||||
u32 HWBuffersUploadedSize = 0;
|
||||
//! Number of active hardware buffers
|
||||
u32 HWBuffersActive = 0;
|
||||
};
|
||||
|
||||
//! Interface to driver which is able to perform 2d and 3d graphics functions.
|
||||
|
@ -1161,6 +1161,8 @@ void CNullDriver::updateAllHardwareBuffers()
|
||||
deleteHardwareBuffer(Link);
|
||||
}
|
||||
}
|
||||
|
||||
FrameStats.HWBuffersActive = HWBufferList.size();
|
||||
}
|
||||
|
||||
void CNullDriver::deleteHardwareBuffer(SHWBufferLink *HWBuffer)
|
||||
|
@ -588,7 +588,7 @@ protected:
|
||||
inline void accountHWBufferUpload(u32 size)
|
||||
{
|
||||
FrameStats.HWBuffersUploaded++;
|
||||
FrameStats.HWBuffersUploadedSize += size;
|
||||
(void)size;
|
||||
}
|
||||
|
||||
inline bool getWriteZBuffer(const SMaterial &material) const
|
||||
|
@ -1706,8 +1706,8 @@ void Game::updateProfilers(const RunStats &stats, const FpsControl &draw_times,
|
||||
if (stats2.Drawcalls > 0)
|
||||
g_profiler->avg("Irr: primitives per drawcall",
|
||||
stats2.PrimitivesDrawn / float(stats2.Drawcalls));
|
||||
g_profiler->avg("Irr: buffers uploaded", stats2.HWBuffersUploaded);
|
||||
g_profiler->avg("Irr: buffers uploaded (bytes)", stats2.HWBuffersUploadedSize);
|
||||
g_profiler->avg("Irr: HW buffers uploaded", stats2.HWBuffersUploaded);
|
||||
g_profiler->avg("Irr: HW buffers active", stats2.HWBuffersActive);
|
||||
}
|
||||
|
||||
void Game::updateStats(RunStats *stats, const FpsControl &draw_times,
|
||||
|
Loading…
Reference in New Issue
Block a user