[Piglit] [PATCH 2/8] GL_ARB_uniform_buffer_object: New test for nested UBO declarations.
Eric Anholt
eric at anholt.net
Tue May 1 11:08:11 PDT 2012
---
.../compiler/uniform-block-nested.frag | 26 ++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/uniform-block-nested.frag
diff --git a/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-nested.frag b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-nested.frag
new file mode 100644
index 0000000..b522c52
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-nested.frag
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+#version 120
+#extension GL_ARB_uniform_buffer_object: require
+
+/* From the GL_ARB_uniform_buffer_object spec:
+ *
+ * " Properties of Uniforms and uniform blocks:
+ * [...]
+ * k) Uniform block declarations may not be nested"
+ */
+
+uniform a {
+ vec4 b;
+ uniform c {
+ vec4 d;
+ };
+};
+
+vec4 foo(void) {
+ return b;
+}
--
1.7.10
More information about the Piglit
mailing list