[Piglit] [PATCH v2] arb_shader_storage_buffer_object: memory qualifier tests for named blocks
Eduardo Lima Mitev
elima at igalia.com
Fri May 6 06:29:35 UTC 2016
There are missing tests to check for readonly and writeonly memory qualifiers
on a named interface block. And Mesa is actually failing to apply these
qualifiers right now.
v2: (Ilia Mirkin) Put each test case into its own shader file.
---
.../named-block-memory-qualifier-readonly-member.vert | 15 +++++++++++++++
.../compiler/named-block-memory-qualifier-readonly.vert | 15 +++++++++++++++
.../named-block-memory-qualifier-writeonly-member.vert | 15 +++++++++++++++
.../compiler/named-block-memory-qualifier-writeonly.vert | 15 +++++++++++++++
4 files changed, 60 insertions(+)
create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly-member.vert
create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly.vert
create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly-member.vert
create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly.vert
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly-member.vert b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly-member.vert
new file mode 100644
index 0000000..c5af6c1
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly-member.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+buffer Buffer {
+ readonly float foo;
+} buf;
+
+void main() {
+ buf.foo = 1.0;
+}
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly.vert b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly.vert
new file mode 100644
index 0000000..6145350
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-readonly.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+readonly buffer Buffer {
+ float foo;
+} buf;
+
+void main() {
+ buf.foo = 1.0;
+}
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly-member.vert b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly-member.vert
new file mode 100644
index 0000000..5b4c20a
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly-member.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+buffer Buffer {
+ writeonly float foo;
+} buf;
+
+void main(void) {
+ float result = buf.foo;
+}
diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly.vert b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly.vert
new file mode 100644
index 0000000..d9ffc24
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/compiler/named-block-memory-qualifier-writeonly.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+writeonly buffer Buffer {
+ float foo;
+} buf;
+
+void main(void) {
+ float result = buf.foo;
+}
--
2.7.0
More information about the Piglit
mailing list