Merge pull request #641 from chaoc/passthrough

Add support for SPV_NV_geometry_shader_passthrough
This commit is contained in:
John Kessenich
2016-12-21 10:59:07 -07:00
committed by GitHub
13 changed files with 153 additions and 8 deletions

View File

@@ -0,0 +1,46 @@
spv.GeometryShaderPassthrough.geom
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 15
Capability Geometry
Capability GeometryShaderPassthroughNV
Extension "SPV_NV_geometry_shader_passthrough"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 10 14
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputVertices
Source GLSL 450
SourceExtension "GL_NV_geometry_shader_passthrough"
Name 4 "main"
Name 8 "gl_PerVertex"
MemberName 8(gl_PerVertex) 0 "gl_Position"
Name 10 ""
Name 12 "Inputs"
MemberName 12(Inputs) 0 "texcoord"
MemberName 12(Inputs) 1 "baseColor"
Name 14 ""
MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position
Decorate 8(gl_PerVertex) Block
Decorate 10 PassthroughNV
Decorate 12(Inputs) Block
Decorate 14 PassthroughNV
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8(gl_PerVertex): TypeStruct 7(fvec4)
9: TypePointer Input 8(gl_PerVertex)
10: 9(ptr) Variable Input
11: TypeVector 6(float) 2
12(Inputs): TypeStruct 11(fvec2) 7(fvec4)
13: TypePointer Input 12(Inputs)
14: 13(ptr) Variable Input
4(main): 2 Function None 3
5: Label
Return
FunctionEnd

View File

@@ -0,0 +1,17 @@
#version 450
#extension GL_NV_geometry_shader_passthrough : require
layout(triangles) in;
layout(passthrough) in gl_PerVertex {
vec4 gl_Position;
};
layout(passthrough) in Inputs {
vec2 texcoord;
vec4 baseColor;
};
void main()
{
}