Re: [Piglit] [PATCH] GLSL: Test that input layout qualifiers cannot be used on variable declarations

2013-10-07 Thread Paul Berry
On 20 September 2013 12:31, Nicholas Mack  wrote:

> ---
>  ...-layout-qualifiers-with-variable-declarations.geom | 19
> +++
>  ...-layout-qualifiers-with-variable-declarations.geom | 19
> +++
>  2 files changed, 38 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
>  create mode 100644
> tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
>
> diff --git
> a/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> new file mode 100644
> index 000..f26b60d
> --- /dev/null
> +++
> b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
>

This needs to be "check_link: false".  Otherwise the test will erroneously
pass due to lacking the necessary input/output layout qualifiers.

A similar change needs to be made to
incorrect-out-layout-qualifiers-with-variable-declarations.geom.

With that change, this patch is:

Reviewed-by: Paul Berry 


> +// [end config]
> +//
> +// Tests that input layout qualifiers cannot be used on a variable
> declaration.
> +//
> +// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
> +// "Geometry shaders allow input layout qualifiers only on the interface
> +//  qualifier in, not on an input block,block member, or variable."
> +
> +#version 150
> +
> +layout(points) in float c[];
> +
> +void main()
> +{
> +}
> diff --git
> a/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> new file mode 100644
> index 000..161de1c
> --- /dev/null
> +++
> b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Tests that output layout qualifiers cannot be used on a variable
> declaration.
> +//
> +// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
> +// "Geometry shaders can have output layout qualifiers only on the
> interface
> +//  qualifier out, not on an output block or variable declaration."
> +
> +#version 150
> +
> +layout(points) out float c;
> +
> +void main()
> +{
> +}
> --
> 1.8.3.1
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] GLSL: Test that input layout qualifiers cannot be used on variable declarations

2013-09-20 Thread Nicholas Mack
---
 ...-layout-qualifiers-with-variable-declarations.geom | 19 +++
 ...-layout-qualifiers-with-variable-declarations.geom | 19 +++
 2 files changed, 38 insertions(+)
 create mode 100644 
tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
 create mode 100644 
tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom

diff --git 
a/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
 
b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
new file mode 100644
index 000..f26b60d
--- /dev/null
+++ 
b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that input layout qualifiers cannot be used on a variable declaration.
+//
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
+// "Geometry shaders allow input layout qualifiers only on the interface
+//  qualifier in, not on an input block,block member, or variable."
+
+#version 150
+
+layout(points) in float c[];
+
+void main()
+{
+}
diff --git 
a/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
 
b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
new file mode 100644
index 000..161de1c
--- /dev/null
+++ 
b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that output layout qualifiers cannot be used on a variable 
declaration.
+//
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
+// "Geometry shaders can have output layout qualifiers only on the interface
+//  qualifier out, not on an output block or variable declaration."
+
+#version 150
+
+layout(points) out float c;
+
+void main()
+{
+}
-- 
1.8.3.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit