[Piglit] [PATCH] arb_shader_storage_buffer_object: Test linking programs with large copies

Jordan Justen jordan.l.justen at intel.com
Fri Nov 20 10:58:54 PST 2015


We test linking of programs that copy a large array, and a large
structure.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
 seemed a bit too complex, when the more immediate issue was the linking
 failure. Maybe it would be good to verify that the copy actually works, but
 these at least expose the linking issue.

 .../linker/copy-large-array.shader_test            | 27 +++++++++++++++++++
 .../linker/copy-large-struct.shader_test           | 31 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test

diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
new file mode 100644
index 0000000..e0b04e5
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
@@ -0,0 +1,27 @@
+# Tests linking of a fragment shader that copies a 'large' array field
+# within an SSBO.
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+
+#define SIZE 16
+
+buffer SSBO {
+    mat4 src[SIZE];
+    mat4 dst[SIZE];
+};
+
+void main() {
+    dst = src;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
new file mode 100644
index 0000000..81de526
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
@@ -0,0 +1,31 @@
+# Tests linking of a fragment shader that copies a 'large' struct
+# field within an SSBO.
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+
+#define SIZE 16
+
+struct S {
+    mat4 m[SIZE];
+};
+
+buffer SSBO {
+    S src;
+    S dst;
+};
+
+void main() {
+    dst = src;
+}
+
+[test]
+link success
-- 
2.6.2



More information about the Piglit mailing list