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 150 core
|
|
|
|
|
2013-10-16 22:28:35 +00:00
|
|
|
in fromVertex {
|
2014-01-07 17:44:41 +00:00
|
|
|
in vec3 color;
|
2013-12-18 03:06:24 +00:00
|
|
|
} fromV[];
|
2013-10-16 22:28:35 +00:00
|
|
|
|
|
|
|
out toFragment {
|
2014-01-07 17:44:41 +00:00
|
|
|
out vec3 color;
|
2013-10-16 22:28:35 +00:00
|
|
|
} toF;
|
|
|
|
|
|
|
|
out fromVertex { // okay to reuse a block name for another block name
|
|
|
|
vec3 color;
|
|
|
|
};
|
|
|
|
|
|
|
|
out fooB {
|
|
|
|
vec2 color;
|
|
|
|
} fromVertex; // ERROR, cannot reuse block name as block instance
|
|
|
|
|
|
|
|
int fromVertex; // ERROR, cannot reuse a block name for something else
|
|
|
|
|
|
|
|
out fooC {
|
|
|
|
vec2 color;
|
|
|
|
} fooC; // ERROR, cannot have same name for block and instance name
|
|
|
|
|
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
|
|
|
void main()
|
|
|
|
{
|
|
|
|
EmitVertex();
|
|
|
|
EndPrimitive();
|
|
|
|
EmitStreamVertex(1); // ERROR
|
|
|
|
EndStreamPrimitive(0); // ERROR
|
2013-10-16 22:28:35 +00:00
|
|
|
|
2013-12-18 03:06:24 +00:00
|
|
|
color = fromV[0].color;
|
2013-10-16 22:28:35 +00:00
|
|
|
gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
|
|
|
|
gl_Position = gl_in[0].gl_Position;
|
|
|
|
gl_PointSize = gl_in[3].gl_PointSize;
|
|
|
|
gl_PrimitiveID = gl_PrimitiveIDIn;
|
|
|
|
gl_Layer = 2;
|
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
|
|
|
|
|
|
|
out vec4 ov0; // stream should be 0
|
|
|
|
layout(stream = 4) out vec4 ov4;
|
|
|
|
out vec4 o1v0; // stream should be 0
|
|
|
|
|
|
|
|
layout(stream = 3) uniform; // ERROR
|
|
|
|
layout(stream = 3) in; // ERROR
|
|
|
|
layout(stream = 3) uniform int ua; // ERROR
|
|
|
|
layout(stream = 3) uniform ubb { int ua; } ibb; // ERROR
|
|
|
|
|
|
|
|
layout(line_strip, points, triangle_strip, stream = 3, points, triangle_strip) out; // just means "stream = 3, triangle_strip"
|
|
|
|
layout(stream = 3, triangle_strip) out;
|
|
|
|
out vec4 ov3; // stream should be 3
|
|
|
|
|
|
|
|
layout(stream = 6) out ooutb { vec4 a; } ouuaa6;
|
|
|
|
|
2013-11-11 04:21:31 +00:00
|
|
|
layout(stream = 6) out ooutb2 {
|
2013-10-23 19:34:05 +00:00
|
|
|
layout(stream = 6) vec4 a;
|
|
|
|
} ouua6;
|
|
|
|
|
2013-11-11 04:21:31 +00:00
|
|
|
layout(stream = 7) out ooutb3 {
|
2013-10-23 19:34:05 +00:00
|
|
|
layout(stream = 6) vec4 a; // ERROR
|
|
|
|
} ouua7;
|
|
|
|
|
|
|
|
out vec4 ov2s3; // stream should be 3
|
|
|
|
|
2014-04-29 23:09:26 +00:00
|
|
|
layout(max_vertices = 200) out;
|
|
|
|
layout(max_vertices = 300) out; // ERROR, too big
|
2013-10-23 19:34:05 +00:00
|
|
|
void foo(layout(max_vertices = 4) int a) // ERROR
|
|
|
|
{
|
|
|
|
ouuaa6.a = vec4(1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
layout(line_strip, points, triangle_strip, stream = 3, points) out; // ERROR, changing output primitive
|
|
|
|
layout(line_strip, points, stream = 3) out; // ERROR, changing output primitive
|
|
|
|
layout(triangle_strip) in; // ERROR, not an input primitive
|
|
|
|
layout(triangle_strip) uniform; // ERROR
|
|
|
|
layout(triangle_strip) out vec4 badv4; // ERROR, not on a variable
|
2013-12-18 03:06:24 +00:00
|
|
|
layout(triangle_strip) in vec4 bad2v4[]; // ERROR, not on a variable or input
|
2014-04-29 23:09:26 +00:00
|
|
|
layout(invocations = 3) out outbn { int a; }; // 2 ERROR, not on a block, not until 4.0
|
2013-11-11 04:21:31 +00:00
|
|
|
out outbn2 {
|
2014-04-29 23:09:26 +00:00
|
|
|
layout(invocations = 3) int a; // 2 ERRORs, not on a block member, not until 4.0
|
2013-10-23 19:34:05 +00:00
|
|
|
layout(max_vertices = 3) int b; // ERROR, not on a block member
|
|
|
|
layout(triangle_strip) int c; // ERROR, not on a block member
|
|
|
|
} outbi;
|
|
|
|
|
|
|
|
layout(lines) out; // ERROR, not on output
|
2014-08-10 18:19:36 +00:00
|
|
|
layout(lines_adjacency) in;
|
2013-10-23 19:34:05 +00:00
|
|
|
layout(triangles) in; // ERROR, can't change it
|
|
|
|
layout(triangles_adjacency) in; // ERROR, can't change it
|
2014-04-29 23:09:26 +00:00
|
|
|
layout(invocations = 4) in; // ERROR, not until 4.0
|
2013-10-23 19:34:05 +00:00
|
|
|
|
|
|
|
in inbn {
|
|
|
|
layout(stream = 2) int a; // ERROR, stream on input
|
2013-12-18 03:06:24 +00:00
|
|
|
} inbi[];
|
2013-11-11 04:21:31 +00:00
|
|
|
|
|
|
|
in sameName {
|
|
|
|
int a15;
|
2013-12-18 03:06:24 +00:00
|
|
|
} insn[];
|
2013-11-11 04:21:31 +00:00
|
|
|
|
|
|
|
out sameName {
|
|
|
|
float f15;
|
|
|
|
};
|
|
|
|
|
|
|
|
uniform sameName {
|
|
|
|
bool b15;
|
|
|
|
};
|
2014-10-06 15:44:02 +00:00
|
|
|
|
|
|
|
float summ = gl_MaxVertexAttribs +
|
|
|
|
gl_MaxVertexUniformComponents +
|
|
|
|
gl_MaxVaryingFloats +
|
|
|
|
gl_MaxVaryingComponents +
|
|
|
|
gl_MaxVertexOutputComponents +
|
|
|
|
gl_MaxGeometryInputComponents +
|
|
|
|
gl_MaxGeometryOutputComponents +
|
|
|
|
gl_MaxFragmentInputComponents +
|
|
|
|
gl_MaxVertexTextureImageUnits +
|
|
|
|
gl_MaxCombinedTextureImageUnits +
|
|
|
|
gl_MaxTextureImageUnits +
|
|
|
|
gl_MaxFragmentUniformComponents +
|
|
|
|
gl_MaxDrawBuffers +
|
|
|
|
gl_MaxClipDistances +
|
|
|
|
gl_MaxGeometryTextureImageUnits +
|
|
|
|
gl_MaxGeometryOutputVertices +
|
|
|
|
gl_MaxGeometryTotalOutputComponents +
|
|
|
|
gl_MaxGeometryUniformComponents +
|
|
|
|
gl_MaxGeometryVaryingComponents;
|
2014-10-17 20:01:27 +00:00
|
|
|
|
|
|
|
void fooe1()
|
|
|
|
{
|
|
|
|
gl_ViewportIndex = gl_MaxViewports - 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#extension GL_ARB_viewport_array : enable
|
|
|
|
|
|
|
|
void fooe2()
|
|
|
|
{
|
|
|
|
gl_ViewportIndex = gl_MaxViewports - 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
out int gl_ViewportIndex;
|