[Piglit] [RFC PATCH 4/5] arb_bindless_texture: add linker-related tests
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Mar 27 22:05:12 UTC 2017
There are many annoying combinations to test.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
...obal_bindless_image_and_bound_image.shader_test | 42 ++++++++++++++++++++
...al_bindless_image_and_bound_sampler.shader_test | 32 +++++++++++++++
...less_image_and_implicit_bound_image.shader_test | 45 ++++++++++++++++++++++
...bindless_sampler_and_bindless_image.shader_test | 32 +++++++++++++++
...al_bindless_sampler_and_bound_image.shader_test | 32 +++++++++++++++
..._bindless_sampler_and_bound_sampler.shader_test | 39 +++++++++++++++++++
..._sampler_and_implicit_bound_sampler.shader_test | 42 ++++++++++++++++++++
...lobal_bound_sampler_and_bound_image.shader_test | 32 +++++++++++++++
8 files changed, 296 insertions(+)
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_image.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_sampler.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_image_and_implicit_bound_image.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bindless_image.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_image.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_sampler.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_implicit_bound_sampler.shader_test
create mode 100644 tests/spec/arb_bindless_texture/linker/global_bound_sampler_and_bound_image.shader_test
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_image.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_image.shader_test
new file mode 100644
index 000000000..4d838762c
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_image.shader_test
@@ -0,0 +1,42 @@
+# The ARB_bindless_texture spec says:
+#
+# "If both bindless_sampler and bound_sampler, or bindless_image and
+# bound_image, are declared at global scope in any compilation unit, a link-
+# time error will be generated. In the absence of these qualifiers, sampler
+# and image uniforms are considered "bound". Additionally, if
+# GL_ARB_bindless_texture is not enabled, these uniforms are considered
+# "bound"."
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bindless_image) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bound_image) uniform;
+
+void foo()
+{
+}
+
+[test]
+link error
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_sampler.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_sampler.shader_test
new file mode 100644
index 000000000..c0709adbf
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_bound_sampler.shader_test
@@ -0,0 +1,32 @@
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bindless_image) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout(bound_sampler) uniform;
+
+void foo()
+{
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_implicit_bound_image.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_implicit_bound_image.shader_test
new file mode 100644
index 000000000..34d6d25bb
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_image_and_implicit_bound_image.shader_test
@@ -0,0 +1,45 @@
+# The ARB_bindless_texture spec says:
+#
+# "If both bindless_sampler and bound_sampler, or bindless_image and
+# bound_image, are declared at global scope in any compilation unit, a link-
+# time error will be generated. In the absence of these qualifiers, sampler
+# and image uniforms are considered "bound". Additionally, if
+# GL_ARB_bindless_texture is not enabled, these uniforms are considered
+# "bound"."
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout (bindless_image) uniform;
+
+out vec4 color;
+
+vec4 foo();
+
+void main()
+{
+ color = foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(rg32f) readonly uniform image2D img;
+
+vec4 foo()
+{
+ return imageLoad(img, ivec2(0, 0));
+}
+
+[test]
+link error
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bindless_image.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bindless_image.shader_test
new file mode 100644
index 000000000..de9dbb802
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bindless_image.shader_test
@@ -0,0 +1,32 @@
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 400
+#extension GL_ARB_bindless_texture: require
+
+layout(bindless_sampler) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bindless_image) uniform;
+
+void foo()
+{
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_image.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_image.shader_test
new file mode 100644
index 000000000..3f22e2975
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_image.shader_test
@@ -0,0 +1,32 @@
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 400
+#extension GL_ARB_bindless_texture: require
+
+layout(bindless_sampler) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bound_image) uniform;
+
+void foo()
+{
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_sampler.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_sampler.shader_test
new file mode 100644
index 000000000..e4afe8186
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_bound_sampler.shader_test
@@ -0,0 +1,39 @@
+# The ARB_bindless_texture spec says:
+#
+# "If both bindless_sampler and bound_sampler, or bindless_image and
+# bound_image, are declared at global scope in any compilation unit, a link-
+# time error will be generated. In the absence of these qualifiers, sampler
+# and image uniforms are considered "bound". Additionally, if
+# GL_ARB_bindless_texture is not enabled, these uniforms are considered
+# "bound"."
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout(bindless_sampler) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout(bound_sampler) uniform;
+
+void foo()
+{
+}
+
+[test]
+link error
diff --git a/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_implicit_bound_sampler.shader_test b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_implicit_bound_sampler.shader_test
new file mode 100644
index 000000000..8e2e2838d
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bindless_sampler_and_implicit_bound_sampler.shader_test
@@ -0,0 +1,42 @@
+# The ARB_bindless_texture spec says:
+#
+# "If both bindless_sampler and bound_sampler, or bindless_image and
+# bound_image, are declared at global scope in any compilation unit, a link-
+# time error will be generated. In the absence of these qualifiers, sampler
+# and image uniforms are considered "bound". Additionally, if
+# GL_ARB_bindless_texture is not enabled, these uniforms are considered
+# "bound"."
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout (bindless_sampler) uniform;
+
+out vec4 color;
+
+vec4 foo();
+
+void main()
+{
+ color = foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+uniform sampler2D tex;
+
+vec4 foo()
+{
+ return texture(tex, vec2(0, 0));
+}
+
+[test]
+link error
diff --git a/tests/spec/arb_bindless_texture/linker/global_bound_sampler_and_bound_image.shader_test b/tests/spec/arb_bindless_texture/linker/global_bound_sampler_and_bound_image.shader_test
new file mode 100644
index 000000000..3c4b050ed
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/linker/global_bound_sampler_and_bound_image.shader_test
@@ -0,0 +1,32 @@
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout(bound_sampler) uniform;
+
+void foo();
+
+void main()
+{
+ foo();
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+layout(bound_image) uniform;
+
+void foo()
+{
+}
+
+[test]
+link success
--
2.12.1
More information about the Piglit
mailing list