diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-05-03 18:31:41 +0200 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-05-19 13:52:57 +0200 |
commit | e8cb1406c468305160066b3be71d4e71d5f2db06 (patch) | |
tree | e3b3c2e7ac1fe81076182b99842c883da03e9cef | |
parent | c4228772a58c9af3c2da6d752d78d637de106c86 (diff) |
arb_uniform_buffer_object: add uniform-block-memory-qualifier.frag
It's more appropriate to have this test here (or in
arb_shader_storage_bufer_object).
This also removes memory-qualifier-with-non-image-type.frag
which is not totally correct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
-rw-r--r-- | tests/spec/arb_shader_image_load_store/compiler/memory-qualifier-with-non-image-type.frag | 25 | ||||
-rw-r--r-- | tests/spec/arb_uniform_buffer_object/compiler/uniform-block-memory-qualifier.frag | 27 |
2 files changed, 27 insertions, 25 deletions
diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory-qualifier-with-non-image-type.frag b/tests/spec/arb_shader_image_load_store/compiler/memory-qualifier-with-non-image-type.frag deleted file mode 100644 index 71087ec21..000000000 --- a/tests/spec/arb_shader_image_load_store/compiler/memory-qualifier-with-non-image-type.frag +++ /dev/null @@ -1,25 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 3.30 -// require_extensions: GL_ARB_shader_image_load_store -// [end config] - -#version 330 -#extension GL_ARB_shader_image_load_store: enable - -// From Section 4.10 (Memory Qualifiers) of the GLSL 4.50 spec: -// -// "Variables declared as image types (the basic opaque types with “image” -// in their keyword) can be further qualified with one or more of the -// following memory qualifiers: ..." -// -// Easy enough to infer that memory qualifiers should not be used with -// non-image types. - -uniform Block { - volatile int x; -}; - -void main() -{ -} diff --git a/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-memory-qualifier.frag b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-memory-qualifier.frag new file mode 100644 index 000000000..5d0c6deb3 --- /dev/null +++ b/tests/spec/arb_uniform_buffer_object/compiler/uniform-block-memory-qualifier.frag @@ -0,0 +1,27 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// require_extensions: GL_ARB_uniform_buffer_object GL_ARB_shader_storage_buffer_object +// [end config] + +#version 120 +#extension GL_ARB_uniform_buffer_object: require +#extension GL_ARB_shader_storage_buffer_object: enable + +// From Section 4.10 (Memory Qualifiers) of the GLSL 4.50 spec: +// +// "Memory qualifiers are only supported in the declarations of image +// variables, buffer variables, and shader storage blocks; it is an error to +// use such qualifiers in any other declarations." + +uniform Block { + readonly int a; + writeonly int b; + coherent int c; + volatile int d; + restrict int e; +}; + +void main() +{ +} |