Fix race in ShaderBallotFunctionRead test
authorJames Helferty <jhelferty@nvidia.com>
Wed, 6 Sep 2017 01:47:05 +0000 (21:47 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 8 Sep 2017 07:10:07 +0000 (03:10 -0400)
commitbd49bc4c1acd4dec3075706beb7916fc925ffe23
tree8e3666c2a20bfd1ef9407ad975d035e24850ada0
parentde9a178e6dea07acf31e095d28dd85a32965400a
Fix race in ShaderBallotFunctionRead test

The original code contained a race to write an SSBO, since it wasn't
using atomics. This change replaces that code with a much simpler
reimplementation of readFirstInvocationARB() by using findLSB() and
ballotARB() to provide an argument to readInvocationARB().

This change also strips out a now-unused argument and related code
from the shader-builder helper class, which is shared with the other
shader_ballot tests.

Components: OpenGL

VK-GL-CTS issue: 665

Affects:
* KHR-GL43/44/45.shader_ballot_tests.ShaderBallotAvailability
* KHR-GL43/44/45.shader_ballot_tests.ShaderBallotBitmasks
* KHR-GL43/44/45.shader_ballot_tests.ShaderBallotFunctionBallot
* KHR-GL43/44/45.shader_ballot_tests.ShaderBallotFunctionRead

Change-Id: Iaf121ab07e13bf450533c96c95f1b7745631c0c8
external/openglcts/modules/gl/gl4cShaderBallotTests.cpp
external/openglcts/modules/gl/gl4cShaderBallotTests.hpp