glamor_copyarea: Use blitcopy if current state is not render.

Practically, for pure 2D blit, the blit copy is much faster
than textured copy. For the x11perf copywinwin100, it's about
3x faster. But if we have heavy rendering/compositing, then use
textured copy will get much better (>30%)performance for most
of the cases.

So we simply add a data element to track current state. For
rendering state we use textured copy, otherwise, we use blit
copy.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2012-07-03 18:24:07 +08:00 • committed by Eric Anholt
commit 32a7438bf7
6 changed files with 24 additions and 44 deletions

View file

@ -225,6 +225,11 @@ glamor_block_handler(ScreenPtr screen)
dispatch->glFlush();
glamor_fbo_expire(glamor_priv);
glamor_put_dispatch(glamor_priv);
if (glamor_priv->state == RENDER_STATE
&& glamor_priv->render_idle_cnt++ > RENDER_IDEL_MAX) {
glamor_priv->state = IDLE_STATE;
glamor_priv->render_idle_cnt = 0;
}
}
static void