[Piglit] [PATCH 0/6] Interpolation tests and shader_runner features
Paul Berry
stereotype441 at gmail.com
Thu Oct 20 14:12:22 PDT 2011
The following patch series adds shader_runner tests of GLSL 1.30
interpolation qualifiers ('flat', 'noperspective', and 'smooth')
to Piglit.
This requires a bit of prep work, since in order to test interpolation
effectively, we need shader_runner to be able to (a) draw triangles,
(b) enable VERTEX_PROGRAM_TWO_SIDE (so we can effectively test
interpolation of gl_BackColor and gl_BackSecondaryColor), (c) use a
frustum projection, and (d) set the GL shade model. The first five
patches in the series extend shader_runner to support these features;
the fifth implements the interpolation qualifier tests.
At Ian's suggestion, rather than just add a "draw triangle" command to
shader_runner, I added a facility for specifying arbitrary vertex
attribute data to a shader_runner test using a "[vertex data]"
section, e.g.:
[vertex data]
vertex/float/3 foo/uint/1 bar/int/2
0.0 0.0 0.0 0xe0000000 0 0
0.0 1.0 0.0 0x70000000 1 1
1.0 1.0 0.0 0x00000000 0 1
If this section is specified, then primitives can be drawn using a new
shader_runner command, "draw arrays", which behaves exactly like the
glDrawArrays() function.
The interpolation tests themselves are generated using a Python
script, since there are 160 possibilities we wish to test, most of
which require a slightly different vertex shader program.
[PATCH 1/6] Make all.tests add tests/shaders recursively.
[PATCH 2/6] Add vbo support to shader_runner.
[PATCH 3/6] Add shader_runner support for GL_VERTEX_PROGRAM_TWO_SIDE.
[PATCH 4/6] Add a "frustum" command to shader_runner.
[PATCH 5/6] Add a "shade model" command to shader_runner.
[PATCH 6/6] Add tests of interpolation qualifier behavior.
More information about the Piglit
mailing list