Mark Marshall <[email protected]> writes: > On 1 August 2017 at 22:59, Eric Anholt <[email protected]> wrote: >> Like the previous fix to rectangles, this reduces the area drawn on >> tiled renderers by letting the CPU-side tile setup know what tiles >> might be drawn at all. >> >> Surprisingly, it improves x11perf -copypixwin1 -repeat 1 -reps 10000 >> on i965 by 2.93185% +/- 1.5561% (n=90). >> >> Signed-off-by: Eric Anholt <[email protected]> >> --- >> glamor/glamor_copy.c | 27 +++++++++++++++++++++++---- >> glamor/glamor_utils.h | 9 +++++++++ >> 2 files changed, 32 insertions(+), 4 deletions(-) >> >> diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c >> index f7d6eb163fac..3296b7b1bf75 100644 >> --- a/glamor/glamor_copy.c >> +++ b/glamor/glamor_copy.c >> @@ -351,6 +351,7 @@ glamor_copy_fbo_fbo_draw(DrawablePtr src, >> const glamor_facet *copy_facet; >> int n; >> Bool ret = FALSE; >> + BoxRec bounds = glamor_no_rendering_bounds(); >> >> glamor_make_current(glamor_priv); >> >> @@ -391,11 +392,20 @@ glamor_copy_fbo_fbo_draw(DrawablePtr src, >> glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, >> 2 * sizeof (GLshort), vbo_offset); >> >> + if (nbox < 100) { >> + bounds = glamor_start_rendering_bounds(); >> + for (int i = 0; i < nbox; i++) >> + glamor_bounds_union_box(&bounds, &box[i]); >> + } >> + >> for (n = 0; n < nbox; n++) { >> v[0] = box->x1; v[1] = box->y1; >> v[2] = box->x1; v[3] = box->y2; >> v[4] = box->x2; v[5] = box->y2; >> v[6] = box->x2; v[7] = box->y1; >> + >> + glamor_bounds_union_box(&bounds, box); >> + > > I'm only looking at the diff, but aren't you doing > glamor_bounds_union_box twice in the n < 100 case, and in the n >= 100 > case I guess it does nothing anyway, apart from waste cycles?
Thanks, that was leftover debug code.
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
