[Piglit] [PATCH 2/4] glslparsertest: Add tests for bit-not in GLSL 1.30

Chad Versace chad at chad-versace.us
Mon Oct 11 17:39:50 PDT 2010


From: Chad Versace <chad.versace at intel.com>

---
 tests/glslparser.tests                     |    7 ++++++-
 tests/glslparsertest/glsl2/bit-not-01.frag |   11 +++++++++++
 tests/glslparsertest/glsl2/bit-not-02.frag |   11 +++++++++++
 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 +++++++++++
 7 files changed, 72 insertions(+), 1 deletions(-)
 create mode 100644 tests/glslparsertest/glsl2/bit-not-01.frag
 create mode 100644 tests/glslparsertest/glsl2/bit-not-02.frag
 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

diff --git a/tests/glslparser.tests b/tests/glslparser.tests
index 88f27ca..b258da4 100644
--- a/tests/glslparser.tests
+++ b/tests/glslparser.tests
@@ -221,7 +221,12 @@ add_otherglslparsertest('glsl2/attribute-08.vert', 'fail')
 add_otherglslparsertest('glsl2/attribute-09.vert', 'fail')
 add_otherglslparsertest('glsl2/attribute-10.vert', 'fail', '1.20')
 add_otherglslparsertest('glsl2/attribute-11.vert', 'fail', '1.30')
-add_otherglslparsertest('glsl2/bitwise-01.frag', 'fail')
+add_otherglslparsertest('glsl2/bit-not-01.frag', 'pass', '1.30')
+add_otherglslparsertest('glsl2/bit-not-02.frag', 'pass', '1.30')
+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', 'fail', '1.30')
+add_otherglslparsertest('glsl2/bit-not-06.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-01.frag b/tests/glslparsertest/glsl2/bit-not-01.frag
new file mode 100644
index 0000000..f801542
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-01.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-02.frag b/tests/glslparsertest/glsl2/bit-not-02.frag
new file mode 100644
index 0000000..d86a51b
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-02.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-03.frag b/tests/glslparsertest/glsl2/bit-not-03.frag
new file mode 100644
index 0000000..1a25571
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-03.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-04.frag b/tests/glslparsertest/glsl2/bit-not-04.frag
new file mode 100644
index 0000000..c737257
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-04.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-05.frag b/tests/glslparsertest/glsl2/bit-not-05.frag
new file mode 100644
index 0000000..14056f2
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-05.frag
@@ -0,0 +1,11 @@
+// Expected: PASS, 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-06.frag b/tests/glslparsertest/glsl2/bit-not-06.frag
new file mode 100644
index 0000000..659bf0b
--- /dev/null
+++ b/tests/glslparsertest/glsl2/bit-not-06.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