[Piglit] [PATCH 2/4] glslparsertest: Add tests for bit-not in GLSL 1.30

Ian Romanick idr at freedesktop.org
Mon Oct 11 17:47:08 PDT 2010


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

Chad Versace wrote:
> From: Chad Versace <chad.versace at intel.com>
> 
> ---
>  tests/glslparser.tests                     |    7 ++++++-
>  tests/glslparsertest/glsl2/bit-not-01.frag |   11 +++++++++++
>  tests/glslparsertest/glsl2/bit-not-02.frag |   11 +++++++++++
>  tests/glslparsertest/glsl2/bit-not-03.frag |   11 +++++++++++
>  tests/glslparsertest/glsl2/bit-not-04.frag |   11 +++++++++++
>  tests/glslparsertest/glsl2/bit-not-05.frag |   11 +++++++++++
>  tests/glslparsertest/glsl2/bit-not-06.frag |   11 +++++++++++
>  7 files changed, 72 insertions(+), 1 deletions(-)
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-01.frag
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-02.frag
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-03.frag
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-04.frag
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-05.frag
>  create mode 100644 tests/glslparsertest/glsl2/bit-not-06.frag
> 
> diff --git a/tests/glslparser.tests b/tests/glslparser.tests
> index 88f27ca..b258da4 100644
> --- a/tests/glslparser.tests
> +++ b/tests/glslparser.tests
> @@ -221,7 +221,12 @@ add_otherglslparsertest('glsl2/attribute-08.vert', 'fail')
>  add_otherglslparsertest('glsl2/attribute-09.vert', 'fail')
>  add_otherglslparsertest('glsl2/attribute-10.vert', 'fail', '1.20')
>  add_otherglslparsertest('glsl2/attribute-11.vert', 'fail', '1.30')
> -add_otherglslparsertest('glsl2/bitwise-01.frag', 'fail')

This test should be renamed to match the new pattern, but it should not
be removed.  We still expect bit-not to be rejected in GLSL 1.10 or GLSL
1.20 mode.

> +add_otherglslparsertest('glsl2/bit-not-01.frag', 'pass', '1.30')
> +add_otherglslparsertest('glsl2/bit-not-02.frag', 'pass', '1.30')
> +add_otherglslparsertest('glsl2/bit-not-03.frag', 'pass', '1.30')
> +add_otherglslparsertest('glsl2/bit-not-04.frag', 'pass', '1.30')
> +add_otherglslparsertest('glsl2/bit-not-05.frag', 'fail', '1.30')
> +add_otherglslparsertest('glsl2/bit-not-06.frag', 'fail', '1.30')
>  add_otherglslparsertest('glsl2/builtin-functions-110.vert', 'pass')
>  add_otherglslparsertest('glsl2/builtin-functions-110.frag', 'pass')
>  add_otherglslparsertest('glsl2/builtin-functions-120.vert', 'pass', '1.20')
> diff --git a/tests/glslparsertest/glsl2/bit-not-01.frag b/tests/glslparsertest/glsl2/bit-not-01.frag
> new file mode 100644
> index 0000000..f801542
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-01.frag
> @@ -0,0 +1,11 @@
> +// Expected: PASS, glsl == 1.30
> +//
> +// Description: bit-not with int argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    int x = ~ 4;
> +}
> diff --git a/tests/glslparsertest/glsl2/bit-not-02.frag b/tests/glslparsertest/glsl2/bit-not-02.frag
> new file mode 100644
> index 0000000..d86a51b
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-02.frag
> @@ -0,0 +1,11 @@
> +// Expected: PASS, glsl == 1.30
> +//
> +// Description: bit-not with int argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    uint x = ~ uint(4);
> +}
> diff --git a/tests/glslparsertest/glsl2/bit-not-03.frag b/tests/glslparsertest/glsl2/bit-not-03.frag
> new file mode 100644
> index 0000000..1a25571
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-03.frag
> @@ -0,0 +1,11 @@
> +// Expected: PASS, glsl == 1.30
> +//
> +// Description: bit-not with ivec2 argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    ivec2 v = ~ ivec2(1, 2);
> +}
> diff --git a/tests/glslparsertest/glsl2/bit-not-04.frag b/tests/glslparsertest/glsl2/bit-not-04.frag
> new file mode 100644
> index 0000000..c737257
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-04.frag
> @@ -0,0 +1,11 @@
> +// Expected: PASS, glsl == 1.30
> +//
> +// Description: bit-not with uvec2 argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    uvec2 v = ~ uvec2(0, 1);
> +}
> diff --git a/tests/glslparsertest/glsl2/bit-not-05.frag b/tests/glslparsertest/glsl2/bit-not-05.frag
> new file mode 100644
> index 0000000..14056f2
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-05.frag
> @@ -0,0 +1,11 @@
> +// Expected: PASS, glsl == 1.30
                ^^^^
FAIL?

> +//
> +// Description: bit-not with bool argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    bool x = ~ true;
> +}
> diff --git a/tests/glslparsertest/glsl2/bit-not-06.frag b/tests/glslparsertest/glsl2/bit-not-06.frag
> new file mode 100644
> index 0000000..659bf0b
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/bit-not-06.frag
> @@ -0,0 +1,11 @@
> +// Expected: FAIL, glsl == 1.30
> +//
> +// Description: bit-not with uvec2 argument
> +//
> +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
> +// "The operand must be of type signed or unsigned integer or integer vector,"
> +
> +#version 130
> +void main() {
> +    vec2 v = ~ vec2(1, 2);
> +}

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyzsAsACgkQX1gOwKyEAw8PFQCdECrvd+YBuqjtrbBrLyNyiYln
9QsAnjmU9mg6hDt1RF0spIr/mNvDlyuh
=jNue
-----END PGP SIGNATURE-----


More information about the Piglit mailing list