[Piglit] [PATCH 2/2] arb_bindless_texture: add struct-inside-uniform-block.frag compiler tests
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Apr 28 09:48:12 UTC 2017
The spec doesn't clearly state this, but the spec authors say
it's allowed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
.../images/struct-inside-uniform-block.frag | 23 +++++++++++++++++++++
.../samplers/struct-inside-uniform-block.frag | 24 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
create mode 100644 tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
new file mode 100644
index 000000000..99d393aa2
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+struct foo {
+ float x;
+ writeonly image2D img;
+};
+
+uniform Block {
+ foo f;
+};
+
+void main()
+{
+ imageStore(f.img, ivec2(0, 0), vec4(1, 2, 3, 4));
+}
diff --git a/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag b/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
new file mode 100644
index 000000000..fc16827af
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_bindless_texture
+// [end config]
+
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+struct foo {
+ float x;
+ sampler2D tex;
+};
+
+uniform Block {
+ foo f;
+};
+
+out vec4 color;
+
+void main()
+{
+ color = texture2D(f.tex, vec2(0, 0));
+}
--
2.12.2
More information about the Piglit
mailing list