raster pushed a commit to branch master.

commit e0a78afef097ce95f6f3523f93dd6e75340e2efb
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Fri May 3 23:25:15 2013 +0900

    oh copying way too much data into vbo's... we copied alloc size not
    num size.. and alloc size is much bigger as it makes room for 1024
    quads per alloc increase (6*1024 vertexes etc.). literally this drops
    e17's cpu usage while compositing stuff by 40%...at least in my test
    case.
---
 .../evas/engines/gl_common/evas_gl_context.c        | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 2f73027..a269181 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -909,6 +909,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
         if (getenv("EVAS_GL_DBG")) dbgflushnum = 1;
      }
    if (dbgflushnum) printf("----prev-flushnum: %i 
-----------------------------------\n", gc->flushnum);
+   fprintf(stderr, "------------------------\n");
 
    gc->flushnum = 0;
    gc->state.current.cur_prog = 0;
@@ -2817,9 +2818,9 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
           {
              unsigned char *x;
 
-# define VERTEX_SIZE (gc->pipe[i].array.alloc * sizeof(GLshort) * 3)
-# define COLOR_SIZE (gc->pipe[i].array.alloc * sizeof(GLubyte) * 4)
-# define TEX_SIZE (gc->pipe[i].array.alloc * sizeof(GLfloat) * 2)
+# define VERTEX_SIZE (gc->pipe[i].array.num * sizeof(GLshort) * 3)
+# define COLOR_SIZE (gc->pipe[i].array.num * sizeof(GLubyte) * 4)
+# define TEX_SIZE (gc->pipe[i].array.num * sizeof(GLfloat) * 2)
              vertex_ptr = NULL;
              color_ptr = vertex_ptr + VERTEX_SIZE;
              texuv_ptr = color_ptr + COLOR_SIZE;
@@ -2856,6 +2857,20 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                     memcpy(x + (unsigned long)texm_ptr, 
gc->pipe[i].array.texm, TEX_SIZE);
                   if (gc->pipe[i].array.use_texsam)
                     memcpy(x + (unsigned long)texsam_ptr, 
gc->pipe[i].array.texsam, TEX_SIZE);
+/*                  
+                  fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + 
%i + %i + %i + %i] <%i %i %i %i %i %i %i>\n",
+                          (int)((unsigned char *)END_POINTER),
+                          gc->pipe[i].array.num,
+                          gc->pipe[i].array.alloc,
+                          VERTEX_SIZE, COLOR_SIZE, TEX_SIZE, TEX_SIZE, 
TEX_SIZE, TEX_SIZE, TEX_SIZE,
+                          gc->pipe[i].array.use_vertex,
+                          gc->pipe[i].array.use_color,
+                          gc->pipe[i].array.use_texuv,
+                          gc->pipe[i].array.use_texuv2,
+                          gc->pipe[i].array.use_texuv3,
+                          gc->pipe[i].array.use_texm,
+                          gc->pipe[i].array.use_texsam);
+ */
                   glsym_glUnmapBuffer(GL_ARRAY_BUFFER);
                }
           }

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2

Reply via email to