diff options
author | Eric Anholt <eric@anholt.net> | 2014-02-28 13:02:27 -0500 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@gmail.com> | 2014-03-13 21:52:34 +0800 |
commit | 652250c3925c98f19107b7ff5101e4e5fe6a576c (patch) | |
tree | f15cb146f87bcddf87bd28673a37fccfa0e7c05a | |
parent | bcc1f164b35925d74e4cc363de206c53ed514edf (diff) |
glamor: Fix requested composite VBO size.
The argument to setup_composte_vbo is the number of verts.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/glamor_render.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glamor_render.c b/src/glamor_render.c index aa8f99c..a2141be 100644 --- a/src/glamor_render.c +++ b/src/glamor_render.c @@ -1330,15 +1330,14 @@ glamor_composite_with_shader(CARD8 op, vert_stride += 4; } - nrect_max = (vert_stride * nrect) > GLAMOR_COMPOSITE_VBO_VERT_CNT ? - (GLAMOR_COMPOSITE_VBO_VERT_CNT / vert_stride) : nrect; + nrect_max = MIN(nrect, GLAMOR_COMPOSITE_VBO_VERT_CNT / 4); while(nrect) { int mrect, rect_processed; int vb_stride; mrect = nrect > nrect_max ? nrect_max : nrect ; - glamor_setup_composite_vbo(screen, mrect * vert_stride); + glamor_setup_composite_vbo(screen, mrect * 4); rect_processed = mrect; vb_stride = glamor_priv->vb_stride/sizeof(float); while (mrect--) { |