[Piglit] [PATCH 2/2] glsl-3.30: Port the profile tests forward.
Ian Romanick
idr at freedesktop.org
Wed Aug 28 11:47:34 PDT 2013
On 08/23/2013 11:46 AM, Kenneth Graunke wrote:
> These are the tests from glsl-1.50/compiler/profiles with the version
> numbers changed. It seemed worth testing for 3.30 as well.
> ---
> .../compiler/profiles/core-profile-default.vert | 16 ++++++++++++++++
> .../glsl-3.30/compiler/profiles/core-profile-define.frag | 7 +++++++
> .../compiler/profiles/version-330-bad-profile.frag | 7 +++++++
> .../compiler/profiles/version-330-core-profile.frag | 7 +++++++
> .../compiler/profiles/version-330-es-profile.frag | 7 +++++++
> 5 files changed, 44 insertions(+)
> create mode 100644 tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
> create mode 100644 tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
> create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
> create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
> create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag
>
> diff --git a/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert b/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
> new file mode 100644
> index 0000000..4ba986f
> --- /dev/null
> +++ b/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
> @@ -0,0 +1,16 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 3.30
> +// [end config]
> +
> +/* The GLSL 3.30 spec says
> + * "If no profile argument is provided, the default is core."
> + */
> +#version 330
> +
> +void main() {
> + /* gl_ClipVertex is deprecated and not available in GLSL 3.30 core, so
> + * it should cause a compilation error.
> + */
> + gl_Position = gl_ClipVertex;
> +}
> diff --git a/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag b/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
> new file mode 100644
> index 0000000..bcb3842
> --- /dev/null
> +++ b/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// [end config]
> +
> +#version 150
330?
> +int x = GL_core_profile;
Same comments here as the __VERSION__ test.
> diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
> new file mode 100644
> index 0000000..e6750b4
> --- /dev/null
> +++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 3.30
> +// [end config]
> +
> +#version 330 fhqwhgads
> +void main() {}
> diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
> new file mode 100644
> index 0000000..7e29d05
> --- /dev/null
> +++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// [end config]
> +
> +#version 330 core
> +void main() {}
> diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag
> new file mode 100644
> index 0000000..b16751a
> --- /dev/null
> +++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 3.30
> +// [end config]
> +
> +#version 330 es
> +void main() {}
>
More information about the Piglit
mailing list