Improve automatic batching performance slightly on AMD gpus by removing some redundant/useless opengl calls (there is no mapped buffer to flush).

This commit is contained in:
Alex Szpakowski
2019-06-01 15:58:42 -03:00
parent ddef70e141
commit 8e5b71e8e7
+1 -6
View File
@@ -206,7 +206,6 @@ public:
{ {
// We insert a fence for all data from this frame at the end of the // We insert a fence for all data from this frame at the end of the
// frame (in nextFrame), rather than doing anything more fine-grained. // frame (in nextFrame), rather than doing anything more fine-grained.
frameGPUReadOffset += usedsize; frameGPUReadOffset += usedsize;
} }
@@ -427,13 +426,9 @@ public:
return info; return info;
} }
size_t unmap(size_t usedsize) override size_t unmap(size_t /*usedsize*/) override
{ {
size_t offset = (frameIndex * bufferSize) + frameGPUReadOffset; size_t offset = (frameIndex * bufferSize) + frameGPUReadOffset;
gl.bindBuffer(mode, vbo);
glFlushMappedBufferRange(glMode, offset, usedsize);
return offset; return offset;
} }