[Piglit] [PATCH] arb_shader_image_load_store: compiler tests for memory qualifiers

Jordan Justen jordan.l.justen at intel.com
Wed Dec 3 16:57:34 PST 2014


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Cc: Francisco Jerez <currojerez at riseup.net>
---
Francisco,

Question for your image-load-store branch:

Should we parse the memory qualifiers separately from
storage_qualifier?

I did a quick hack to bypass this issue:
-      if ($2.has_storage())
+      if ($1.has_storage() && $2.has_storage())

-Jordan

 tests/all.py                                                   |  2 +-
 .../compiler/memory_qualifier_coherent.frag                    | 10 ++++++++++
 .../compiler/memory_qualifier_readonly.frag                    | 10 ++++++++++
 .../compiler/memory_qualifier_restrict.frag                    | 10 ++++++++++
 .../compiler/memory_qualifier_volatile.frag                    | 10 ++++++++++
 .../compiler/memory_qualifier_writeonly.frag                   | 10 ++++++++++
 6 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
 create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
 create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
 create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
 create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag

diff --git a/tests/all.py b/tests/all.py
index d15c3bd..5060c7b 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4245,7 +4245,7 @@ arb_shader_image_load_store = {}
 spec['ARB_shader_image_load_store'] = arb_shader_image_load_store
 import_glsl_parser_tests(spec['ARB_shader_image_load_store'],
                          os.path.join(testsDir, 'spec', 'arb_shader_image_load_store'),
-                         [''])
+                         ['compiler'])
 arb_shader_image_load_store['atomicity'] = concurrent_test('arb_shader_image_load_store-atomicity')
 arb_shader_image_load_store['bitcast'] = concurrent_test('arb_shader_image_load_store-bitcast')
 arb_shader_image_load_store['coherency'] = concurrent_test('arb_shader_image_load_store-coherency')
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
new file mode 100644
index 0000000..25042a0
--- /dev/null
+++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(rgba8) coherent uniform image2D tex;
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
new file mode 100644
index 0000000..9381964
--- /dev/null
+++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(rgba8) readonly uniform image2D tex;
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
new file mode 100644
index 0000000..2757b25
--- /dev/null
+++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(rgba8) restrict uniform image2D tex;
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
new file mode 100644
index 0000000..bd4dbba
--- /dev/null
+++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(rgba8) volatile uniform image2D tex;
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag
new file mode 100644
index 0000000..4aa8dfe
--- /dev/null
+++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_shader_image_load_store: enable
+
+writeonly uniform image2D tex;
-- 
2.1.1



More information about the Piglit mailing list