OSDN Git Service

[fps] Flush every 200 draw calls instead of 2
authorLingfeng Yang <lfy@google.com>
Thu, 19 Jan 2017 16:04:48 +0000 (08:04 -0800)
committerLingfeng Yang <lfy@google.com>
Thu, 19 Jan 2017 18:36:38 +0000 (10:36 -0800)
Linux z840, quadro k2200 3dmark ice storm unlimited:

80k->100k

Change-Id: Ia4d68f3d096ad042e3279d5a1d848930ce4571a6

system/GLESv2_enc/GL2Encoder.cpp

index e25833b..ede5c2c 100755 (executable)
@@ -955,16 +955,11 @@ void GL2Encoder::sendVertexAttributes(GLint first, GLsizei count, bool hasClient
 }
 
 void GL2Encoder::flushDrawCall() {
-    // The idea is that
-    // commitBuffer / write() to qemu pipe will
-    // take at least ~20-60us, and for cases like
-    // sendVertexAttributes / glDrawElementsOffset,
-    // which sends only around few hundred bytes,
-    // we can get away with sending
-    // two at a time in the same ~20-60us,
-    // reducing average latency and gaining ~1 fps
-    // in Antutu on Linux + Quadro K2200.
-    if (m_drawCallFlushCount % 2 == 0) {
+    // This used to be every other draw call, but
+    // now that we are using real GPU buffers on host,
+    // set this to every 200 draw calls
+    // (tuned on z840 linux NVIDIA Quadro K2200)
+    if (m_drawCallFlushCount % 200 == 0) {
         m_stream->flush();
     }
     m_drawCallFlushCount++;