|
#version 310 es |
|
|
|
#ifdef GL_EXT_geometry_shader |
|
#extension GL_EXT_geometry_shader : enable |
|
#else |
|
#error no GL_EXT_geometry_shader |
|
#endif |
|
|
|
#ifndef GL_OES_geometry_shader |
|
#error no GL_OES_geometry_shader |
|
#endif |
|
|
|
precision mediump float; |
|
|
|
in fromVertex { |
|
in vec3 color; |
|
} fromV[]; |
|
|
|
in vec4 nonBlockUnsized[]; |
|
|
|
out toFragment { |
|
out vec3 color; |
|
} toF; |
|
|
|
out fromVertex { |
|
vec3 color; |
|
}; |
|
|
|
out fooB { |
|
vec2 color; |
|
} fromVertex; |
|
|
|
int fromVertex; |
|
|
|
out fooC { |
|
vec2 color; |
|
} fooC; |
|
|
|
void main() |
|
{ |
|
EmitVertex(); |
|
EndPrimitive(); |
|
EmitStreamVertex(1); |
|
EndStreamPrimitive(0); |
|
|
|
color = fromV[0].color; |
|
gl_ClipDistance[3] = |
|
gl_in[1].gl_ClipDistance[2]; |
|
gl_Position = gl_in[0].gl_Position; |
|
|
|
gl_PrimitiveID = gl_PrimitiveIDIn; |
|
gl_Layer = 2; |
|
} |
|
|
|
layout(stream = 4) out vec4 ov4; |
|
|
|
layout(line_strip, points, triangle_strip, points, triangle_strip) out; |
|
|
|
out ooutb { vec4 a; } ouuaa6; |
|
|
|
layout(max_vertices = 200) out; |
|
layout(max_vertices = 300) out; |
|
void foo(layout(max_vertices = 4) int a) |
|
{ |
|
ouuaa6.a = vec4(1.0); |
|
} |
|
|
|
layout(line_strip, points, triangle_strip, points) out; |
|
layout(line_strip, points) out; |
|
layout(triangle_strip) in; |
|
layout(triangle_strip) uniform; |
|
layout(triangle_strip) out vec4 badv4; |
|
layout(triangle_strip) in vec4 bad2v4[]; |
|
layout(invocations = 3) out outbn { int a; }; |
|
out outbn2 { |
|
layout(invocations = 3) int a; |
|
layout(max_vertices = 3) int b; |
|
layout(triangle_strip) int c; |
|
} outbi; |
|
|
|
layout(lines) out; |
|
layout(lines_adjacency) in; |
|
layout(triangles) in; |
|
layout(triangles_adjacency) in; |
|
layout(invocations = 4) in; |
|
|
|
in sameName { |
|
int a15; |
|
} insn[]; |
|
|
|
out sameName { |
|
float f15; |
|
}; |
|
|
|
uniform sameName { |
|
bool b15; |
|
}; |
|
|
|
const int summ = gl_MaxVertexAttribs + |
|
gl_MaxGeometryInputComponents + |
|
gl_MaxGeometryOutputComponents + |
|
gl_MaxGeometryImageUniforms + |
|
gl_MaxGeometryTextureImageUnits + |
|
gl_MaxGeometryOutputVertices + |
|
gl_MaxGeometryTotalOutputComponents + |
|
gl_MaxGeometryUniformComponents + |
|
gl_MaxGeometryAtomicCounters + |
|
gl_MaxGeometryAtomicCounterBuffers + |
|
gl_MaxVertexTextureImageUnits + |
|
gl_MaxCombinedTextureImageUnits + |
|
gl_MaxTextureImageUnits + |
|
gl_MaxDrawBuffers; |
|
|
|
void fooe1() |
|
{ |
|
gl_ViewportIndex; |
|
gl_MaxViewports; |
|
insn.length(); |
|
int inv = gl_InvocationID; |
|
} |
|
|
|
in vec4 explArray[4]; |
|
in vec4 explArrayBad[5]; |
|
in vec4 nonArrayed; |
|
flat out vec3 myColor1; |
|
centroid out vec3 myColor2; |
|
centroid in vec3 centr[]; |
|
sample out vec4 perSampleColor; |
|
|
|
layout(max_vertices = 200) out; |
|
|
|
layout(location = 7, component = 2) in float comp[]; |
|
|
|
void notHere() |
|
{ |
|
gl_MaxGeometryVaryingComponents; |
|
gl_VerticesIn; |
|
} |
|
|
|
void pointSize1() |
|
{ |
|
highp float ps = gl_in[3].gl_PointSize; |
|
gl_PointSize = ps; |
|
} |
|
|
|
#extension GL_OES_geometry_point_size : enable |
|
|
|
void pointSize2() |
|
{ |
|
highp float ps = gl_in[3].gl_PointSize; |
|
gl_PointSize = ps; |
|
} |
|
|