[Piglit] [PATCH] glsl-1.50: test shader compiles with unused uniform block

Timothy Arceri t_arceri at yahoo.com.au
Tue Sep 22 20:36:54 PDT 2015


Tests the second bug mentioned in the bug report.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83508
---
 .../uniform_block/unused-interface-array.vert         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert

diff --git a/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
new file mode 100644
index 0000000..e28ffe9
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.50
+ * [end config]
+ * 
+ * Tests that shader still compiles with an unused uniform block. A packed
+ * layout means the implementation can eliminate the block entirely.
+ */
+#version 150
+
+layout(packed) uniform ArrayBlock
+{
+  mat4 a;
+} i[4];
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
-- 
2.4.3



More information about the Piglit mailing list