-
Notifications
You must be signed in to change notification settings - Fork 926
Open
Labels
Description
For gl_HelperInvocation in desktop GLSL this was added in GL_ARB_ES3_1_compatibility which became core in GLSL version 450. The extension though is written against GL 4.4 and so should be usable in a GLSL version 440 shader with the appropriate #extension.
It looks like glslang currently doesn't allow this extension: https://godbolt.org/z/j49Po3oW8
#version 440 core
#extension GL_ARB_ES3_1_compatibility : require
layout(binding = 0) uniform foo
{
vec4 data;
} bar;
layout(location = 0) out vec4 col;
void main() {
col = gl_HelperInvocation ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
}
As this produces an error:
<source>
<source>:3: '#extension' : extension not supported: GL_ARB_ES3_1_compatibility
<source>:3: '#extension' : extra tokens -- expected newline
<source>:3: '' : compilation terminated
3 compilation errors. No code generated.
Hopefully I've understood the track of these extensions correctly and this should be allowed.