Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
|
|
|
#version 400 core
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
EmitStreamVertex(1);
|
|
|
|
EndStreamPrimitive(0);
|
|
|
|
EmitVertex();
|
|
|
|
EndPrimitive();
|
2013-10-16 22:28:35 +00:00
|
|
|
|
|
|
|
int id = gl_InvocationID;
|
Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
|
|
|
}
|
2013-10-23 19:34:05 +00:00
|
|
|
|
|
|
|
layout(invocations = 3) out outbn { int a; }; // ERROR, not on a block
|
|
|
|
layout(max_vertices = 127, invocations = 4) out;
|
2013-10-24 22:41:04 +00:00
|
|
|
|
|
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
|
|
|
|
|
|
in gl_PerVertex { // testing input arrays with a block redeclaration, see 420.geom for without
|
|
|
|
vec4 gl_Position;
|
2013-12-09 00:37:46 +00:00
|
|
|
layout(std140, location = 3) patch float gl_PointSize; // ERRORs...
|
2013-10-24 22:41:04 +00:00
|
|
|
} gl_in[];
|
|
|
|
|
|
|
|
void foo()
|
|
|
|
{
|
|
|
|
gl_in.length(); // ERROR
|
|
|
|
gl_in[1].gl_Position;
|
|
|
|
}
|
|
|
|
|
|
|
|
in vec4 color[];
|
|
|
|
in vec4 color2[];
|
|
|
|
in vec4 colorS[3];
|
|
|
|
in vec4 colorBad[4];
|
|
|
|
|
|
|
|
void foo2()
|
|
|
|
{
|
|
|
|
color.length(); // ERROR
|
|
|
|
colorS.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
layout(triangles) in; // give ERROR just for colorBad
|
|
|
|
|
|
|
|
in vec4 color[3];
|
|
|
|
in vec4 color2[3];
|
|
|
|
in vec4 colorbad2[2]; // ERROR
|
|
|
|
|
|
|
|
void foo3()
|
|
|
|
{
|
|
|
|
gl_in.length();
|
|
|
|
color.length();
|
|
|
|
color2.length();
|
|
|
|
colorS.length();
|
|
|
|
}
|
2013-12-05 20:58:16 +00:00
|
|
|
|
|
|
|
layout(location = 4) in vec4 cva[3];
|
|
|
|
layout(location = 5) in vec4 cvb[3];
|
|
|
|
layout(location = 2) in mat3 cmc[3]; // ERROR, collision
|