ARB_gl_spirv: support for loading SPIR-V binaries, plus first set of tests

Submitted by apinheiro on April 17, 2018, 2:37 p.m.

Details

Reviewer None
Submitted April 17, 2018, 2:37 p.m.
Last Updated June 20, 2018, 12:41 p.m.
Revision 2

Cover Letter(s)

Revision 1
      Hi,

this is the first series of piglit testing for the ongoing support for
ARB_gl_spirv. This series adds shader_runner the support to load
SPIR-V binaries, so the same shader_test can be used in most cases for
GLSL or SPIR-V. The main focus of this series is providing testing for
uniforms, specifically for those cases enabled by the mesa series that
has been just sent to mesa-dev, although there are some extras. So
this series allow the testing of the following:

   * Basic cases: not uniforms, just some stages.

   * Uniforms: specifically "just uniforms". It includes the simple
     cases, plus arrays, arrays of arrays, structs, matrices, images
     and samplers. But it doesn't include testing for atomic counter
     uniforms, UBOs, SSBOs etc.

   * Shader specializations constants: this is a new feature coming
     from ARB_gl_spirv.

Note (specially to Nicolai) that the focus of this series is provide
specific barebone tests for ARB_gl_spirv, while original Nicolai's
series was more focused on re-using tests from other specs. We think
that using or not those borrowed tests, and how to use them, need some
discussion first (as mentioned on last FOSDEM). We will send a RFC
soon about that.

The tree for this series can be found on the following repository:

   * https://github.com/Igalia/piglit/tree/arb_gl_spirv-series1-uniforms-v1

And the mesa series mentioned:

   * https://github.com/Igalia/mesa/tree/arb_gl_spirv-series2-uniforms-v1


Alejandro Piñeiro (10):
  framework: add --glsl option
  shader_runner/spirv: add vertex shader passthrough support on SPIR-V
  shader_runner: debug prints if running on SPIR-V mode.
  arb_gl_spirv: add really simple execution test
  arb_gl_spirv: add basic test with two uniforms
  arb_gl_spirv: add a small test with an array of uniforms
  arb_gl_spirv: add execution test for multi-dimensional (aoa) uniform
  arb_gl_spirv: uniform sampler2D
  arb_gl_spirv: add two linking tests for uniform multisample images
  arb_gl_spirv: add cross-stage uniform checking tests

Neil Roberts (12):
  util: Add a utility to stream data through an external process
  shader_runner/spirv: Add support for SPIR-V specializations
  arb_gl_spirv: Add a test using specializations
  arb_gl_spirv: Add tests for sampler2D uniform binding initialisers
  arb_gl_spirv: Add a test for a sampler within a struct
  arb_gl_spirv: Add a test for nonconst array of sampler structs
  arb_gl_spirv: Add 4 tests for uniform initializers
  arb_gl_spirv: Add a test for non-sequential explicit uniform locations
  arb_gl_spirv: Add a test for a struct uniform
  arb_gl_spirv: Add a test for a uniform struct with struct members
  arb_gl_spirv: Add a test for an array of structs uniform
  arb_gl_spirv: Add a fiddly test for uniform index calculation

