[Piglit] [PATCH 2/2] Add new tests for GLSL 1.50 #version directives.
Matt Turner
mattst88 at gmail.com
Fri Jun 7 22:51:04 PDT 2013
On Fri, Jun 7, 2013 at 10:20 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> GLSL 1.50 introduces the ability to specify profiles on the #version
> line. These new tests ensure #version 150 core is accepted while
> invalid profiles are not. Another new test ensures that the new
> GL_core_profile #define is present. Finally, another test makes sure
> __VERSION__ works as expected.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> tests/spec/glsl-1.50/compiler/profiles/core-profile-define.frag | 7 +++++++
> .../spec/glsl-1.50/compiler/profiles/version-150-bad-profile.frag | 7 +++++++
> .../spec/glsl-1.50/compiler/profiles/version-150-core-profile.frag | 7 +++++++
> tests/spec/glsl-1.50/compiler/profiles/version-150-es-profile.frag | 7 +++++++
> tests/spec/glsl-1.50/compiler/version-macro.frag | 7 +++++++
> 5 files changed, 35 insertions(+)
> create mode 100644 tests/spec/glsl-1.50/compiler/profiles/core-profile-define.frag
> create mode 100644 tests/spec/glsl-1.50/compiler/profiles/version-150-bad-profile.frag
> create mode 100644 tests/spec/glsl-1.50/compiler/profiles/version-150-core-profile.frag
> create mode 100644 tests/spec/glsl-1.50/compiler/profiles/version-150-es-profile.frag
> create mode 100644 tests/spec/glsl-1.50/compiler/version-macro.frag
>
> diff --git a/tests/spec/glsl-1.50/compiler/profiles/core-profile-define.frag b/tests/spec/glsl-1.50/compiler/profiles/core-profile-define.frag
> new file mode 100644
> index 0000000..13d0100
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/profiles/core-profile-define.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +
> +#version 150
> +int x = GL_core_profile;
> diff --git a/tests/spec/glsl-1.50/compiler/profiles/version-150-bad-profile.frag b/tests/spec/glsl-1.50/compiler/profiles/version-150-bad-profile.frag
> new file mode 100644
> index 0000000..31c9cd0
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/profiles/version-150-bad-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// [end config]
> +
> +#version 150 fhqwhgads
> +void main() {}
> diff --git a/tests/spec/glsl-1.50/compiler/profiles/version-150-core-profile.frag b/tests/spec/glsl-1.50/compiler/profiles/version-150-core-profile.frag
> new file mode 100644
> index 0000000..28ba558
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/profiles/version-150-core-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +
> +#version 150 core
> +void main() {}
> diff --git a/tests/spec/glsl-1.50/compiler/profiles/version-150-es-profile.frag b/tests/spec/glsl-1.50/compiler/profiles/version-150-es-profile.frag
> new file mode 100644
> index 0000000..131fe4d
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/profiles/version-150-es-profile.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// [end config]
> +
> +#version 150 es
> +void main() {}
> diff --git a/tests/spec/glsl-1.50/compiler/version-macro.frag b/tests/spec/glsl-1.50/compiler/version-macro.frag
> new file mode 100644
> index 0000000..735ffc8
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/version-macro.frag
> @@ -0,0 +1,7 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +
> +#version 150
> +int x[int(__VERSION__ == 150)];
> --
> 1.8.3
Both are
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Does glslparsertest test need to know about core/compatibility options
for glsl_version?
More information about the Piglit
mailing list