Keith Packard <[email protected]> writes: > This accelerates poly_fill_rect using GPU-based geometry computation > > Signed-off-by: Keith Packard <[email protected]>
> diff --git a/glamor/glamor_rects.c b/glamor/glamor_rects.c > new file mode 100644 > index 0000000..22bb313 > --- /dev/null > +++ b/glamor/glamor_rects.c > + > + /* Set up the vertex buffers for the points */ > + > + v = glamor_get_vbo_space(drawable->pScreen, nrect * (4 * sizeof > (GLshort)), &vbo_offset); Could we use sizeof(xRectangle) here, too? > + > + glEnableVertexAttribArray(GLAMOR_VERTEX_POS); > + glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1); > + glVertexAttribPointer(GLAMOR_VERTEX_POS, 4, GL_SHORT, GL_FALSE, > + 4 * sizeof (GLshort), vbo_offset); > + > + memcpy(v, prect, nrect * sizeof (xRectangle)); > + > + glamor_put_vbo_space(screen);
pgpS803VFkFKi.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
