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,13 +7,13 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 48
// Id's are bound by 49
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 36
ExecutionMode 4 OriginLowerLeft
EntryPoint Fragment 4 "main" 21 26 37
ExecutionMode 4 OriginUpperLeft
Source ESSL 310
Name 4 "main"
Name 8 "foo("
@@ -22,7 +22,7 @@ Linked fragment stage:
Name 17 "z"
Name 21 "low"
Name 26 "high"
Name 36 "Color"
Name 37 "Color"
Decorate 8(foo() RelaxedPrecision
Decorate 11(face1) RelaxedPrecision
Decorate 13(face2) RelaxedPrecision
@@ -34,9 +34,8 @@ Linked fragment stage:
Decorate 26(high) RelaxedPrecision
Decorate 27 RelaxedPrecision
Decorate 32 RelaxedPrecision
Decorate 33 RelaxedPrecision
Decorate 36(Color) RelaxedPrecision
Decorate 37 RelaxedPrecision
Decorate 34 RelaxedPrecision
Decorate 37(Color) RelaxedPrecision
Decorate 38 RelaxedPrecision
Decorate 39 RelaxedPrecision
Decorate 40 RelaxedPrecision
@@ -45,6 +44,7 @@ Linked fragment stage:
Decorate 43 RelaxedPrecision
Decorate 44 RelaxedPrecision
Decorate 45 RelaxedPrecision
Decorate 46 RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -57,47 +57,48 @@ Linked fragment stage:
15: TypeInt 32 1
16: TypePointer Function 15(int)
18: 15(int) Constant 3
19: 15(int) Constant 2
20: TypePointer UniformConstant 15(int)
21(low): 20(ptr) Variable UniformConstant
24: 15(int) Constant 1
26(high): 20(ptr) Variable UniformConstant
19: 6(float) Constant 1073741824
20: TypePointer Input 6(float)
21(low): 20(ptr) Variable Input
24: 6(float) Constant 1065353216
26(high): 20(ptr) Variable Input
28: TypeBool
34: TypeVector 6(float) 4
35: TypePointer Output 34(fvec4)
36(Color): 35(ptr) Variable Output
33: 15(int) Constant 1
35: TypeVector 6(float) 4
36: TypePointer Output 35(fvec4)
37(Color): 36(ptr) Variable Output
4(main): 2 Function None 3
5: Label
17(z): 16(ptr) Variable Function
Store 11(face1) 12
Store 13(face2) 14
Store 17(z) 18
22: 15(int) Load 21(low)
23: 15(int) IMul 19 22
25: 15(int) IAdd 23 24
27: 15(int) Load 26(high)
29: 28(bool) SLessThan 25 27
22: 6(float) Load 21(low)
23: 6(float) FMul 19 22
25: 6(float) FAdd 23 24
27: 6(float) Load 26(high)
29: 28(bool) FOrdLessThan 25 27
SelectionMerge 31 None
BranchConditional 29 30 31
30: Label
32: 15(int) Load 17(z)
33: 15(int) IAdd 32 24
Store 17(z) 33
34: 15(int) IAdd 32 33
Store 17(z) 34
Branch 31
31: Label
37: 6(float) Load 11(face1)
38: 15(int) Load 17(z)
39: 6(float) ConvertSToF 38
40: 34(fvec4) CompositeConstruct 39 39 39 39
41: 34(fvec4) VectorTimesScalar 40 37
42: 6(float) FunctionCall 8(foo()
43: 34(fvec4) CompositeConstruct 42 42 42 42
44: 34(fvec4) FAdd 41 43
Store 36(Color) 44
38: 6(float) Load 11(face1)
39: 15(int) Load 17(z)
40: 6(float) ConvertSToF 39
41: 35(fvec4) CompositeConstruct 40 40 40 40
42: 35(fvec4) VectorTimesScalar 41 38
43: 6(float) FunctionCall 8(foo()
44: 35(fvec4) CompositeConstruct 43 43 43 43
45: 35(fvec4) FAdd 42 44
Store 37(Color) 45
Return
FunctionEnd
8(foo(): 6(float) Function None 7
9: Label
45: 6(float) Load 13(face2)
ReturnValue 45
46: 6(float) Load 13(face2)
ReturnValue 46
FunctionEnd