[Piglit] [PATCH 2/2] ssbo: add basic write test to demo shader_runner feature

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 13 16:03:47 PST 2016


---
 .../execution/basic-write.shader_test              | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/execution/basic-write.shader_test

diff --git a/tests/spec/arb_shader_storage_buffer_object/execution/basic-write.shader_test b/tests/spec/arb_shader_storage_buffer_object/execution/basic-write.shader_test
new file mode 100644
index 0000000..deab272
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/execution/basic-write.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 140
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout (std430) buffer ssbo {
+  uint a[];
+};
+uniform uint v;
+
+void main() {
+   gl_FragColor = vec4(0, 1, 0, 1);
+   if (ivec2(gl_FragCoord.xy) == ivec2(0)) {
+      a[0] = uint(a.length());
+      a[1] = v;
+   }
+}
+
+[test]
+ssbo 8
+
+uniform uint v 10
+draw rect -1 -1 2 2
+probe all rgba 0 1 0 1
+probe ssbo uint 0 == 2
+probe ssbo uint 4 == 10
-- 
2.4.10



More information about the Piglit mailing list