[Piglit] [PATCH] arb_shader_storage_buffer_object: add readonly and writeonly tests

Tapani Pälli tapani.palli at intel.com
Thu Aug 13 01:41:14 PDT 2015


These test usage of readonly and writeonly memory qualifiers for
ssbo block members.

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 .../compiler/memory-qualifier-readonly.frag              | 16 ++++++++++++++++
 .../compiler/memory-qualifier-writeonly.frag             | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-readonly.frag
 create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-writeonly.frag

diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-readonly.frag b/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-readonly.frag
new file mode 100644
index 0000000..32c2aa6
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-readonly.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 120
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer ssbo {
+	readonly float a;
+};
+
+void foo(void) {
+	a = 1.0;
+}
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-writeonly.frag b/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-writeonly.frag
new file mode 100644
index 0000000..7ee7d81
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/memory-qualifier-writeonly.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 120
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer ssbo {
+	writeonly float a;
+};
+
+float foo(void) {
+	return a;
+}
-- 
2.1.0



More information about the Piglit mailing list