[Piglit] [PULL] Test many types of non-constant indexing in GLSL

Ian Romanick idr at freedesktop.org
Mon Jul 18 13:55:27 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have just posted a branch in my personal piglit repo that adds 648 new
shader_runner tests.  These add tests for a number of cases for
non-constant indexing of matrices and arrays of matrices.  All types of
square matrices are hit.  Almost all types of storage (temporary,
uniform, and varying) are hit.  Every (?) combination of single and
multiple indirection are hit.

    git://people.freedesktop.org/~idr/piglit.git variable-indexing

There are separate paths for GLSL 1.10 and 1.20.  The paths differ
because the 1.20 paths:

  - Use the 'matNxN' names.

  - Initialize uniforms in the shaders.

  - Use array constructors to initialize arrays.

Somewhat to my surprise, this has triggered a different set of bugs.

Currently the i965 driver (7.11 branch) passes 492/648.  A number of
tests assert (1.10 path) or segfault (1.20 path).  I have a separate
patch bomb that I am going to drop on mesa-dev later today that fixes
all of these test cases for swrast and most of them in the i965 driver.

For reference I have posted the piglit results for swrast (with and
without my fixes), i965 (with and without my fixes), fglrx, and NVIDIA.

    http://people.freedesktop.org/~idr/variable-indexing-results/

Even with all of these tests, there are a lot of things that are not
tested but should be:

  - Non-square matrices.

  - Multiple non-constant accesses to the same array / matrix with
different indices as r-values.

  - Non-constant accesses to the same array in the LHS and RHS using
different indices.

  - Non-constant accesses to different arrays in the LHS and RHS using
the same index variable (but perhaps different values a[i] = b[i+1]).

  - Non-constant accesses to arrays as function parameters.

  - Function parameter as an additional type of storage.

  - Vertex shader input as an additional type of storage.  Shader_runner
cannot currently handle this.  Arrays of matrices as vertex shader
inputs also require GLSL 1.30.

  - Fragment shader output as an additional type of storage.  Arrays of
matrices as fragment shader outputs are not supported in GLSL, but
arrays of other types are.

  - Arrays of vectors.

  - Arrays of scalars.

  - Arrays of structures.

  - Structures containing arrays.

  - Structures containing matrices.

  - Structures containing arrays of matrices.

  - Arrays of structures containing arrays.

  - Arrays of structures containing matrices.

  - Arrays of structures containing arrays of matrices.

  - Arrays of structures containing structures containing arrays...

  - moar!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4knb8ACgkQX1gOwKyEAw/PiACglQ+hCYNu4nyaBk5BjczjrQ9H
CG8AniDBSudnQ1FxZ4WZ4iW+1xKjlzxW
=MAvp
-----END PGP SIGNATURE-----


More information about the Piglit mailing list