[Piglit] [PATCH 2/2] GL_ARB_ubo: Add tests for disabling the extension.
Eric Anholt
eric at anholt.net
Thu Jul 26 16:32:44 PDT 2012
---
.../compiler/extension-disabled-column-major.frag | 24 ++++++++++++++++++
.../compiler/extension-disabled-row-major.frag | 24 ++++++++++++++++++
.../compiler/extension-disabled-std140.frag | 24 ++++++++++++++++++
.../compiler/extension-disabled-uniform-block.frag | 26 ++++++++++++++++++++
4 files changed, 98 insertions(+)
create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-column-major.frag
create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-row-major.frag
create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-std140.frag
create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-uniform-block.frag
diff --git a/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-column-major.frag b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-column-major.frag
new file mode 100644
index 0000000..f514fc1
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-column-major.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+/* From the GL_ARB_uniform_buffer_object_spec:
+ *
+ * "Uniform block layout qualifiers can be declared at global
+ * scope, on a single uniform block, or on a single block member.
+ *
+ * At global scope, it is an error to use layout qualifiers to
+ * declare a variable. Instead, at global scope, layout
+ * qualifiers apply just to the keyword uniform and establish
+ * default qualification for subsequent blocks:"
+ */
+
+#version 120
+#extension GL_ARB_uniform_buffer_object: disable
+
+layout(column_major) uniform;
+
+void foo(void) {
+}
diff --git a/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-row-major.frag b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-row-major.frag
new file mode 100644
index 0000000..4561f62
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-row-major.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+/* From the GL_ARB_uniform_buffer_object_spec:
+ *
+ * "Uniform block layout qualifiers can be declared at global
+ * scope, on a single uniform block, or on a single block member.
+ *
+ * At global scope, it is an error to use layout qualifiers to
+ * declare a variable. Instead, at global scope, layout
+ * qualifiers apply just to the keyword uniform and establish
+ * default qualification for subsequent blocks:"
+ */
+
+#version 120
+#extension GL_ARB_uniform_buffer_object: disable
+
+layout(row_major) uniform;
+
+void foo(void) {
+}
diff --git a/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-std140.frag b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-std140.frag
new file mode 100644
index 0000000..5e24193
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-std140.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+/* From the GL_ARB_uniform_buffer_object_spec:
+ *
+ * "Uniform block layout qualifiers can be declared at global
+ * scope, on a single uniform block, or on a single block member.
+ *
+ * At global scope, it is an error to use layout qualifiers to
+ * declare a variable. Instead, at global scope, layout
+ * qualifiers apply just to the keyword uniform and establish
+ * default qualification for subsequent blocks:"
+ */
+
+#version 120
+#extension GL_ARB_uniform_buffer_object: disable
+
+layout(std140) uniform;
+
+void foo(void) {
+}
diff --git a/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-uniform-block.frag b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-uniform-block.frag
new file mode 100644
index 0000000..b7fc23d
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/extension-disabled-uniform-block.frag
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+/* From the GL_ARB_uniform_buffer_object_spec:
+ *
+ * "Uniform block layout qualifiers can be declared at global
+ * scope, on a single uniform block, or on a single block member.
+ *
+ * At global scope, it is an error to use layout qualifiers to
+ * declare a variable. Instead, at global scope, layout
+ * qualifiers apply just to the keyword uniform and establish
+ * default qualification for subsequent blocks:"
+ */
+
+#version 120
+#extension GL_ARB_uniform_buffer_object: disable
+
+uniform ub {
+ vec4 a;
+};
+
+void foo(void) {
+}
--
1.7.10.4
More information about the Piglit
mailing list