I found out that running tessellation control shader which contains barrier()
call on my integrated Intel videocard yields no geometry (????)
So just for example, the following simple shader works well on my dedicated Nvidia card, but doesn't work with Intel:
#version 450 core
layout (vertices = 4) out;
void main() {
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
gl_TessLevelInner[0] = 1;
gl_TessLevelInner[1] = 1;
gl_TessLevelOuter[0] = 1;
gl_TessLevelOuter[1] = 1;
gl_TessLevelOuter[2] = 1;
gl_TessLevelOuter[3] = 1;
barrier();
}
However, the same code without barrier()
call works on Intel card too.
Would be grateful if someone could guess, where to look for the cause of the problem
UPDATE
Found out that when barrier()
is called before gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
everything works fine, so I just need to move this statement to the end:
#version 450 core
layout (vertices = 4) out;
void main() {
gl_TessLevelInner[0] = 1;
gl_TessLevelInner[1] = 1;
gl_TessLevelOuter[0] = 1;
gl_TessLevelOuter[1] = 1;
gl_TessLevelOuter[2] = 1;
gl_TessLevelOuter[3] = 1;
barrier();
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
}
This behavior is still not clear for me, so would be cool if someone could explain it to me, why I shouldn't write to gl_out
before barrier()