Browse Source

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

Alex Szpakowski 6 years ago
parent
commit
8e5b71e8e7
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/modules/graphics/opengl/StreamBuffer.cpp

+ 1 - 6
src/modules/graphics/opengl/StreamBuffer.cpp

@@ -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;
 	}
 	}