[PATCH 8/9] glamor: Fix requested composite VBO size.
Eric Anholt
eric at anholt.net
Sat Mar 8 20:07:09 PST 2014
The argument to setup_composte_vbo is the number of verts.
Signed-off-by: Eric Anholt <eric at anholt.net>
---
glamor/glamor_render.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 7829977..63bddfd 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1253,8 +1253,7 @@ 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;
@@ -1262,7 +1261,7 @@ glamor_composite_with_shader(CARD8 op,
float *vertices;
mrect = nrect > nrect_max ? nrect_max : nrect;
- vertices = glamor_setup_composite_vbo(screen, mrect * vert_stride);
+ vertices = glamor_setup_composite_vbo(screen, mrect * 4);
rect_processed = mrect;
vb_stride = glamor_priv->vb_stride / sizeof(float);
while (mrect--) {
--
1.9.0
More information about the xorg-devel
mailing list