[Piglit] [PATCH 0/6] ARB_pipeline_statistics tests

Ben Widawsky benjamin.widawsky at intel.com
Mon Nov 17 16:00:19 PST 2014


tl;dr: please review pipeline_stats_vert_adj

This patch series implements some basic tests for
GL_ARB_pipeline_statistics_query

The extension adds the following tokens:
  VERTICES_SUBMITTED_ARB
  PRIMITIVES_SUBMITTED_ARB
  VERTEX_SHADER_INVOCATIONS_ARB
  TESS_CONTROL_SHADER_PATCHES_ARB
  TESS_EVALUATION_SHADER_INVOCATIONS_ARB
  GEOMETRY_SHADER_INVOCATIONS
  GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB
  FRAGMENT_SHADER_INVOCATIONS_ARB
  COMPUTE_SHADER_INVOCATIONS_ARB
  CLIPPING_INPUT_PRIMITIVES_ARB
  CLIPPING_OUTPUT_PRIMITIVES_ARB

As far as I can tell, the vertex, fragment, and clipper tests only require
GL3.0, while the remaining all require some higher GL version, and/or support of
the relevant extension. s such, it is currently impossible to test the tokens
missing from this series:
  COMPUTE_SHADER_INVOCATIONS_ARB
  TESS_CONTROL_SHADER_PATCHES_ARB
  TESS_EVALUATION_SHADER_INVOCATIONS_ARB

There is one clause in the spec which effectively makes it impossible to write
canonical positive test cases for this feature:
>    (5) How accurate should the statistics be?
>
>      RESOLVED: None of the statistics have to be exact, thus implementations
>      might return slightly different results for any of them.

Within each file I've quoted the relevant portion of the spec, and began
lovingly calling it the "chickin clause." (I understand the technical reason for
these clauses, but it does make it hard to write a test...). I suppose over time
we can adjust the amount of fudge in each test. The fragment shader test
provides an example of this, since that test reasonably needs some amount of
fudge.

Ideally someone will look at pipeline_stats_vert_adj to make sure I understood
the spec correctly. This case is not passing on Intel. All of other these tests
pass on Intel hardware with the mesa patch that I will submit separately after
these patches, or the equivalent, are merged. For those who want a preview:
http://cgit.freedesktop.org/~bwidawsk/mesa/log/?h=pipe_stats

To run them all:
piglit-run.py -t arb_pipeline_stats tests/all.py output/pipeline_stats

Ben Widawsky (6):
  ARB_pipeline_statistics_query (vertex): basic test
  ARB_pipeline_statistics_query (vertex): adjacency
  ARB_pipeline_statistics_query (clip): basic test
  ARB_pipeline_statistics_query (frag): basic test
  ARB_pipeline_statistics_query (geom): basic test
  arb_pipeline_statistics: add some basic tests

 tests/all.py                                       |  13 ++
 tests/spec/CMakeLists.txt                          |   1 +
 .../spec/arb_pipeline_statistics/CMakeLists.gl.txt |  30 +++++
 tests/spec/arb_pipeline_statistics/CMakeLists.txt  |   1 +
 .../arb_pipeline_statistics/pipeline_stats_clip.c  | 126 ++++++++++++++++++
 .../arb_pipeline_statistics/pipeline_stats_frag.c  | 105 +++++++++++++++
 .../arb_pipeline_statistics/pipeline_stats_geom.c  | 146 +++++++++++++++++++++
 .../arb_pipeline_statistics/pipeline_stats_vert.c  | 132 +++++++++++++++++++
 .../pipeline_stats_vert_adj.c                      | 143 ++++++++++++++++++++
 tests/spec/arb_pipeline_statistics/pipestat_help.c |  98 ++++++++++++++
 tests/spec/arb_pipeline_statistics/pipestat_help.h |  32 +++++
 11 files changed, 827 insertions(+)
 create mode 100644 tests/spec/arb_pipeline_statistics/CMakeLists.gl.txt
 create mode 100644 tests/spec/arb_pipeline_statistics/CMakeLists.txt
 create mode 100644 tests/spec/arb_pipeline_statistics/pipeline_stats_clip.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipeline_stats_frag.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipeline_stats_geom.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipeline_stats_vert.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipeline_stats_vert_adj.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipestat_help.c
 create mode 100644 tests/spec/arb_pipeline_statistics/pipestat_help.h

-- 
2.1.3



More information about the Piglit mailing list