[Piglit] [PATCH 7/8] arb_shader_storage_buffer_object: add execution/basic.shader_test

Nicolai Hähnle nhaehnle at gmail.com
Thu Apr 7 01:10:51 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

This is simpler than existing tests and can therefore help as a sanity
check and for early bring-up.
---
 .../execution/basic.shader_test                    | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/execution/basic.shader_test

diff --git a/tests/spec/arb_shader_storage_buffer_object/execution/basic.shader_test b/tests/spec/arb_shader_storage_buffer_object/execution/basic.shader_test
new file mode 100644
index 0000000..ac28a11
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/execution/basic.shader_test
@@ -0,0 +1,33 @@
+# Simple read-only test of SSBOs.
+
+[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
+
+layout(binding = 0) buffer ssbo_color { vec4 color; float color_scale; };
+
+out vec4 outcolor;
+
+void main() {
+    outcolor = color * color_scale;
+}
+
+[test]
+ssbo 0 32
+ssbo 0 subdata float 0 1.0
+ssbo 0 subdata float 4 2.0
+ssbo 0 subdata float 12 0.8
+ssbo 0 subdata float 16 0.5
+
+clear color 1.0 0.0 0.0 1.0
+clear
+
+draw rect -1 -1 2 2
+probe all rgba 0.5 1.0 0.0 0.4
-- 
2.5.0



More information about the Piglit mailing list