00f14ce74f
Normally, I wouldn't have bothered with this, given that we already support the Vulkan 1.1 subgroup functionality, but a client asked for the legacy extensions.
19 lines
477 B
Plaintext
19 lines
477 B
Plaintext
#version 450
|
|
#extension GL_ARB_shader_group_vote : require
|
|
|
|
layout (local_size_x = 64) in;
|
|
layout (std430, binding = 0) buffer inputData
|
|
{
|
|
float inputDataArray[];
|
|
};
|
|
|
|
void main ()
|
|
{
|
|
float thisLaneData = inputDataArray [gl_LocalInvocationID.x];
|
|
bool laneActive = (thisLaneData > 0);
|
|
|
|
bool allInvocations = allInvocationsARB(laneActive);
|
|
bool anyInvocations = anyInvocationARB(laneActive);
|
|
bool allInvocationsEqual = allInvocationsEqualARB(laneActive);
|
|
}
|