Nicolai Hähnle (3):
  shader_runner/spirv: support loading SPIR-V shaders
  arb_gl_spirv: basic uniform test with names still present
  arb_gl_spirv: add basic uniform test without names

 framework/options.py                               |   1 +
 framework/programs/run.py                          |   6 +
 framework/test/shader_test.py                      |   6 +-
 tests/shaders/shader_runner.c                      | 460 ++++++++++++++++++++-
 tests/shaders/shader_runner_vs_passthrough_spv.h   |  45 ++
 .../execution/uniform/array.shader_test            | 137 ++++++
 .../execution/uniform/arrays-of-arrays.shader_test |  77 ++++
 .../execution/uniform/embedded-structs.shader_test | 151 +++++++
 .../uniform/index-matches-location.shader_test     | 100 +++++
 .../uniform/initializer-complex.shader_test        | 180 ++++++++
 .../uniform/initializer-dvec4.shader_test          |  68 +++
 .../uniform/initializer-mat4x3.shader_test         |  83 ++++
 .../execution/uniform/initializer.shader_test      |  66 +++
 .../uniform/nonsequential-locations.shader_test    |  69 ++++
 .../uniform/sampler2d-binding-array.shader_test    |  85 ++++
 .../uniform/sampler2d-binding.shader_test          |  70 ++++
 .../sampler2d-nonconst-nested-array.shader_test    | 225 ++++++++++
 .../execution/uniform/sampler2d-struct.shader_test |  98 +++++
 .../execution/uniform/sampler2d.shader_test        |  70 ++++
 .../uniform/simple-without-names.shader_test       | 111 +++++
 .../execution/uniform/simple.shader_test           | 124 ++++++
 .../execution/uniform/struct-array.shader_test     | 140 +++++++
 .../execution/uniform/struct.shader_test           |  79 ++++
 .../execution/uniform/two-uniforms.shader_test     | 132 ++++++
 .../execution/vs-ps-simple.shader_test             | 119 ++++++
 .../execution/vs-ps-specializations.shader_test    | 181 ++++++++
 .../different-uniform-array-size.shader_test       | 130 ++++++
 .../uniform/different-uniform-type.shader_test     | 129 ++++++
 .../linker/uniform/multisampler-array.shader_test  |  68 +++
 .../linker/uniform/multisampler.shader_test        |  67 +++
 tests/util/CMakeLists.txt                          |   1 +
 tests/util/piglit-subprocess.c                     | 207 ++++++++++
 tests/util/piglit-subprocess.h                     |  44 ++
 33 files changed, 3518 insertions(+), 11 deletions(-)
 create mode 100644 tests/shaders/shader_runner_vs_passthrough_spv.h
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/arrays-of-arrays.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/embedded-structs.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/index-matches-location.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-complex.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-dvec4.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-mat4x3.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/nonsequential-locations.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-binding-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-binding.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-nonconst-nested-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-struct.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/simple-without-names.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/simple.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/struct-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/struct.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/two-uniforms.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/vs-ps-simple.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/vs-ps-specializations.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/different-uniform-array-size.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/different-uniform-type.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test
 create mode 100644 tests/util/piglit-subprocess.c
 create mode 100644 tests/util/piglit-subprocess.h
    
Revision 2
      Hi,

this is the second version of the first series of patches to add tests
for the ARB_gl_spirv spec. This is basically a rebased against master
version of the original series. You can find the details here:

https://lists.freedesktop.org/archives/piglit/2018-April/024145.html

Sending again as the there are the series on mesa that this piglit
series provides tests to, is about to get fully reviewed
("ARB_gl_spirv: support for uniforms and some extras").

It would be good to at least get some extra feedback on the SPIR-V
loading, as it is adding a (soft) spirv-tools runtime dependency to
piglit. Withougo spirv-tools, those tests would just fail, but it
would be good if people thinks that's ok.


Alejandro Piñeiro (9):
  framework: add --glsl option
  shader_runner/spirv: add vertex shader passthrough support on SPIR-V
  shader_runner: debug prints if running on SPIR-V mode.
  arb_gl_spirv: add really simple execution test
  arb_gl_spirv: add basic test with two uniforms
  arb_gl_spirv: add a small test with an array of uniforms
  arb_gl_spirv: add execution test for multi-dimensional (aoa) uniform
  arb_gl_spirv: uniform sampler2D
  arb_gl_spirv: add two linking tests for uniform multisample images

