Skip to content

Instantly share code, notes, and snippets.

@benvanik
Created February 21, 2016 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benvanik/8a04b051c6cf5c14b642 to your computer and use it in GitHub Desktop.
Save benvanik/8a04b051c6cf5c14b642 to your computer and use it in GitHub Desktop.
SPIR-V 1.0:
Glslang Reference Front End from Khronos (Contact John Kessenich, johnkessenich@google.com) - version 0x0001
IDs up to {204}
Source is GLSL 450
Capabilities: Geometry GeometryPointSize ClipDistance Unrecognised{54}
Entry point 'main' (Geometry Shader)
Triangles
Invocations = 1
OutputTriangleStrip
OutputVertices = 6
struct gl_PerVertex {
float4 gl_Position = Position;
float gl_PointSize = PointSize;
float gl_ClipDistance[1] = ClipDistance;
}; // struct gl_PerVertex
struct gl_PerVertex {
float4 gl_Position = Position;
float gl_PointSize = PointSize;
float gl_ClipDistance[1] = ClipDistance;
}; // struct gl_PerVertex
struct VertexData {
Location=1 float4 o[16];
}; // struct VertexData
struct VertexData {
Location=1 float4 o[16];
}; // struct VertexData
Input gl_PerVertex* gl_in[3];
Input VertexData* in_vtx[3];
Output Stream=0 gl_PerVertex* gl_PerVertex_34;
Output Stream=0 VertexData* out_vtx;
void main() {
int* i;
int* i;
if(gl_in[0].gl_Position.x == gl_in[2].gl_Position.x) {
gl_PerVertex_34.gl_Position = gl_in[0].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[0].gl_PointSize;
out_vtx = in_vtx[0];
gl_PerVertex_34.gl_Position = gl_in[1].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[1].gl_PointSize;
out_vtx = in_vtx[1];
gl_PerVertex_34.gl_Position = gl_in[2].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
out_vtx = in_vtx[2];
gl_PerVertex_34.gl_Position = gl_in[2].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
out_vtx = in_vtx[2];
gl_PerVertex_34.gl_Position = gl_in[1].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[1].gl_PointSize;
out_vtx = in_vtx[1];
gl_PerVertex_34.gl_Position = (gl_in[1].gl_Position + gl_in[2].gl_Position) - gl_in[0].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
i = 0;
while(true) {
Label104:
float4 {119} = (-in_vtx[0].o[i]) + in_vtx[1].o[i];
out_vtx.o[i] = ({119}) + in_vtx[2].o[i];
i = i + 1;
}
} else {
gl_PerVertex_34.gl_Position = gl_in[0].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[0].gl_PointSize;
out_vtx = in_vtx[0];
gl_PerVertex_34.gl_Position = gl_in[1].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[1].gl_PointSize;
out_vtx = in_vtx[1];
gl_PerVertex_34.gl_Position = gl_in[2].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
out_vtx = in_vtx[2];
gl_PerVertex_34.gl_Position = gl_in[0].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[0].gl_PointSize;
out_vtx = in_vtx[0];
gl_PerVertex_34.gl_Position = gl_in[2].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
out_vtx = in_vtx[2];
gl_PerVertex_34.gl_Position = (gl_in[0].gl_Position + gl_in[2].gl_Position) - gl_in[1].gl_Position;
gl_PerVertex_34.gl_PointSize = gl_in[2].gl_PointSize;
i = 0;
while(true) {
Label182:
float4 {196} = in_vtx[0].o[i] + (-in_vtx[1].o[i]);
out_vtx.o[i] = ({196}) + in_vtx[2].o[i];
i = i + 1;
}
}
} // main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment