1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Keep stats on hw buffer uploads

This commit is contained in:
sfan5 2024-08-27 12:09:08 +02:00
parent 39970fed38
commit fa4529b4f1
8 changed files with 53 additions and 88 deletions

View file

@ -266,6 +266,8 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
const E_VERTEX_TYPE vType = mb->getVertexType();
const u32 vertexSize = getVertexPitchFromType(vType);
accountHWBufferUpload(vertexSize * vertexCount);
const c8 *vbuf = static_cast<const c8 *>(vertices);
core::array<c8> buffer;
if (!FeatureAvailable[IRR_ARB_vertex_array_bgra] && !FeatureAvailable[IRR_EXT_vertex_array_bgra]) {
@ -367,6 +369,8 @@ bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
}
}
accountHWBufferUpload(indexCount * indexSize);
// get or create buffer
bool newBuffer = false;
if (!HWBuffer->vbo_indicesID) {