[Piglit] [PATCH] Add operator tests to auto-generated built-in function tests.

Eric Anholt eric at anholt.net
Thu Aug 11 17:07:08 PDT 2011

On Thu, 11 Aug 2011 14:14:50 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> This patch adds tests for the following built-in GLSL operators:
> - op-add, op-sub, op-mult, op-div: binary arithemetic operators on
>   floats, vecs, mats, ints, and ivecs.
> - op-uplus, op-neg: unary arithmetic operators on floats, vecs, mats,
>   ints, and ivecs.
> - op-gt, op-lt, op-ge, op-le: comparison operators on ints and floats.
> - op-eq, op-ne: equality and inequality comparison on any GLSL 1.20 type.
> - op-and, op-or, op-xor: logical operations on bools.
> - op-not: unary logical not on bools.
> - op-selection: trinary selection operator (x?y:z), where the first
>   argument is a bool and the second and third arguments are any GLSL
>   1.20 type.
> Note that implicit type conversions are not tested.  So, for instance,
> int * ivec is tested, but float * ivec is not.  This was in an effort
> to avoid generating an outrageous number of tests.
> Note also that the "shortcut" behavior of logical and/or and trinary
> selection is not tested.
> These tests leverage the same test generation framework used to test
> built-in functions, so the tests exercise vertex shaders, fragment
> shaders, and constant folding.
> All in all 1332 tests are added, in the subtrees
> spec/glsl-1.{10,20}/{compiler,execution}/built-in-functions.

Awesome, I wasn't even expecting matrix operations or ternary ops.  I
think we could probably drop some of our hand-coded tests now that we
have these -- my glsl-vs-mat-*, for example.

1332 new tests, though, ouch -- I think I need to prod at making
shader_runner use FBOs so we can speed up our runs again.  Also, I take
back what I said when we first added parallel piglit.  I want it even
for GPU tests, and I want to burn all my cores to test as fast as I can.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20110811/f7a68b84/attachment-0001.pgp>

More information about the Piglit mailing list