[Piglit] [PATCH] arb_shader_storage_buffer_object: add member-memory-qualifiers.frag
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon May 1 10:07:57 UTC 2017
On 04/29/2017 07:35 PM, Nicolai Hähnle wrote:
> On 29.04.2017 16:23, Samuel Pitoiset wrote:
>> There is actually no positive test which validates the memory
>> qualifiers with members of shader storage blocks.
>
> Nice one. Should using readonly/writeonly variables incorrectly be a
> compile-time error?
Yes. We already have tests for that, look at
member-memory-qualifier-readonly.frag or
member-memory-qualifier-writeonly.frag.
>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
>
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> .../compiler/member-memory-qualifiers.frag | 22
>> ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>> create mode 100644
>> tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifiers.frag
>>
>>
>> diff --git
>> a/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifiers.frag
>> b/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifiers.frag
>>
>> new file mode 100644
>> index 000000000..028527b56
>> --- /dev/null
>> +++
>> b/tests/spec/arb_shader_storage_buffer_object/compiler/member-memory-qualifiers.frag
>>
>> @@ -0,0 +1,22 @@
>> +// [config]
>> +// expect_result: pass
>> +// glsl_version: 1.20
>> +// require_extensions: GL_ARB_shader_storage_buffer_object
>> +// [end config]
>> +
>> +#version 120
>> +#extension GL_ARB_shader_storage_buffer_object: require
>> +
>> +// From Section 4.10 (Memory Qualifiers) of the GLSL 4.50 spec:
>> +//
>> +// "The memory qualifiers coherent, volatile, restrict, readonly, and
>> +// writeonly may be used in the declaration of buffer variables
>> +// (i.e., members of shader storage blocks)"
>> +
>> +buffer ssbo {
>> + readonly int a;
>> + writeonly int b;
>> + coherent int c;
>> + volatile int d;
>> + restrict int e;
>> +};
>>
>
>
More information about the Piglit
mailing list