mirror of
https://github.com/libretro/glslang.git
synced 2025-01-24 08:27:22 +00:00
623833fabc
- 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
36 lines
905 B
GLSL
36 lines
905 B
GLSL
#version 400 core
|
|
|
|
layout(vertices = 4) out;
|
|
int outa[gl_out.length()];
|
|
|
|
layout(quads) in; // ERROR
|
|
layout(ccw) out; // ERROR
|
|
layout(fractional_even_spacing) in; // ERROR
|
|
|
|
|
|
void main()
|
|
{
|
|
barrier();
|
|
|
|
int a = gl_MaxTessControlInputComponents +
|
|
gl_MaxTessControlOutputComponents +
|
|
gl_MaxTessControlTextureImageUnits +
|
|
gl_MaxTessControlUniformComponents +
|
|
gl_MaxTessControlTotalOutputComponents;
|
|
|
|
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;
|
|
int iid = gl_InvocationID;
|
|
|
|
gl_out[1].gl_Position = p;
|
|
gl_out[1].gl_PointSize = ps;
|
|
gl_out[1].gl_ClipDistance[1] = cd;
|
|
|
|
gl_TessLevelOuter[3] = 3.2;
|
|
gl_TessLevelInner[1] = 1.3;
|
|
}
|