[Piglit] [PATCH] glsl: Verify that #version 0 generates an error instead of crashing

Dylan Baker dylan at pnwbakers.com
Wed Aug 24 19:42:28 UTC 2016


Quoting Ian Romanick (2016-08-24 12:32:15)
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97420
> ---
>  tests/spec/glsl-1.10/compiler/version-0.frag    | 8 ++++++++
>  tests/spec/glsl-1.10/compiler/version-0.vert    | 8 ++++++++
>  tests/spec/glsl-es-3.00/compiler/version-0.frag | 8 ++++++++
>  tests/spec/glsl-es-3.00/compiler/version-0.vert | 8 ++++++++
>  4 files changed, 32 insertions(+)
>  create mode 100644 tests/spec/glsl-1.10/compiler/version-0.frag
>  create mode 100644 tests/spec/glsl-1.10/compiler/version-0.vert
>  create mode 100644 tests/spec/glsl-es-3.00/compiler/version-0.frag
>  create mode 100644 tests/spec/glsl-es-3.00/compiler/version-0.vert
> 
> diff --git a/tests/spec/glsl-1.10/compiler/version-0.frag b/tests/spec/glsl-1.10/compiler/version-0.frag
> new file mode 100644
> index 0000000..bed4793
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/version-0.frag
> @@ -0,0 +1,8 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.10
> +// [end config]
> +
> +#version 0
> +
> +void main() { gl_FragColor = vec4(0); }
> \ No newline at end of file
> diff --git a/tests/spec/glsl-1.10/compiler/version-0.vert b/tests/spec/glsl-1.10/compiler/version-0.vert
> new file mode 100644
> index 0000000..342df76
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/version-0.vert
> @@ -0,0 +1,8 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.10
> +// [end config]
> +
> +#version 0
> +
> +void main() { gl_Position = vec4(0); }
> \ No newline at end of file
> diff --git a/tests/spec/glsl-es-3.00/compiler/version-0.frag b/tests/spec/glsl-es-3.00/compiler/version-0.frag
> new file mode 100644
> index 0000000..126dcab
> --- /dev/null
> +++ b/tests/spec/glsl-es-3.00/compiler/version-0.frag
> @@ -0,0 +1,8 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 3.00
> +// [end config]
> +
> +#version 0 es
> +
> +void main() { }
> diff --git a/tests/spec/glsl-es-3.00/compiler/version-0.vert b/tests/spec/glsl-es-3.00/compiler/version-0.vert
> new file mode 100644
> index 0000000..1383fe3
> --- /dev/null
> +++ b/tests/spec/glsl-es-3.00/compiler/version-0.vert
> @@ -0,0 +1,8 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 3.00
> +// [end config]
> +
> +#version 0 es
> +
> +void main() { gl_Position = vec4(0); }
> -- 
> 2.5.5
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160824/5e200252/attachment-0001.sig>


More information about the Piglit mailing list