[Piglit] [PATCH 4/6] glslparsertest: Add tests for bit-not in GLSL 1.30
Chad Versace
chad at chad-versace.us
Tue Oct 12 17:53:46 PDT 2010
From: Chad Versace <chad.versace at intel.com>
---
tests/glslparser.tests | 6 ++++++
tests/glslparsertest/glsl2/bit-not-03.frag | 11 +++++++++++
tests/glslparsertest/glsl2/bit-not-04.frag | 11 +++++++++++
tests/glslparsertest/glsl2/bit-not-05.frag | 11 +++++++++++
tests/glslparsertest/glsl2/bit-not-06.frag | 11 +++++++++++
tests/glslparsertest/glsl2/bit-not-07.frag | 11 +++++++++++
tests/glslparsertest/glsl2/bit-not-08.frag | 11 +++++++++++
7 files changed, 72 insertions(+), 0 deletions(-)
create mode 100644 tests/glslparsertest/glsl2/bit-not-03.frag
create mode 100644 tests/glslparsertest/glsl2/bit-not-04.frag
create mode 100644 tests/glslparsertest/glsl2/bit-not-05.frag
create mode 100644 tests/glslparsertest/glsl2/bit-not-06.frag
create mode 100644 tests/glslparsertest/glsl2/bit-not-07.frag
create mode 100644 tests/glslparsertest/glsl2/bit-not-08.frag
diff --git a/tests/glslparser.tests b/tests/glslparser.tests
index 8500fbd..c8ca2a9 100644
--- a/tests/glslparser.tests
+++ b/tests/glslparser.tests
@@ -223,6 +223,12 @@ add_otherglslparsertest('glsl2/attribute-10.vert', 'fail', '1.20')
add_otherglslparsertest('glsl2/attribute-11.vert', 'fail', '1.30')
add_otherglslparsertest('glsl2/bit-not-01.frag', 'fail')
add_otherglslparsertest('glsl2/bit-not-02.frag', 'fail', '1.20')
+add_otherglslparsertest('glsl2/bit-not-03.frag', 'pass', '1.30')
+add_otherglslparsertest('glsl2/bit-not-04.frag', 'pass', '1.30')
+add_otherglslparsertest('glsl2/bit-not-05.frag', 'pass', '1.30')
+add_otherglslparsertest('glsl2/bit-not-06.frag', 'pass', '1.30')
+add_otherglslparsertest('glsl2/bit-not-07.frag', 'fail', '1.30')
+add_otherglslparsertest('glsl2/bit-not-08.frag', 'fail', '1.30')
add_otherglslparsertest('glsl2/builtin-functions-110.vert', 'pass')
add_otherglslparsertest('glsl2/builtin-functions-110.frag', 'pass')
add_otherglslparsertest('glsl2/builtin-functions-120.vert', 'pass', '1.20')
diff --git a/tests/glslparsertest/glsl2/bit-not-03.frag b/tests/glslparsertest/glsl2/bit-not-03.frag
new file mode 100644
index 0000000..f801542
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-03.frag
@@ -0,0 +1,11 @@
+// Expected: PASS, glsl == 1.30
+//
+// Description: bit-not with int argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ int x = ~ 4;
+}
diff --git a/tests/glslparsertest/glsl2/bit-not-04.frag b/tests/glslparsertest/glsl2/bit-not-04.frag
new file mode 100644
index 0000000..d86a51b
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-04.frag
@@ -0,0 +1,11 @@
+// Expected: PASS, glsl == 1.30
+//
+// Description: bit-not with int argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ uint x = ~ uint(4);
+}
diff --git a/tests/glslparsertest/glsl2/bit-not-05.frag b/tests/glslparsertest/glsl2/bit-not-05.frag
new file mode 100644
index 0000000..1a25571
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-05.frag
@@ -0,0 +1,11 @@
+// Expected: PASS, glsl == 1.30
+//
+// Description: bit-not with ivec2 argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ ivec2 v = ~ ivec2(1, 2);
+}
diff --git a/tests/glslparsertest/glsl2/bit-not-06.frag b/tests/glslparsertest/glsl2/bit-not-06.frag
new file mode 100644
index 0000000..c737257
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-06.frag
@@ -0,0 +1,11 @@
+// Expected: PASS, glsl == 1.30
+//
+// Description: bit-not with uvec2 argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ uvec2 v = ~ uvec2(0, 1);
+}
diff --git a/tests/glslparsertest/glsl2/bit-not-07.frag b/tests/glslparsertest/glsl2/bit-not-07.frag
new file mode 100644
index 0000000..a6e55f9
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-07.frag
@@ -0,0 +1,11 @@
+// Expected: FAIL, glsl == 1.30
+//
+// Description: bit-not with bool argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ bool x = ~ true;
+}
diff --git a/tests/glslparsertest/glsl2/bit-not-08.frag b/tests/glslparsertest/glsl2/bit-not-08.frag
new file mode 100644
index 0000000..659bf0b
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-08.frag
@@ -0,0 +1,11 @@
+// Expected: FAIL, glsl == 1.30
+//
+// Description: bit-not with uvec2 argument
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operand must be of type signed or unsigned integer or integer vector,"
+
+#version 130
+void main() {
+ vec2 v = ~ vec2(1, 2);
+}
--
1.7.1
More information about the Piglit
mailing list