Browse Source

Fix a hard freeze on AMD+Windows systems when the internal buffers used for automatic batching are resized.

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

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

@@ -454,12 +454,9 @@ public:
 	{
 		if (vbo != 0)
 		{
-			// Make sure the GPU has completed work using the memory before
-			// freeing it. TODO: Do we need a full glFinish() or is this
-			// sufficient?
-			glFlush();
-			for (FenceSync &sync : syncs)
-				sync.cpuWait();
+			// Make sure the GPU has completed all work before freeing the
+			// memory. glFlush+sync.cpuWait doesn't seem to be enough.
+			glFinish();
 
 			gl.bindBuffer(mode, vbo);
 			gl.deleteBuffer(vbo);