Neil Roberts (12):
  util: Add a utility to stream data through an external process
  shader_runner/spirv: Add support for SPIR-V specializations
  arb_gl_spirv: Add a test using specializations
  arb_gl_spirv: Add tests for sampler2D uniform binding initialisers
  arb_gl_spirv: Add a test for a sampler within a struct
  arb_gl_spirv: Add a test for nonconst array of sampler structs
  arb_gl_spirv: Add 4 tests for uniform initializers
  arb_gl_spirv: Add a test for non-sequential explicit uniform locations
  arb_gl_spirv: Add a test for a struct uniform
  arb_gl_spirv: Add a test for a uniform struct with struct members
  arb_gl_spirv: Add a test for an array of structs uniform
  arb_gl_spirv: Add a fiddly test for uniform index calculation

Nicolai Hähnle (3):
  shader_runner/spirv: support loading SPIR-V shaders
  arb_gl_spirv: basic uniform test with names still present
  arb_gl_spirv: add basic uniform test without names

 framework/options.py                               |   1 +
 framework/programs/run.py                          |   6 +
 framework/test/shader_test.py                      |  10 +-
 tests/shaders/shader_runner.c                      | 460 ++++++++++++++++++++-
 tests/shaders/shader_runner_vs_passthrough_spv.h   |  45 ++
 .../execution/uniform/array.shader_test            | 137 ++++++
 .../execution/uniform/arrays-of-arrays.shader_test |  77 ++++
 .../execution/uniform/embedded-structs.shader_test | 151 +++++++
 .../uniform/index-matches-location.shader_test     | 100 +++++
 .../uniform/initializer-complex.shader_test        | 180 ++++++++
 .../uniform/initializer-dvec4.shader_test          |  68 +++
 .../uniform/initializer-mat4x3.shader_test         |  83 ++++
 .../execution/uniform/initializer.shader_test      |  66 +++
 .../uniform/nonsequential-locations.shader_test    |  69 ++++
 .../uniform/sampler2d-binding-array.shader_test    |  85 ++++
 .../uniform/sampler2d-binding.shader_test          |  70 ++++
 .../sampler2d-nonconst-nested-array.shader_test    | 225 ++++++++++
 .../execution/uniform/sampler2d-struct.shader_test |  98 +++++
 .../execution/uniform/sampler2d.shader_test        |  70 ++++
 .../uniform/simple-without-names.shader_test       | 111 +++++
 .../execution/uniform/simple.shader_test           | 124 ++++++
 .../execution/uniform/struct-array.shader_test     | 140 +++++++
 .../execution/uniform/struct.shader_test           |  79 ++++
 .../execution/uniform/two-uniforms.shader_test     | 132 ++++++
 .../execution/vs-ps-simple.shader_test             | 119 ++++++
 .../execution/vs-ps-specializations.shader_test    | 181 ++++++++
 .../linker/uniform/multisampler-array.shader_test  |  68 +++
 .../linker/uniform/multisampler.shader_test        |  67 +++
 tests/util/CMakeLists.txt                          |   1 +
 tests/util/piglit-subprocess.c                     | 207 ++++++++++
 tests/util/piglit-subprocess.h                     |  44 ++
 31 files changed, 3262 insertions(+), 12 deletions(-)
 create mode 100644 tests/shaders/shader_runner_vs_passthrough_spv.h
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/arrays-of-arrays.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/embedded-structs.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/index-matches-location.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-complex.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-dvec4.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer-mat4x3.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/initializer.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/nonsequential-locations.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-binding-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-binding.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-nonconst-nested-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d-struct.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/sampler2d.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/simple-without-names.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/simple.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/struct-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/struct.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/uniform/two-uniforms.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/vs-ps-simple.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/vs-ps-specializations.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test
 create mode 100644 tests/util/piglit-subprocess.c
 create mode 100644 tests/util/piglit-subprocess.h
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[01/25] util: Add a utility to stream data through an external process apinheiro Accepted
[02/25] shader_runner/spirv: support loading SPIR-V shaders apinheiro New
[03/25] framework: add --glsl option apinheiro New
[04/25] shader_runner/spirv: add vertex shader passthrough support on SPIR-V apinheiro Accepted
[05/25] shader_runner/spirv: Add support for SPIR-V specializations apinheiro New
[06/25] shader_runner: debug prints if running on SPIR-V mode. apinheiro Accepted
[07/25] arb_gl_spirv: add really simple execution test apinheiro Accepted
[08/25] arb_gl_spirv: Add a test using specializations apinheiro Accepted
[09/25] arb_gl_spirv: basic uniform test with names still present apinheiro Accepted
[10/25] arb_gl_spirv: add basic uniform test without names apinheiro Accepted
[11/25] arb_gl_spirv: add basic test with two uniforms apinheiro Accepted
[12/25] arb_gl_spirv: add a small test with an array of uniforms apinheiro Accepted
[13/25] arb_gl_spirv: add execution test for multi-dimensional (aoa) uniform apinheiro Accepted
[14/25] arb_gl_spirv: uniform sampler2D apinheiro Accepted
[15/25] arb_gl_spirv: Add tests for sampler2D uniform binding initialisers apinheiro Accepted
[16/25] arb_gl_spirv: Add a test for a sampler within a struct apinheiro Accepted
[17/25] arb_gl_spirv: Add a test for nonconst array of sampler structs apinheiro Accepted
[18/25] arb_gl_spirv: add two linking tests for uniform multisample images apinheiro Accepted
[19/25] arb_gl_spirv: Add 4 tests for uniform initializers apinheiro Accepted
[20/25] arb_gl_spirv: Add a test for non-sequential explicit uniform locations apinheiro Accepted
[21/25] arb_gl_spirv: Add a test for a struct uniform apinheiro Accepted
[22/25] arb_gl_spirv: Add a test for a uniform struct with struct members apinheiro Accepted
[23/25] arb_gl_spirv: Add a test for an array of structs uniform apinheiro Accepted
[24/25] arb_gl_spirv: Add a fiddly test for uniform index calculation apinheiro Accepted
[25/25] arb_gl_spirv: add cross-stage uniform checking tests apinheiro New

