[Piglit] [PATCH 01/12] glsl-1.10: Test the parameters cannot be const and out/inout.
Matt Turner
mattst88 at gmail.com
Thu Jul 18 13:34:57 PDT 2013
---
tests/glslparsertest/shaders/function6.frag | 21 ---------------------
.../declarations/const-inout-parameter.frag | 10 ++++++++++
.../compiler/declarations/const-out-parameter.frag | 10 ++++++++++
3 files changed, 20 insertions(+), 21 deletions(-)
delete mode 100644 tests/glslparsertest/shaders/function6.frag
create mode 100644 tests/spec/glsl-1.10/compiler/declarations/const-inout-parameter.frag
create mode 100644 tests/spec/glsl-1.10/compiler/declarations/const-out-parameter.frag
diff --git a/tests/glslparsertest/shaders/function6.frag b/tests/glslparsertest/shaders/function6.frag
deleted file mode 100644
index 735cc53..0000000
--- a/tests/glslparsertest/shaders/function6.frag
+++ /dev/null
@@ -1,21 +0,0 @@
-// [config]
-// expect_result: fail
-// glsl_version: 1.10
-//
-// # NOTE: Config section was auto-generated from file
-// # NOTE: 'glslparser.tests' at git revision
-// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
-// [end config]
-
-void function(const out int i)
-{ // out parameters cannot be const
- i = 3;
-}
-
-void main()
-{
- int i;
- function(i);
-}
-
-
diff --git a/tests/spec/glsl-1.10/compiler/declarations/const-inout-parameter.frag b/tests/spec/glsl-1.10/compiler/declarations/const-inout-parameter.frag
new file mode 100644
index 0000000..facf8bd
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/declarations/const-inout-parameter.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+/* The GLSL 1.10 spec says:
+ *
+ * "[T]he const qualifier cannot be used with out or inout."
+ */
+void function(const inout int i) {}
diff --git a/tests/spec/glsl-1.10/compiler/declarations/const-out-parameter.frag b/tests/spec/glsl-1.10/compiler/declarations/const-out-parameter.frag
new file mode 100644
index 0000000..7ee0cd0
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/declarations/const-out-parameter.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+/* The GLSL 1.10 spec says:
+ *
+ * "[T]he const qualifier cannot be used with out or inout."
+ */
+void function(const out int i) {}
--
1.8.1.5
More information about the Piglit
mailing list