[Piglit] [PATCH 00/21][RFC] Tests for ARB_internalformat_query2 extension

Alejandro Piñeiro apinheiro at igalia.com
Tue Jan 19 09:04:31 PST 2016


This is an RFC series for the ARB_internalformat_query2 extension:

https://www.opengl.org/registry/specs/ARB/internalformat_query2.txt

The corresponding bug is being tracked at:

https://bugs.freedesktop.org/show_bug.cgi?id=92687

It is still a RFC sending because there are still one pending thing
(detailed below, at Notes), but I preferred to send the full series in
advance because the main bulk is already done, and the series for the
Mesa implementation was just sent [1].

Notes:

 * It used arb_internalformat_query tests as a base.

 * The first commit removes the references to
   ARB_internalformat_query2 on the ARB_internalformat_query tests. query2 not
   only expands the possible attribute values GetInternalformativ can
   receive, but also changes its behaviour, so we concluded that it
   would be better to keep both test suites independent.

 * common.c defines a test_data structure, which main purpose is
   to abstract the fact that we have now two really similar methods
   (GetInternalformativ and GetInternalformati64v) which only
   difference is the type of the params parameter. So the tests would
   not worry about castings or which specific method is being
   called. One could argue that at this point it deserves a C++ class,
   but we preferred to stick to C.

 * For several pnames there aren't too much to test, because after
   all, we are talking about an specification that returns values that
   depend on the current implementation/hw. For that reason several
   pnames are handled by a generic test (generic-pname-checks) that
   only ensures that the returned values are among the possible values
   defined by the spec.

 * The one thing pending is a better handling of the dependencies with
   other extensions. In most extensions, the dependencies with other
   extensions are a "hard" dependency, so one given extension is needed
   for a different extension. With ARB_internalformat_query2 we have
   "soft" dependencies, in the sense that there are dependencies with
   other extensions, but lacking those dependencies doesn't prevent
   query2 to be supported, but just affects the returned value for
   some pnames. For example:

     "Dependencies on EXT_texture_sRGB

       If EXT_texture_sRGB or equivalent functionality is not
       supported, queries for the SRGB_READ <pname> and for sRGB
       internalformats return the appropriate "unsupported" response."

   So the pending thing is for each pname, check its dependencies, in
   order to ensure that the unsupported response is returned.

 * Finally, the 13 tests passes on the patch series that was just
   proposed for Mesa [1]. They were also run using NVIDIA proprietary
   drivers (NVIDIA GeForce GTX 950 - NVIDIA 352.55). In that case, the
   pass/fail ratio is 5/8. What is failing is explained on the commit
   message.

cheers,
Alejandro (on behalf of the team that worked on this)

[1] http://lists.freedesktop.org/archives/mesa-dev/2016-January/105277.html

Alejandro Piñeiro (18):
  arb_internalformat_query: remove references to
    arb_internalformat_query2
  arb_internalformat_query2: query2 api-error check
  arb_internalformat_query2: test for the most generic pname checks
  arb_internalformat_query2: test for SAMPLES and NUM_SAMPLE_COUNTS
    pnames
  arb_internalformat_query2: test for INTERNALFORMAT_{X}_SIZE pnames
  arb_internalformat_query2: test for INTERNALFORMAT_{X}_TYPE pnames
  arb_internalformat_query2: IMAGE_FORMAT_COMPATIBILITY_TYPE test
  arb_internalformat_query2: max dimensions related checks
  arb_internalformat_query2: check returned max-dimensions values
    against GetInteger
  arb_internalformat_query2: add MAX_COMBINED_DIMENSIONS subtest to
    max-dimensions
  arb_internalformat_query2: add a generic check for
    TEXTURE_IMAGE_FORMAT
  arb_internalformat_query2: add a generic check for TEXTURE_IMAGE_TYPE
  arb_internalformat_query2: add generic check for
    GET_TEXTURE_IMAGE_FORMAT
  arb_internalformat_query2: add generic check for
    GET_TEXTURE_IMAGE_TYPE
  arb_internalformat_query2: test for COLOR_ENCODING
  arb_internalformat_query2: test for TEXTURE_COMPRESSED_BLOCK_<X>
  arb_internalformat_query2: port of query1 minmax test to query2
  arb_internalformat_query2: test for FILTER pname

Antia Puentes (3):
  arb_internalformat_query2: Check if the resource is supported in
    max-dimensions
  arb_internalformat_query2: Added tests for image textures
  arb_internalformat_query2: Added tests for
    {COLOR,DEPTH,STENCIL}_COMPONENTS

 tests/all.py                                       |  17 +
 tests/spec/CMakeLists.txt                          |   1 +
 tests/spec/arb_internalformat_query/api-errors.c   |  35 +-
 tests/spec/arb_internalformat_query/minmax.c       |   3 +
 .../arb_internalformat_query2/CMakeLists.gl.txt    |  25 +
 .../spec/arb_internalformat_query2/CMakeLists.txt  |   1 +
 tests/spec/arb_internalformat_query2/api-errors.c  | 179 ++++++
 .../arb_internalformat_query2/color-encoding.c     | 210 +++++++
 tests/spec/arb_internalformat_query2/common.c      | 624 +++++++++++++++++++
 tests/spec/arb_internalformat_query2/common.h      | 357 +++++++++++
 tests/spec/arb_internalformat_query2/filter.c      | 243 ++++++++
 .../arb_internalformat_query2/format-components.c  | 280 +++++++++
 .../generic-pname-checks.c                         | 421 +++++++++++++
 .../image-format-compatibility-type.c              | 172 ++++++
 .../spec/arb_internalformat_query2/image-texture.c | 211 +++++++
 .../internalformat-size-checks.c                   | 196 ++++++
 .../internalformat-type-checks.c                   | 212 +++++++
 .../arb_internalformat_query2/max-dimensions.c     | 685 +++++++++++++++++++++
 tests/spec/arb_internalformat_query2/minmax.c      | 386 ++++++++++++
 .../arb_internalformat_query2/samples-pnames.c     | 299 +++++++++
 .../texture-compressed-block.c                     | 201 ++++++
 21 files changed, 4726 insertions(+), 32 deletions(-)
 create mode 100644 tests/spec/arb_internalformat_query2/CMakeLists.gl.txt
 create mode 100644 tests/spec/arb_internalformat_query2/CMakeLists.txt
 create mode 100644 tests/spec/arb_internalformat_query2/api-errors.c
 create mode 100644 tests/spec/arb_internalformat_query2/color-encoding.c
 create mode 100644 tests/spec/arb_internalformat_query2/common.c
 create mode 100644 tests/spec/arb_internalformat_query2/common.h
 create mode 100644 tests/spec/arb_internalformat_query2/filter.c
 create mode 100644 tests/spec/arb_internalformat_query2/format-components.c
 create mode 100644 tests/spec/arb_internalformat_query2/generic-pname-checks.c
 create mode 100644 tests/spec/arb_internalformat_query2/image-format-compatibility-type.c
 create mode 100644 tests/spec/arb_internalformat_query2/image-texture.c
 create mode 100644 tests/spec/arb_internalformat_query2/internalformat-size-checks.c
 create mode 100644 tests/spec/arb_internalformat_query2/internalformat-type-checks.c
 create mode 100644 tests/spec/arb_internalformat_query2/max-dimensions.c
 create mode 100644 tests/spec/arb_internalformat_query2/minmax.c
 create mode 100644 tests/spec/arb_internalformat_query2/samples-pnames.c
 create mode 100644 tests/spec/arb_internalformat_query2/texture-compressed-block.c

-- 
2.1.4



More information about the Piglit mailing list