- the built-in constants - built-in variable declarations, some dependent on gl_MaxPatchVertices - layout qualifier for vertices (shared with geometry shader max_vertices) - layout qualifiers for vertex spacing, vertex order, point mode, and primitive type - link semantics for layout qualifiers Still TBD: - patch qualifier and arrayed input handling - sizing of gl_out[] - additional semantic checking - supporting the extension on version 150 git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
43 lines
1.1 KiB
GLSL
43 lines
1.1 KiB
GLSL
#version 400 core
|
|
|
|
layout(vertices = 4) out; // ERROR
|
|
layout(quads, cw) in;
|
|
layout(triangles) in; // ERROR
|
|
layout(isolines) in; // ERROR
|
|
|
|
layout(cw) in;
|
|
layout(ccw) in; // ERROR
|
|
|
|
layout(fractional_odd_spacing) in;
|
|
layout(equal_spacing) in; // ERROR
|
|
layout(fractional_even_spacing) in; // ERROR
|
|
|
|
layout(point_mode) in;
|
|
|
|
void main()
|
|
{
|
|
barrier(); // ERROR
|
|
|
|
int a = gl_MaxTessEvaluationInputComponents +
|
|
gl_MaxTessEvaluationOutputComponents +
|
|
gl_MaxTessEvaluationTextureImageUnits +
|
|
gl_MaxTessEvaluationUniformComponents +
|
|
gl_MaxTessPatchComponents +
|
|
gl_MaxPatchVertices +
|
|
gl_MaxTessGenLevel;
|
|
|
|
vec4 p = gl_in[1].gl_Position;
|
|
float ps = gl_in[1].gl_PointSize;
|
|
float cd = gl_in[1].gl_ClipDistance[2];
|
|
|
|
int pvi = gl_PatchVerticesIn;
|
|
int pid = gl_PrimitiveID;
|
|
vec3 tc = gl_TessCoord;
|
|
float tlo = gl_TessLevelOuter[3];
|
|
float tli = gl_TessLevelInner[1];
|
|
|
|
gl_Position = p;
|
|
gl_PointSize = ps;
|
|
gl_ClipDistance[2] = cd;
|
|
}
|