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

@@ -5,24 +5,24 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 41
// Id's are bound by 39
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11 18 37
ExecutionMode 4 OriginLowerLeft
EntryPoint Fragment 4 "main" 11 14 17 19 25 30 35
ExecutionMode 4 OriginUpperLeft
Source GLSL 140
Name 4 "main"
Name 9 "color"
Name 11 "BaseColor"
Name 13 "color2"
Name 15 "otherColor"
Name 18 "c"
Name 21 "d"
Name 27 "bigColor"
Name 32 "smallColor"
Name 37 "gl_FragColor"
Name 14 "otherColor"
Name 17 "c"
Name 19 "d"
Name 25 "bigColor"
Name 30 "smallColor"
Name 35 "gl_FragColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -30,46 +30,44 @@ Linked fragment stage:
8: TypePointer Function 7(fvec4)
10: TypePointer Input 7(fvec4)
11(BaseColor): 10(ptr) Variable Input
14: TypePointer UniformConstant 7(fvec4)
15(otherColor): 14(ptr) Variable UniformConstant
17: TypePointer Input 6(float)
18(c): 17(ptr) Variable Input
20: TypePointer UniformConstant 6(float)
21(d): 20(ptr) Variable UniformConstant
23: TypeBool
27(bigColor): 14(ptr) Variable UniformConstant
32(smallColor): 14(ptr) Variable UniformConstant
36: TypePointer Output 7(fvec4)
37(gl_FragColor): 36(ptr) Variable Output
14(otherColor): 10(ptr) Variable Input
16: TypePointer Input 6(float)
17(c): 16(ptr) Variable Input
19(d): 16(ptr) Variable Input
21: TypeBool
25(bigColor): 10(ptr) Variable Input
30(smallColor): 10(ptr) Variable Input
34: TypePointer Output 7(fvec4)
35(gl_FragColor): 34(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(color): 8(ptr) Variable Function
13(color2): 8(ptr) Variable Function
12: 7(fvec4) Load 11(BaseColor)
Store 9(color) 12
16: 7(fvec4) Load 15(otherColor)
Store 13(color2) 16
19: 6(float) Load 18(c)
22: 6(float) Load 21(d)
24: 23(bool) FOrdGreaterThan 19 22
SelectionMerge 26 None
BranchConditional 24 25 31
25: Label
28: 7(fvec4) Load 27(bigColor)
29: 7(fvec4) Load 9(color)
30: 7(fvec4) FAdd 29 28
Store 9(color) 30
Branch 26
31: Label
33: 7(fvec4) Load 32(smallColor)
34: 7(fvec4) Load 9(color)
35: 7(fvec4) FAdd 34 33
Store 9(color) 35
Branch 26
26: Label
38: 7(fvec4) Load 9(color)
39: 7(fvec4) Load 13(color2)
40: 7(fvec4) FMul 38 39
Store 37(gl_FragColor) 40
15: 7(fvec4) Load 14(otherColor)
Store 13(color2) 15
18: 6(float) Load 17(c)
20: 6(float) Load 19(d)
22: 21(bool) FOrdGreaterThan 18 20
SelectionMerge 24 None
BranchConditional 22 23 29
23: Label
26: 7(fvec4) Load 25(bigColor)
27: 7(fvec4) Load 9(color)
28: 7(fvec4) FAdd 27 26
Store 9(color) 28
Branch 24
29: Label
31: 7(fvec4) Load 30(smallColor)
32: 7(fvec4) Load 9(color)
33: 7(fvec4) FAdd 32 31
Store 9(color) 33
Branch 24
24: Label
36: 7(fvec4) Load 9(color)
37: 7(fvec4) Load 13(color2)
38: 7(fvec4) FMul 36 37
Store 35(gl_FragColor) 38
Return
FunctionEnd