Patches download mbox

# Name Submitter State A F R T
[01/24] util: Add a utility to stream data through an external process apinheiro New
[02/24] shader_runner/spirv: support loading SPIR-V shaders apinheiro New
[03/24] framework: add --glsl option apinheiro Accepted
[04/24] shader_runner/spirv: add vertex shader passthrough support on SPIR-V apinheiro New
[05/24] shader_runner/spirv: Add support for SPIR-V specializations apinheiro New
[06/24] shader_runner: debug prints if running on SPIR-V mode. apinheiro New
[07/24] arb_gl_spirv: add really simple execution test apinheiro New
[08/24] arb_gl_spirv: Add a test using specializations apinheiro New
[09/24] arb_gl_spirv: basic uniform test with names still present apinheiro New
[10/24] arb_gl_spirv: add basic uniform test without names apinheiro New
[11/24] arb_gl_spirv: add basic test with two uniforms apinheiro New
[12/24] arb_gl_spirv: add a small test with an array of uniforms apinheiro New
[13/24] arb_gl_spirv: add execution test for multi-dimensional (aoa) uniform apinheiro New
[14/24] arb_gl_spirv: uniform sampler2D apinheiro New
[15/24] arb_gl_spirv: Add tests for sampler2D uniform binding initialisers apinheiro New
[16/24] arb_gl_spirv: Add a test for a sampler within a struct apinheiro New
[17/24] arb_gl_spirv: Add a test for nonconst array of sampler structs apinheiro New
[18/24] arb_gl_spirv: add two linking tests for uniform multisample images apinheiro New
[19/24] arb_gl_spirv: Add 4 tests for uniform initializers apinheiro New
[20/24] arb_gl_spirv: Add a test for non-sequential explicit uniform locations apinheiro New
[21/24] arb_gl_spirv: Add a test for a struct uniform apinheiro New
[22/24] arb_gl_spirv: Add a test for a uniform struct with struct members apinheiro New
[23/24] arb_gl_spirv: Add a test for an array of structs uniform apinheiro New
[24/24] arb_gl_spirv: Add a fiddly test for uniform index calculation apinheiro New