diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-02-21 17:10:59 +0100 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-04-11 18:08:42 +0200 |
commit | 796b86f0d3820b77b628f9bc8ffb4c4162d9bc3a (patch) | |
tree | 123bf26a8f419810efa27974306c66902ed23b17 | |
parent | 1d43e4fb580017643784a0cf8ad2dcd3cdd072bb (diff) |
arb_bindless_texture: add linker-related tests
There are many annoying combinations to test.
v2: - remove two tests with implicit samplers/images
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
6 files changed, 209 insertions, 0 deletions
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_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_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 |