[Mesa-dev] [PATCH 00/10] glsl: Implement varying packing.

Paul Berry stereotype441 at gmail.com
Wed Dec 12 08:23:31 PST 2012

On 12 December 2012 00:02, Eric Anholt <eric at anholt.net> wrote:

> Paul Berry <stereotype441 at gmail.com> writes:
> > This patch series adds varying packing to Mesa, so that we can handle
> > varyings composed of things other than vec4's without using up extra
> > varying components.
> Results for glbenchmark 2.7 at 320x240 (units of fps):
>     N           Min           Max        Median           Avg        Stddev
> x 109            86            87            86     86.027523    0.16435709
> + 109            86            87            87     86.963303    0.18888589
> Difference at 95.0% confidence
>         0.93578 +/- 0.0470052
>         1.08777% +/- 0.0546397%
>         (Student's t, pooled s = 0.177047)
> I chose a tiny resolution here to try and focus on the path that we
> think this will help in (clipping overhead reduction).  The stupid app
> prints an integer fps, so it can be hard to get any signal out of small
> changes at higher resolutions.

I'm not certain that clipping overhead reduction is going to be significant
for Gen6+.  On Gen4-5, the clipper has to write out new VUE entries
whenever it generates new vertices, and it has to adjust the interpolation
of all the varyings, so definitely there should be a reduction of overhead
there.  But on Gen6+, varyings are interpolated using barycentric
coordinates, so the clipper doesn't have to adjust any varyings or write
out any VUE entries--it just modifies the topology, the gl_Position values,
and the barycentric coordinates being sent to the SF, and the overhead for
doing that should be independent of the number of varying slots used.

The place where I'm expecting overhead to be reduced is in writing to the
VUE at the end of the vertex shader, and reading from the VUE at the start
of the fragment shader.  I don't know whether the effect will be more
significant in the fragment shader or the vertex shader, so it might be
worth trying a large window size too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121212/7664cf97/attachment.html>

More information about the mesa-dev mailing list