[Glamor] [RFC] Delay render flushing in DDX driver
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Jul 11 01:20:18 PDT 2012
Hi,
I'm considering to implement a delay flushing mechanism to reduce the huge
overhead due to
many tiny operations. Currently, I found two typical scenario:
1. Tiny rects filling. The example is firefox-particles. It renders to
many small rects with a solid color,
But each time it just render one rect without using the composite_rects.
2. Less than 4 glyphs a time and repeat many times. The example is
gnome-terminal-vim.
And there are another example is core library, which will fill one pixel at
one request.
For all of the above operations, if we call glDrawArray/glDrawElements each
time, then the overhead
will be extremely high and the performance is unacceptable.
To solve those cases, I'm thinking about delay rendering or batch flushing
cross different X requests.
We will not always trigger the glDrawArray/glDrawElements at each time. Take
glamor_composite as
an example, we will accumulate the vertex buffer if the compositing
operations only has a solid source
color. And only when that target pixmap is referenced somewhere, we will
flush the all the accumulated
vertex buffers. We may need to change the shader slightly to let the same
shader can handle different
solid color, may need to add a color attribute instead of use a uniform
value.
For the glyphs rendering. If the glyph's source picture is a solid color,
then we can also accumulate the
Glyphs rendering.
This mechanism is widely applied in other 2D libraries such as cairo. But I
haven't found any DDX use it.
I haven't found any critical obstacle to use it in DDX driver. Want to get
some comments from the list.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/glamor/attachments/20120711/1c72606c/attachment.html>
More information about the Glamor
mailing list