summaryrefslogtreecommitdiff
path: root/tests/spec/arb_shader_storage_buffer_object
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-08-13 11:37:49 +0300
committerTapani Pälli <tapani.palli@intel.com>2015-08-18 14:33:25 +0300
commit3c8e39bcc56c7204d229c56a7c4a77ed7dd296a6 (patch)
treed5a8c3c8cbe02087f91e598aed97470bceb86d37 /tests/spec/arb_shader_storage_buffer_object
parentd4f51070a25d05afe418cdd3dc05c1d9fce83c16 (diff)
arb_shader_storage_buffer_object: add readonly and writeonly tests
These test usage of readonly and writeonly memory qualifiers for ssbo block members. v2: rename tests to better distinguish them (Timothy) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Diffstat (limited to 'tests/spec/arb_shader_storage_buffer_object')
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifier-readonly.frag16
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifier-writeonly.frag16
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifier-readonly.frag b/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifier-readonly.frag
new file mode 100644
index 000000000..32c2aa671
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/member-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/member-memory-qualifier-writeonly.frag b/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifier-writeonly.frag
new file mode 100644
index 000000000..7ee7d816b
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/member-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;
+}