[Piglit] [PATCH 1/8] arb_enhanced_layouts: add negative test for atmoic binding qualifier

Timothy Arceri timothy.arceri at collabora.com
Sun Nov 29 14:19:50 PST 2015


From: Timothy Arceri <t_arceri at yahoo.com.au>

---
 .../negative-qualifiers/binding-atomic.frag        | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compile-time-constants/negative-qualifiers/binding-atomic.frag

diff --git a/tests/spec/arb_enhanced_layouts/compiler/compile-time-constants/negative-qualifiers/binding-atomic.frag b/tests/spec/arb_enhanced_layouts/compiler/compile-time-constants/negative-qualifiers/binding-atomic.frag
new file mode 100644
index 0000000..cafd243
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compile-time-constants/negative-qualifiers/binding-atomic.frag
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shader_atomic_counters GL_ARB_enhanced_layouts
+// [end config]
+//
+// From Section 4.4.6 (Opaque-Uniform Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "If the binding is less than zero, or greater than or equal to the
+//    implementation-dependent maximum supported number of units, a
+//    compile-time error will occur."
+
+#version 140
+#extension GL_ARB_shader_atomic_counters: require
+#extension GL_ARB_enhanced_layouts: require
+
+const int start = 3;
+layout(binding = start - 4) uniform atomic_uint x;
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list