[Intel-gfx] [PATCH i-g-t 00/16] Introduction of plotting support

Daniel Vetter daniel at ffwll.ch
Mon Jul 6 07:54:48 PDT 2015


On Mon, Jul 06, 2015 at 01:35:28PM +0100, Damien Lespiau wrote:
> Long story short:
>   http://entropy.lespiau.name/intel-gpu-tools/test_simple_plot.png
>   http://entropy.lespiau.name/intel-gpu-tools/test_two_plots.png
> 
> I had fun with the previous week-end errand around igt_stats so did it again
> with plots, gearing up towards, some day, generating reports directly in the
> micro-bencharks. A couple of example of what can be generated:
> 
> This time, it's about plotting data. I started with some synthetic data but
> it's only a matter of time until I look at actual data (I'd like to start with
> some data upload micro-benchmarks). Anyway, here's what the API looks like
> (more can be found in lib/tests/igt_plot.c):

Hm, not sure we need a plotting api in igt - thus far the split between
igt and piglit was that igt is tests and piglit is running them,
collecting results and presenting them.

There's also microbenchmarks in other gfx related testsuites, hence I
think we should aim for something that's more generally useable.
-Daniel

> 
> 
> static double f(double x)
> {
>         return sin(2 * M_PI * x);
> }
> 
> static void test_simple_plot(void)
> {
>         igt_vector_t *x, *y;
>         igt_plot_t plot;
> 
>         x = igt_vector_linear(-1.0, 1.0, 200);
>         y = igt_vector_map(x, f);
> 
>         igt_plot_init(&plot, 800, 600);
>         igt_plot_draw(&plot, x, y);
>         igt_plot_write(&plot, "test_simple_plot.png");
> 
>         igt_plot_fini(&plot);
>         igt_vector_unref(x);
>         igt_vector_unref(y);
> }
> 
> -- 
> Damien
> 
> Damien Lespiau (16):
>   stats: Add a way to generate values following a normal distribution
>   stats: Add an igt_stats_init_from_array() variant
>   stats: Add an histogram object
>   lib: Add some basic types
>   plot: Draw nice plots!
>   plot: Add a way to color plots
>   plot: Add a map() to igt_vector_t
>   plot: Add top and right axes
>   plot: Draw a grid in the background
>   plot: Make sure to have a color in the background
>   plot: Add a title to plots
>   plot: Add a way to draw debug hints to help layouting
>   plot: Add axis titles
>   plot: Write simple plot with debug rectangles as well
>   plot: Test we can draw more than one graph
>   plot: Add an example of the plotting API
> 
>  .../intel-gpu-tools/intel-gpu-tools-docs.xml       |   2 +
>  lib/Makefile.sources                               |   3 +
>  lib/igt_plot.c                                     | 910 +++++++++++++++++++++
>  lib/igt_plot.h                                     | 146 ++++
>  lib/igt_stats.c                                    | 195 +++++
>  lib/igt_stats.h                                    |  28 +
>  lib/igt_types.h                                    | 113 +++
>  lib/tests/.gitignore                               |   4 +
>  lib/tests/Makefile.sources                         |   1 +
>  lib/tests/igt_plot.c                               | 136 +++
>  lib/tests/igt_stats.c                              |  24 +
>  11 files changed, 1562 insertions(+)
>  create mode 100644 lib/igt_plot.c
>  create mode 100644 lib/igt_plot.h
>  create mode 100644 lib/igt_types.h
>  create mode 100644 lib/tests/igt_plot.c
> 
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list