SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl).

This commit is contained in:
John Kessenich 2016-02-15 20:58:50 -07:00
parent 019f08fcd8
commit 6c292d3ba7
200 changed files with 7841 additions and 5577 deletions

View file

@ -7,14 +7,14 @@ Linked vertex stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 50
// Id's are bound by 49
Capability Shader
Capability ClipDistance
Capability CullDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 24 48 49
EntryPoint Vertex 4 "main" 24
Source GLSL 450
Name 4 "main"
Name 10 "foo(b1;"
@ -29,17 +29,14 @@ Linked vertex stage:
MemberName 29(ubname) 0 "b"
Name 31 "ubinst"
Name 32 "param"
Name 48 "gl_VertexID"
Name 49 "gl_InstanceID"
MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 22(gl_PerVertex) Block
Decorate 29(ubname) GLSLShared
MemberDecorate 29(ubname) 0 Offset 0
Decorate 29(ubname) Block
Decorate 48(gl_VertexID) BuiltIn VertexId
Decorate 49(gl_InstanceID) BuiltIn InstanceId
Decorate 31(ubinst) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeBool
@ -57,38 +54,37 @@ Linked vertex stage:
25: TypeInt 32 1
26: 25(int) Constant 0
27: TypePointer Function 18(fvec4)
29(ubname): TypeStruct 6(bool)
29(ubname): TypeStruct 19(int)
30: TypePointer Uniform 29(ubname)
31(ubinst): 30(ptr) Variable Uniform
33: TypePointer Uniform 6(bool)
39: 17(float) Constant 0
40: 18(fvec4) ConstantComposite 39 39 39 39
42: 17(float) Constant 1065353216
43: 18(fvec4) ConstantComposite 42 42 42 42
45: TypePointer Output 18(fvec4)
47: TypePointer Input 25(int)
48(gl_VertexID): 47(ptr) Variable Input
49(gl_InstanceID): 47(ptr) Variable Input
33: TypePointer Uniform 19(int)
36: 19(int) Constant 0
41: 17(float) Constant 0
42: 18(fvec4) ConstantComposite 41 41 41 41
44: 17(float) Constant 1065353216
45: 18(fvec4) ConstantComposite 44 44 44 44
47: TypePointer Output 18(fvec4)
4(main): 2 Function None 3
5: Label
28: 27(ptr) Variable Function
32(param): 7(ptr) Variable Function
34: 33(ptr) AccessChain 31(ubinst) 26
35: 6(bool) Load 34
Store 32(param) 35
36: 6(bool) FunctionCall 10(foo(b1;) 32(param)
SelectionMerge 38 None
BranchConditional 36 37 41
37: Label
Store 28 40
Branch 38
41: Label
Store 28 43
Branch 38
38: Label
44: 18(fvec4) Load 28
46: 45(ptr) AccessChain 24 26
Store 46 44
35: 19(int) Load 34
37: 6(bool) INotEqual 35 36
Store 32(param) 37
38: 6(bool) FunctionCall 10(foo(b1;) 32(param)
SelectionMerge 40 None
BranchConditional 38 39 43
39: Label
Store 28 42
Branch 40
43: Label
Store 28 45
Branch 40
40: Label
46: 18(fvec4) Load 28
48: 47(ptr) AccessChain 24 26
Store 48 46
Return
FunctionEnd
10(foo(b1;): 6(bool) Function None 8