[Piglit] [PATCH 5/8] GL_ARB_uniform_buffer_object: Test that samplers are illegal.

Eric Anholt eric at anholt.net
Tue May 1 11:08:14 PDT 2012


---
 .../compiler/uniform-block-sampler.frag            |   23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 tests/spec/arb_uniform_buffer_object/compiler/uniform-block-sampler.frag

diff --git a/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-sampler.frag b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-sampler.frag
new file mode 100644
index 0000000..0e6282b
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-sampler.frag
@@ -0,0 +1,23 @@
+// [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:
+ *
+ *     "Sampler types are not allowed inside of uniform blocks. All
+ *      other types, arrays, and structures allowed for uniforms are
+ *      allowed within a uniform block."
+ */
+
+uniform a {
+	uniform sampler2D s;
+};
+
+vec4 foo(void) {
+	return texture2D(s, vec2(0.0));
+}
-- 
1.7.10



More information about the Piglit mailing list