[Piglit] [PATCH v2 1/2] shader_runner: add support for glDispatchComputeGroupSizeARB()

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Sep 29 18:58:31 UTC 2016



On 09/28/2016 12:35 PM, Nicolai Hähnle wrote:
> On 10.09.2016 17:19, Samuel Pitoiset wrote:
>> This allows to dispatch compute shaders with a variable local size
>> using the new "compute group size" command.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>  tests/shaders/shader_runner.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/shaders/shader_runner.c
>> b/tests/shaders/shader_runner.c
>> index 8e29346..e9d39e9 100644
>> --- a/tests/shaders/shader_runner.c
>> +++ b/tests/shaders/shader_runner.c
>> @@ -2924,6 +2924,13 @@ piglit_display(void)
>>              glMemoryBarrier(GL_ALL_BARRIER_BITS);
>>              glDispatchCompute(x, y, z);
>>              glMemoryBarrier(GL_ALL_BARRIER_BITS);
>> +        } else if (sscanf(line,
>> +                  "compute group size %d %d %d %d %d %d",
>> +                  &x, &y, &z, &w, &h, &l) == 6) {
>> +            program_must_be_in_use();
>> +            glMemoryBarrier(GL_ALL_BARRIER_BITS);
>> +            glDispatchComputeGroupSizeARB(x, y, z, w, h, l);
>> +            glMemoryBarrier(GL_ALL_BARRIER_BITS);
>
> FWIW, I don't particularly like that the memory barriers are added
> unconditionally, because it prevents us from writing tests that test
> specific bits, but since the other compute call also does this, I think
> it's okay.

Yes, I do agree but I followed the same behaviour as glDispatchCompute() 
for consistency.

>
> Nicolai
>
>>          } else if (string_match("draw rect tex", line)) {
>>              program_must_be_in_use();
>>              program_subroutine_uniforms();
>>


More information about the Piglit mailing list